Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples: Move NodeMaterial to JSM. #16917

Merged
merged 2 commits into from
Jun 28, 2019
Merged

Examples: Move NodeMaterial to JSM. #16917

merged 2 commits into from
Jun 28, 2019

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jun 26, 2019

Follow up of #16054

Note: In some example I'm using this pattern similar to the THREE import:

import * as Nodes from './jsm/nodes/Nodes.js';

Otherwise there is an extreme long list of imports.

/cc @sunag

@donmccurdy
Copy link
Collaborator

import * as Nodes from './jsm/nodes/Nodes.js';

All of the places you used this look OK to me, but just for future reference, I would avoid using this shorthand (even for long lists of imports) within the examples/jsm/nodes/* subdirectory to ensure tree-shaking compatibility. The examples and NodeMaterialLoader are fine.

@gkjohnson
Copy link
Collaborator

Awesome! Is the intent still to transform the examples/jsm/Nodes folder into a single file in examples/js/Nodes? If so I can help modify the build-examples rollup script to help achieve that (and for other special cases like EffectComposer) once the notional switch has been flipped to start building the modules to require scripts.

@donmccurdy
Copy link
Collaborator

donmccurdy commented Jun 26, 2019

Is the intent still to transform the examples/jsm/Nodes folder into a single file in examples/js/Nodes?

That would be my thought, and it probably applies to at least postprocessing/, curves/, and lines/ too. Not sure when we want to "flip the switch" though. r107? 😇

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jun 26, 2019

I would say yes. After finalizing build-examples, modularize.js should be removed since the JSM files are now the canonical versions.

@gkjohnson
Copy link
Collaborator

I'll look into proposing some changes to build-examples to support this use soon.

@sunag
Copy link
Collaborator

sunag commented Jun 26, 2019

@Mugen87 Thanks! 👏 👏 👏

@mrdoob mrdoob added this to the r107 milestone Jun 28, 2019
@mrdoob mrdoob merged commit a756b4f into mrdoob:dev Jun 28, 2019
@mrdoob
Copy link
Owner

mrdoob commented Jun 28, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants