Closed abelnation closed 6 years ago
FYI, the examples directory contains js that assumes the THREE
global variable exists as in old versions. This is why we defined THREE globally at the top of the jupyter-threejs
file.
Besides, since we already go through a webpack bundling, one should be able to replace the amd
style define
syntax with a commonjs syntax in jupyter-threejs.js
@SylvainCorlay If the number of three wrapped classes grows, it will be helpful to split them out to separate files, i.e. jupyter-threejs.js
would get very very large.
I've removed the THREE requires from the submodules. The top-level index.js
makes sure to require THREE
and then set window.THREE
.
Is it OK to close this as outdated?
This is a WIP PR to demonstrate how I'd like to refactor the js code-base of pythreejs. I've only included a couple of modules to demonstrate the idea.
The reorganization would:
The
index.js
files in both thesrc
dir and all subdirs can be automatically generated using the includedscripts/write-index-files.js
script.@jasongrout @SylvainCorlay