Comments (7)
The single renderer approach makes sense to me, and seems to be an easy upgrade if the renderer can change DOM elements.
Out of curiosity, how many instances do you have running when this occurs?
from imolecule.
About 30, each with hundreds of atoms (not sure whether that matters). I was a bit surprised, didn't seem like a crazy number.
from imolecule.
After some testing, it looks like the renderer can't be shared across different canvases, ie. everything rendered has to be in the <canvas>
div.
I'll leave the issue open in case another solution comes up, but won't be able to fix this any time soon.
from imolecule.
Do you have an idea what refactoring would be needed? I might try doing it myself.
from imolecule.
In my testing, I made a global imoleculeRenderer
variable, replaced this line with:
if (imoleculeRenderer === undefined) {
imoleculeRenderer = new THREE.WebGLRenderer({antialias: true, alpha: true});
and then swapped out instances of this.renderer
and self.renderer
with imoleculeRenderer
. This broke previous canvases, which makes sense.
Regarding whether or not there's a right way to do this, I honestly don't know. The one-renderer approach works if everything is on one canvas, but I don't think that's feasible in a notebook. Maybe there's a smart way to swap out active webGL canvases with static images?
from imolecule.
@Azag0 @patrickfuller Same problem here. Did you guys figure out any workarounds?
from imolecule.
Nothing straightforward unfortunately, at least within the constraints of the jupyter notebook.
from imolecule.
Related Issues (20)
- WebGL fallbacks HOT 2
- Multiprocessing on windows HOT 2
- 404 on local nbextensions HOT 1
- Why is the package stored in `python` instead of `imolecule`? HOT 3
- [FR] conda package HOT 3
- Color/size change for unknown elements HOT 2
- Jupyter notebook compatibility warning HOT 2
- Save snapshot HOT 7
- Displaying many structures in one notebook HOT 1
- Changing camera view HOT 3
- Changing bonding rules HOT 2
- vertexShader and fragmentShader parameters are undefined HOT 2
- ttributeError: 'module' object has no attribute 'json_formatter' HOT 4
- Not working on jupyter lab HOT 1
- 'pybel' has no attribute 'ob' HOT 12
- Issue with json_formatter.py HOT 2
- Use different format such as .xyz in Html
- How to generate the .min.js files? HOT 2
- Merged geometry rendering
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imolecule.