Tween#generateData()

generateData(frameRate, data) → {array}

This will generate an array populated with the tweened object values from start to end.
It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from.
It ignores delay and repeat counts and any chained tweens, but does include child tweens.
Just one play through of the tween data is returned, including yoyo if set.

Parameters
Name Type Argument Default Description
frameRate number <optional>
60

The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates.

data array <optional>

If given the generated data will be appended to this array, otherwise a new array will be returned.

Returns
array -

An array of tweened values.

Source code: tween/Tween.js (Line 840)
doc_phaser
2017-02-14 11:18:32
Comments
Leave a Comment

Please login to continue.