new Frame(properties)
Animation's Frame
Name | Type | Description |
---|---|---|
properties |
Object | properties |
Example
const frame = new Scene.Frame({
display: "none"
transform: {
translate: "50px",
scale: "5, 5",
}
});
Methods
clone() → {Scene.Frame}
clone frame.
Example
frame.clone();
Returns:
An instance of clone
- Type
- Scene.Frame
get(args)
get property value
Name | Type | Description |
---|---|---|
args |
Number | String | Scene.PropertyObject | property name or value |
Example
frame.get("display") // => "none", "block", ....
frame.get("transform", "translate") // => "10px,10px"
has(…args)
check that has property.
Name | Type | Attributes | Description |
---|---|---|---|
args |
String |
<repeatable> |
property name |
Example
frame.has("property", "display") // => true or false
merge(frame) → {Scene.Frame}
merge one frame to other frame.
Name | Type | Description |
---|---|---|
frame |
Scene.Frame | target frame. |
Example
frame.merge(frame2);
Returns:
An instance itself
- Type
- Scene.Frame
remove(…args) → {Scene.Frame}
remove property value
Name | Type | Attributes | Description |
---|---|---|---|
args |
String |
<repeatable> |
property name |
Example
frame.remove("display")
Returns:
An instance itself
- Type
- Scene.Frame
set(args) → {Scene.Frame}
set property
Name | Type | Description |
---|---|---|
args |
Number | String | Scene.PropertyObject | property names or values |
Example
// one parameter
frame.set({
display: "none",
transform: {
translate: "10px, 10px",
scale: "1",
},
filter: {
brightness: "50%",
grayscale: "100%"
}
});
// two parameters
frame.set("transform", {
translate: "10px, 10px",
scale: "1",
});
// three parameters
frame.set("transform", "translate", "50px");
Returns:
An instance itself
- Type
- Scene.Frame
toCSS() → {string}
Specifies an css text that coverted the frame.
Returns:
cssText
- Type
- string
toCSSObject() → {object}
Specifies an css object that coverted the frame.
Returns:
cssObject
- Type
- object