layer.states.switch(name)

Switch to a new state. This will animate the layer to the new state. By default, it will use the layer.states.animationOptions.
译:切换到一个新的状态。这将动画层到新的状态。默认情况下,它将使用layer.states.animationoptions。

Arguments(参数)

name — A string, the title of the state. 译:一个字符串,该状态的标题。

layerA = new Layer

layerA.states.add
    stateA:
        x: 500
        opacity: 0.5

layerA.states.switch("stateA")

results matching ""

    No results matching ""