supermedium / superframe

:package: A super collection of A-Frame components.
https://supermedium.com/superframe/
MIT License
1.38k stars 424 forks source link

computeState is not called #240

Closed DougReeder closed 3 years ago

DougReeder commented 5 years ago

aframe-state-component@^6.7.0 when used with A-Frame 0.9.2, does not call computeState when defined.

Unit tests fail under Node v10.15.0 under Mac OS X 10.13.0 ~/git/superframe/components/state npm run-script test

aframe-state-component@6.8.0 test /Users/doug/git/superframe/components/state karma start ./tests/karma.conf.js --browsers Firefox

11 08 2019 00:31:26.425:INFO [preprocessor.env]: Publishing variables: [ 'TEST_ENV' ] 11 08 2019 00:31:26.505:INFO [framework.browserify]: registering rebuild (autoWatch=true) 11 08 2019 00:31:26.518:WARN [watcher]: Pattern "/Users/doug/git/superframe/components/state/tests/assets/*/" does not match any file. 11 08 2019 00:31:34.375:INFO [framework.browserify]: 6158019 bytes written (7.13 seconds) 11 08 2019 00:31:34.458:INFO [framework.browserify]: bundle built 11 08 2019 00:31:34.481:WARN [karma]: No captured browser, open http://localhost:9876/ 11 08 2019 00:31:34.487:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/ 11 08 2019 00:31:34.594:INFO [launcher]: Starting browser Firefox 11 08 2019 00:31:37.746:INFO [Firefox 68.0.0 (Mac OS X 10.13.0)]: Connected on socket Qb0Z6D961y5JrYrYAAAA with id 91887013

START: Firefox 68.0.0 (Mac OS X 10.13.0) LOG: 'A-Frame Version: 0.9.2 (Date 2019-05-06, Commit #f57a1fa)' Firefox 68.0.0 (Mac OS X 10.13.0) LOG: 'three Version (https://github.com/supermedium/three.js):', '^0.102.2' Firefox 68.0.0 (Mac OS X 10.13.0) LOG: 'WebVR Polyfill Version:', '^0.10.10' state ✖ runs computeState ✔ keysToWatch ✔ renderTemplate last state ✖ initializes last state to initial state ✔ updates last state ✔ copies nested object values by value not reference ✔ clones object to last state if does not exist ...

A Glitch using aframe-state-component@^6.7.0 and A-Frame 0.9.2 also does not call computeState: To reproduce

  1. Open the Glitch https://glitch.com/edit/#!/lizard-louse
  2. Select Show app and "In a New Window"
  3. Open console in new window
  4. Use webapp UI to increase score Expected result: "computeState" and the new state are logged to the console Actual result: nothing is logged to the console
DougReeder commented 5 years ago

v6.8.0, 6.3.1 and 6.0.0 all fail for the Glitch and in my app, but 4.7.0 works correctly.

Unit tests fail in different ways for v4.7.0. vs master.

mattrei commented 5 years ago

same here

dsinni commented 5 years ago

Has anyone resorted to using a version of state that functions as it should with A-Frame 0.9.2? If so, which are you using?

dsinni commented 5 years ago

For me, seems like 6.7.0 did the trick.

dsinni commented 4 years ago

Any plans to add computeState support back?

ngokevin commented 4 years ago

Might've regressed, I'll check it out.

ngokevin commented 4 years ago

Can someone try the builds at https://github.com/supermedium/superframe/commit/37a6f1c79fc03ec991d69f1de20fd2b48dd32018

DougReeder commented 3 years ago

v7.0.0 (and v7.1.0) fix this for my production code. Thanks!