pythreejs
pythreejs copied to clipboard
Stereo effect
Could someone help me set up a forked dev environment so that I can explore various stereo effects that (hopefully) will lead to a pull request? Maybe that someone could just point me in the direction of what I would need to change to make it work. Thanks in advance!
Step one, try to follow the developer install steps in the readme. If these are not sufficient, we can work through any issues and use that as a basis of improving the readme. Prerequisites for those steps are a recent installation of node.js and python, and a local clone of the git repository.
Step two, figure out what the pure three.js code that does what you want looks like. Does it need integration with the render loop? Due to the decoupled nature of pythreejs (kernel does not drive render loop), any loop integration would need to be formalized in a different way. This is probably best done as a discussion here for a first contribution. This step should probably result in a change to three-class-config.js, declaring any primitives and/or attributes needed for configuring the effect from the kernel.
Step three, write any custom JS code for translating between the serialized state and the three.js code.
Step two and step three are likely to happen in an iterative loop.
Let me know if anything here is unclear, and I'll try to help as best I can! The code base can be a little disorienting at first, since there is a lot of auto-generated code. This means the JS code has several main components:
- The code that is related to the autogeneration. This includes both the configuration code, and the code that process that into code. This is mostly in
js/scripts
- The autogenerated code (not checked in to the repo). Typically has a file extension like
.autogen.js
. - The base classes for the autogenerated code (mostly in the
js/src/_base
folder). This a lot of common functionality underpinning the translation logic from the serialized state from the kernel to three.js code. - Custom overrides and additions to the autogenerated code. This is mostly everything in
js/src
except the_base
folder. - Packaging and distribution code. Mostly in the root of
js
andjs/src
.