Module Import / Usage

2020 :fireworks: It’s next year! :sparkler:


For the collection (basic examples) I copy the required files of the current revision. So the examples remain safely executable.

The example
( ShaderLib normalmap is no longer available
three.js dev template - module - JSFiddle - Code Playground ) @Mugen87 uses modules.

My first attempt to include it in the collection failed.
The renaming of three.module.js with revision number caused problems. So I created a folder jsm112 for the revision.

But there was a strange error message. There was a folder “build” to be recognized. I don’t have one of those at all. Then I took out “OrbitControls” and it worked. In the module version it says further above

2020-01-02_15.12.13

This is the solution to the riddle, the source of the error! The modules are statically interdependent. I find this a big disadvantage compared to the old version.

I have to modify the file.

2020-01-02_15.29.45

But maybe I haven’t found the smartest way to do it with as little effort as possible without accessing an external site or taking over the revision completely?

But it’s working. discourse.threejs.hofk.de


:sun_with_face: Serenity is appropriate. :slightly_smiling_face:

1 Like