moorepants / learn-multibody-dynamics

Interactive computational book on multibody dynamics
https://moorepants.github.io/learn-multibody-dynamics/
Other
123 stars 29 forks source link

pythreejs animation is not displaying in the HTML version anymore #149

Closed moorepants closed 10 months ago

moorepants commented 1 year ago

image

https://moorepants.github.io/learn-multibody-dynamics/visualization.html

Weird given that I have the software mostly, if not all, pinned.

moorepants commented 1 year ago

JS console shows:

Error serializing widget state attribute:  camera 2 [embed-amd.js:69:154956](https://unpkg.com/@jupyter-widgets/html-manager@%5E0.20.1/dist/embed-amd.js)
    serialize https://unpkg.com/@jupyter-widgets/html-manager@^0.20.1/dist/embed-amd.js:69
    o https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    c https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _settlePromiseFromHandler https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _settlePromise https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _settlePromise0 https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _settlePromises https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _fulfill https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _resolveCallback https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _settlePromiseFromHandler https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _settlePromise https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _settlePromise0 https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _settlePromises https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _fulfill https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _resolve https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _promiseFulfilled https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _settlePromise https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _fulfillPromises https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _settlePromises https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    l https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    s https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    _drainQueues https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
    drainQueues https://unpkg.com/jupyter-threejs@^2.1.0/dist/index.js:2
Unhandled rejection e.prototype.serialize@https://unpkg.com/@jupyter-widgets/html-manager@%5E0.20.1/dist/embed-amd.js:69:154885
5938/createModel/o<@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:841610
c@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:78248
6624/n/<[22]</t.exports/O.prototype._settlePromiseFromHandler@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:51172
6624/n/<[22]</t.exports/O.prototype._settlePromise@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:51972
6624/n/<[22]</t.exports/O.prototype._settlePromise0@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:52671
6624/n/<[22]</t.exports/O.prototype._settlePromises@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:54023
6624/n/<[22]</t.exports/O.prototype._fulfill@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:53041
6624/n/<[22]</t.exports/O.prototype._resolveCallback@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:49916
6624/n/<[22]</t.exports/O.prototype._settlePromiseFromHandler@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:51326
6624/n/<[22]</t.exports/O.prototype._settlePromise@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:51972
6624/n/<[22]</t.exports/O.prototype._settlePromise0@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:52671
6624/n/<[22]</t.exports/O.prototype._settlePromises@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:54023
6624/n/<[22]</t.exports/O.prototype._fulfill@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:53041
6624/n/<[23]</t.exports/s.prototype._resolve@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:57638
6624/n/<[23]</t.exports/s.prototype._promiseFulfilled@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:57979
6624/n/<[22]</t.exports/O.prototype._settlePromise@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:52073
6624/n/<[22]</t.exports/O.prototype._fulfillPromises@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:53546
6624/n/<[22]</t.exports/O.prototype._settlePromises@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:54075
l@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:5296
s@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:5236
6624/n/<[2]</a.prototype._drainQueues@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:6362
6624/n/<[2]</a/this.drainQueues@https://unpkg.com/jupyter-threejs@%5E2.1.0/dist/index.js:2:5169

Maybe somehow the js libs are not pinned.

moorepants commented 1 year ago

I'm pretty sure I saw this working in the last couple of weeks, so it is a recent change.

moorepants commented 1 year ago

ipywidgets released a new release on March 21, which broke pythreejs in some ways it seems.

moorepants commented 1 year ago

I tried this 39c2b2e as it fixes it when just running a notebook, but it doesn't seem to fix things in the jupyter-sphinx page.

moorepants commented 1 year ago

Sounds like a similar issue: https://github.com/jupyter-widgets/ipywidgets/issues/3754

moorepants commented 1 year ago

It was pointed out to me that the animations now work:

image

I haven't done anything on my end to fix this. Very unusual why it just started working again.

Peter230655 commented 1 year ago

For what it's worth: pythreejs never stopped working on my iPad. Since I thought this was a quirk of my Jupyter notebook app, I did not think it was worth to report. Had not tried on my desk top PC.

moorepants commented 10 months ago

This starting working again with no change on our end. I can only guess it was some fix applied to the jupyter/pythreejs cdn hosted files. Closing.