vertexShader and fragmentShader parameters are undefined
Closed this issue · 2 comments
Hi,
I cannot see the molecule (latest IPython git, self-compiled openbabel, Python 3).
I get two errors in console about vertexShader and fragmentShader being not defined from THREE.Material.
Hi,
I have the same exact setup, and it works for me. Proof:
The vertexShader
and fragmentShader
are important parts of three.js, which imolecule is built on top of. This error doesn't indicate the underlying issue, so we'll have to guess and check.
I'd start by installing imolecule without openbabel / rdkit:
pip install imolecule
Then, test my example code in a notebook:
import imolecule
imolecule.draw("c1ccccc1")
If that doesn't work, try manually updating the minified js file:
cd ~/.ipython/nbextensions
ls # should see imolecule.min.js
wget https://raw.githubusercontent.com/patrickfuller/imolecule/master/js/build/imolecule.min.js
Then, restart the notebook kernel, and re-run the imolecule code. Let me know how this goes!
I got it working by:
- using the build.py of threejs to create the minify (I did that before you told about uglifyJS)
- using the last version of threejs
I wonder what was wrong, but I was playing with a lot of libraries at the same time so maybe threejs was already loaded from somewhere else…