supermedium/superframe

computeState is not called

Closed this issue · 8 comments

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

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.

same here

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?

For me, seems like 6.7.0 did the trick.

Any plans to add computeState support back?

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

Can someone try the builds at 37a6f1c

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