Frame

Frame

Animation's Frame

Constructor

new Frame(propertiesopt)

Source:
Name Type Default Description
properties? IObject<any> {} properties
Example
const frame = new Scene.Frame({
      display: "none"
      transform: {
          translate: "50px",
          scale: "5, 5",
      }
  });

Methods

clone() → {Frame}

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

get(…args)

Source:
get property value
Name Type Attributes Description
args Number | String | PropertyObject <repeatable>
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) → {Frame}

Source:
merge one frame to other frame.
Name Type Description
frame Frame target frame.
Example
frame.merge(frame2);
Returns:
An instance itself
Type
Frame

remove(…args) → {Frame}

Source:
remove property value
Name Type Attributes Description
args String <repeatable>
property name
Example
frame.remove("display")
Returns:
An instance itself
Type
Frame

set(…args) → {Frame}

Source:
set property
Name Type Attributes Description
args Number | String | PropertyObject <repeatable>
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
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