Closed BradyAJohnston closed 3 years ago
@BradyAJohnston , Thanks! I haven't review the code yet, so here just is a quick reply.
To add the speed option, I had to change the actual 3dmol.js library.
The speed option of spin is very cool! And this is a very important feature, so I think it would better to implement in an independent Pull Request.
Another thing is that how about considering submit a PR to the original repository? So we don't need to pay too much efforts to solves those conflicts when we update the JavaScript library in {r3dmol}
.
Speed option for this.spin()
is now merged into master of 3Dmol.js
Speed option for
this.spin()
is now merged into master of 3Dmol.js
Thanks, but it would be better to split the enhancement of m_spin
to another PR. You could create an issue about this feature enhancement.
Before that, It's also need to upgrade 3dmol.js
in {r3dmol}
to the latest version (now it's v1.5.4). I will upgrade the dependency at soon as possible, or an upgrade PR is also welcomed!
I've worked on a couple of things here:
m_bio3d()
function is handled, which provides a 5x speed improvement when loading structures (especially obvious with multi-frame files).m_set_style()
,m_add_style()
andsel()
for quicker / easier defaultsspeed
option form_spin()
.To add the speed option, I had to change the actual
3dmol.js
library. I did this manually, including adding to the*.min.js
libraries. I figure this is bad practice, but I didn't know how to go about it properly. The actual differences between the files are very minor (only 5 extra characters in the*.min.js
files) but because it is on a single line it shows it as all different.The actual differences are as follows:
Original
Changed