Are there any known pitfalls resulting in conflicting geometry ids (geometry.id)?

Ok, thanks for the information, we’ll look at it again.

Hi!

Ok, I’d say we fixed it now. :+1:

I don’t know if it’s a TypeScript + Rollup issue only, but it seems that when

importing modules directly from the examples folder like:
import {SubdivisionModifier} from "three/examples/jsm/modifiers/SubdivisionModifier"
Rollup (at some point) keeps adding doubled three.js modules to the output-bundle (?!). :thinking::man_facepalming:

We fixed this by copying all needed modules from the three/examples/jsm folder to a local project-folder + changing the import-statements inside the modules accordingly in our case to import {...} from "three" & additionally adjusting the paths in the TypeScript declaration files. This fixed the bundle size AND the issue with the geometry.ids! :clap:

Maybe there is another, better way to fix this (?), but at the moment :crossed_fingers: it’s okay for our needs.

Thank you very much once again! :grin: :fist:

FYI, I’ve created a small repo that shows a simple three.js project setup with rollup and JavaScript.

As you can see in the build file, three.js is only included once although JSM modules are used.

1 Like

Hi, thank you, we’ll check the adaption to our project and see if it makes our “fix” redundant.