Global

Members

(constant) CheapCode

Source:
See:
  • io.odysz.sworkflow.CheapException

(constant) chpEnumReq

See semantic.workflow/io.odysz.sworkflow.EnginDesign.Req
Source:

(constant) stree_t

define t that can be understood by stree.serv
Source:

Methods

dispose()

`delete` all "own" properties. Call this when the `Tweenable` instance is no longer needed to free memory.
Source:

get() → {Object}

Source:
Returns:
The current state.
Type
Object

getIv128() → {Array.<byte>}

get byte[] of random 128bits iv
Source:
Returns:
iv
Type
Array.<byte>

(static) interpolate(from, targetState, position, easing, opt_delayopt) → {Object}

Compute the midpoint of two Objects. This method effectively calculates a specific frame of animation that `{{#crossLink "Tweenable/tween:method"}}{{/crossLink}}` does many times over the course of a full tween. var interpolatedValues = Tweenable.interpolate({ width: '100px', opacity: 0, color: '#fff' }, { width: '200px', opacity: 1, color: '#000' }, 0.5); console.log(interpolatedValues); // {opacity: 0.5, width: "150px", color: "rgb(127,127,127)"}
Parameters:
Name Type Attributes Description
from Object The starting values to tween from.
targetState Object The ending values to tween to.
position number The normalized position value (between `0.0` and `1.0`) to interpolate the values between `from` and `to` for. `from` represents `0` and `to` represents `1`.
easing Object.<(string|function())> | string | function The easing curve(s) to calculate the midpoint against. You can reference any easing function attached to `Tweenable.prototype.formula`, or provide the easing function(s) directly. If omitted, this defaults to "linear".
opt_delay number <optional>
Optional delay to pad the beginning of the interpolated tween with. This increases the range of `position` from (`0` through `1`) to (`0` through `1 + opt_delay`). So, a delay of `0.5` would increase all valid values of `position` to numbers between `0` and `1.5`.
Source:
Returns:
Type
Object

isPlaying() → {boolean}

Source:
Returns:
Whether or not a tween is running.
Type
boolean

pause()

Pause a tween. Paused tweens can be resumed from the point at which they were paused. This is different from `{{#crossLink "Tweenable/stop:method"}}{{/crossLink}}`, as that method causes a tween to start over when it is resumed.
Source:

resume()

Resume a paused tween.
Source:

seek(millisecond)

Move the state of the animation to a specific point in the tween's timeline. If the animation is not running, this will cause the `step` handlers to be called.
Parameters:
Name Type Description
millisecond millisecond The millisecond of the animation to seek to. This must not be less than `0`.
Source:

set(state)

Parameters:
Name Type Description
state Object The current state.
Source:

setBezierFunction(name, x1, y1, x2, y2) → {function}

Create a Bezier easing function and attach it to `{{#crossLink "Tweenable/formula:property"}}Tweenable#formula{{/crossLink}}`. This function gives you total control over the easing curve. Matthew Lein's [Ceaser](http://matthewlein.com/ceaser/) is a useful tool for visualizing the curves you can make with this function.
Parameters:
Name Type Description
name string The name of the easing curve. Overwrites the old easing function on `{{#crossLink "Tweenable/formula:property"}}Tweenable#formula{{/crossLink}}` if it exists.
x1 number
y1 number
x2 number
y2 number
Source:
Returns:
The easing function that was attached to Tweenable.prototype.formula.
Type
function

setConfig(config)

Configure a tween that will start at some point in the future.
Parameters:
Name Type Description
config Object The following values are valid: - __from__ (_Object=_): Starting position. If omitted, `{{#crossLink "Tweenable/get:method"}}get(){{/crossLink}}` is used. - __to__ (_Object=_): Ending position. - __duration__ (_number=_): How many milliseconds to animate for. - __delay__ (_delay=_): How many milliseconds to wait before starting the tween. - __start__ (_Function(Object, *)_): Function to execute when the tween begins. Receives the state of the tween as the first parameter and `attachment` as the second parameter. - __step__ (_Function(Object, *, number)_): Function to execute on every tick. Receives `{{#crossLink "Tweenable/get:method"}}get(){{/crossLink}}` as the first parameter, `attachment` as the second parameter, and the time elapsed since the start of the tween as the third. This function is not called on the final step of the animation, but `finish` is. - __finish__ (_Function(Object, *)_): Function to execute upon tween completion. Receives the state of the tween as the first parameter and `attachment` as the second parameter. - __easing__ (_Object.|string|Function=_): Easing curve name(s) or function(s) to use for the tween. - __attachment__ (_*_): Cached value that is passed to the `step`/`start`/`finish` methods.
Source:

setScheduleFunction(scheduleFunction)

Set a custom schedule function. If a custom function is not set, [`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame) is used if available, otherwise [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/Window.setTimeout) is used.
Parameters:
Name Type Description
scheduleFunction function The function to be used to schedule the next frame to be rendered.
Source:

stop(gotoEndopt)

Stops and cancels a tween.
Parameters:
Name Type Attributes Description
gotoEnd boolean <optional>
If `false` or omitted, the tween just stops at its current state, and the `finish` handler is not invoked. If `true`, the tweened object's values are instantly set to the target values, and `finish` is invoked.
Source:

tween(opt_configopt)

Configure and start a tween.
Parameters:
Name Type Attributes Description
opt_config Object <optional>
Configuration object to be passed to `{{#crossLink "Tweenable/setConfig:method"}}{{/crossLink}}`.
Source:

unsetBezierFunction(name) → {function}

`delete` an easing function from `{{#crossLink "Tweenable/formula:property"}}Tweenable#formula{{/crossLink}}`. Be careful with this method, as it `delete`s whatever easing formula matches `name` (which means you can delete standard Shifty easing functions).
Parameters:
Name Type Description
name string The name of the easing function to delete.
Source:
Returns:
Type
function