This is the bit where I out myself as a total WP noob (because that’s exactly what I am).
I’m trying to embed a WebGL viewer of a molecular graphics simulation called 3Dmol.js. I’ve been trying to follow the instructions from the developers’ website (http://3dmol.csb.pitt.edu/doc/tutorial-embeddable.html) but all I get is a blank block in my website. What I want is the code below to display the viewer:
<script src="http://3Dmol.csb.pitt.edu/build/3Dmol-min.js" async></script> <div style="height: 400px; width: 400px; position: relative;" class='viewer_3Dmoljs' data-pdb='2POR' data-backgroundcolor='0xffffff' data-style='stick'></div>
When I write the above lines as a standalone HTML file, it works brilliantly, but when I try to emded it it fails. I’ve tried putting the script src in a header, to no avail. I’ve tried enclosing it in pre tags, to no avail. I think there’s just something preventing the viewer from displaying that I can’t figure out. Any ideas? TIA.
The page I need help with: [log in to see the link]
- The topic ‘Embedding WebGL using external JS’ is closed to new replies.