Frame

Scene. Frame

new Frame(properties)

Source:
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}

Source:
clone frame.
Example
frame.clone();
Returns:
An instance of clone
Type
Scene.Frame

get(args)

Source:
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)

Source:
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}

Source:
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}

Source:
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}

Source:
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}

Source:
Specifies an css text that coverted the frame.
Returns:
cssText
Type
string

toCSSObject() → {object}

Source:
Specifies an css object that coverted the frame.
Returns:
cssObject
Type
object