Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"shake" command makes the engine crash #29

Closed
Kozelek opened this issue Mar 24, 2017 · 1 comment
Closed

"shake" command makes the engine crash #29

Kozelek opened this issue Mar 24, 2017 · 1 comment
Assignees

Comments

@Kozelek
Copy link

Kozelek commented Mar 24, 2017

When using the "shake" command like this:

. shake @backgrounds, dx 20

The game crashes with this error:

Uncaught TypeError: transform(...).then is not a function at Imagepack.DisplayObject.shake (WebStoryEngine.js:14002) at Interpreter.runCommand (WebStoryEngine.js:11754) at Interpreter.next (WebStoryEngine.js:11601) at WebStoryEngine.js:11593 DisplayObject.shake @ WebStoryEngine.js:14002 Interpreter.runCommand @ WebStoryEngine.js:11754 Interpreter.next @ WebStoryEngine.js:11601 (anonymous) @ WebStoryEngine.js:11593

It only happens when dx or dy have a value (that is, when using shake actually tries to do something)

@jsteinbeck
Copy link
Member

This is now fixed and will be part of release 2017.1.1. I had to basically re-implement the effect because the code was a little weird and I didn't know how change it (it's one of the few parts I didn't write myself).

This bug was caused by updating the transform function; when the dx attribute was set, the transform function was used like in an older version with a different API.

There's also been a change regarding the attributes:
The period attribute has been removed; instead we now have a times attribute for specifying the number of times the asset should shake back and forth.

jsteinbeck added a commit that referenced this issue Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants