Plan for "example code"

It is interesting (and very helpful!) to see we can pull in “examples” like this in our project without any webpack changes:

import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'
import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass'

Is there a plan for the post-processing to be moved into the main build? Or are you supporting efforts like to pull out this code as a sub-library? Or, otherwise, what is the three.js “standard” for consuming this code in a modern manner?

For what it’s worth, the way these are setup now makes using jest very awkward. I’ve found that I’ve had to add

  transformIgnorePatterns: [

to my jest.config.js just to get them to run, but then it takes a very long time to run as it ends up importing three.js multiple times because of the way the jsm/../EffectComposer.js is setup. I’m not looking for help with this in particular, but I’d like to know whether there is a “preferred” pattern, so that we can start buildling our infrastructure around it.

Thanks in advance!

this is finally rectified, i think next version this problem will fade away.

what is the three.js “standard” for consuming this code in a modern manner?

three has a bit of an odd stance when it comes to modernity, i think most people on here don’t use npm and bundlers (?), every post i open i see … script tags, it’s like a time capsule :grinning_face_with_smiling_eyes: but three is on a good path, you can consume it anyway you like. the maintainers are very open minded when it comes to that which is great.

1 Like

Thanks for your response.