Methods
add(time, object) → {Scene.Keyframes}
- Source:
add object in list
Name | Type | Description |
---|---|---|
time |
Number | frame's time |
object |
Object | target |
Returns:
An instance itself
- Type
- Scene.Keyframes
forEach(callback) → {Scene.Keyframes}
- Source:
executes a provided function once for each scene item.
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function | Function to execute for each element, taking three arguments
Properties
|
Returns:
An instance itself
- Type
- Scene.Keyframes
get(time) → {Object}
- Source:
get object at that time.
Name | Type | Description |
---|---|---|
time |
Number | object's time |
Returns:
object at that time
- Type
- Object
getDuration() → {number}
- Source:
Get how long an animation should take to complete one cycle.
Returns:
duration
- Type
- number
getNames() → {Array.<Array.<string>>}
- Source:
A list of names
Example
keyframes.getNames(); // [["a"], ["transform", "translate"], ["transform", "scale"]]
Returns:
names
- Type
- Array.<Array.<string>>
has(time) → {Boolean}
- Source:
Check if keyframes has object at that time.
Name | Type | Description |
---|---|---|
time |
Number | object's time |
Returns:
true: if has time, false: not
- Type
- Boolean
hasName(…name) → {Boolean}
- Source:
Check if keyframes has propery's name
Name | Type | Attributes | Description |
---|---|---|---|
name |
Array.<string> |
<repeatable> |
property's time |
Example
keyframes.hasName("transform", "translate"); // true or not
Returns:
true: if has property, false: not
- Type
- Boolean
remove(time) → {Keyframes}
- Source:
remove object at that time.
Name | Type | Description |
---|---|---|
time |
Number | object's time |
Returns:
An instance itself
- Type
- Keyframes
setDuration(duration) → {Scene.Keyframes}
- Source:
Set how long an animation should take to complete one cycle.
Name | Type | Description |
---|---|---|
duration |
number | duration |
Returns:
An instance itself.
- Type
- Scene.Keyframes
size() → {Number}
- Source:
get size of list
Returns:
length of list
- Type
- Number
unshift(time) → {Scene.Keyframes}
- Source:
Set how much time you want to push ahead.
Name | Type | Description |
---|---|---|
time |
number | time |
Returns:
An instance itself.
- Type
- Scene.Keyframes
update() → {Scene.Keyframes}
- Source:
update property names used in frames.
Returns:
An instance itself
- Type
- Scene.Keyframes
updateFrame(frameopt) → {Scene.Keyframes}
- Source:
update property names used in frame.
Name | Type | Attributes | Description |
---|---|---|---|
frame |
Scene.Frame |
<optional> |
frame of that time. |
Example
keyframes.updateFrame(frame);
Returns:
An instance itself
- Type
- Scene.Keyframes