Class: Layer

Layer

タイムラインのレイヤーを管理するクラス
Class that manages layers in the timeline

new instance.Layer (object)

NameTypeDefaultDescription
objectobjectnulloptional

Members

characters array

レイヤー内のDisplayObject配列
DisplayObject array in layer

color string

ハイライトカラーの値
Highlight Color Value

disable boolean

表示/非表示の設定
Show/Hide settings

Default Value:
  • false

emptyCharacters array

レイヤー内の空のキーフレーム配列
Empty keyframe array in layer

guideId number | null

ガイドレイヤーのID
Guide Layer ID

Default Value:
  • null

id number

レイヤーID、MovieClip内でユニークなID
Layer ID, unique ID in MovieClip

Default Value:
  • 0

light boolean

ハイライトのon/off設定
Highlight on/off setting

Default Value:
  • false

lock boolean

レイヤーロックのon/off設定
Layer lock on/off setting

Default Value:
  • false

maskId number | null

マスクレイヤーのID
Mask Layer ID

Default Value:
  • null

mode number

レイヤーのモードの値
Layer mode value

Default Value:
  • 0

name string

レイヤー名
Layer Name

Default Value:
  • ""

totalFrame readonly

レイヤーのアクティブなトータルフレーム数
Number of active total frames in the layer

Methods

addCharacter (character)void

レイヤーにDisplayObjectを追加
Add DisplayObject to layer

NameTypeDescription
characterCharacter
Returns:
TypeDescription
void

addEmptyCharacter (character)void

空のキーフレームを追加
Add empty keyframes

NameTypeDescription
characterEmptyCharacter
Returns:
TypeDescription
void

adjustmentLocation (frame)object

現在のフレームを起点に追加できるフレームを調整して、追加できるフレームの幅を返す
Adjusts the frames that can be added starting from the current frame and returns the width of the frames that can be added

NameTypeDescription
framenumber
Returns:
TypeDescription
object

appendCharacter (frame)void

指定フレームに設置したDisplayObjectをスクリーンに配置
DisplayObject placed in the specified frame on the screen

NameTypeDefaultDescription
framenumber1optional
Returns:
TypeDescription
void

clone ()Layer

レイヤーを複製
Duplicate Layer

Returns:
TypeDescription
Layer

deleteCharacter (character_id)void

指定したIDのDisplayObjectをレイヤーから削除
Delete the DisplayObject with the specified ID from the layer

NameTypeDescription
character_idnumber
Returns:
TypeDescription
void

deleteEmptyCharacter (character)void

空のキーフレームを削除
Delete empty keyframes

NameTypeDescription
characterEmptyCharacter
Returns:
TypeDescription
void

getActiveCharacter (frame)array

指定フレームに配置されているDisplayObjectを配列で返す
Returns an array of DisplayObjects placed in the specified frame.

NameTypeDefaultDescription
framenumber1optional
Returns:
TypeDescription
array

getActiveEmptyCharacter (frame)object

指定したフレームに空のキャラクターオブジェクトがあれば返す
Returns an empty character object if one exists in the specified frame.

NameTypeDefaultDescription
framenumber1optional
Returns:
TypeDescription
object

getCharacter (character_id)Character

指定したIDのDisplayObjectを返す
Returns the DisplayObject with the specified ID

NameTypeDescription
character_idnumber
Returns:
TypeDescription
Character

getHighlightURL ()string

ハイライトカラーをセットしたsvgのパスを返す
Returns the path to the svg with highlight color set

Returns:
TypeDescription
string

initialize ()void

シーン移動時の初期起動関数
Initial startup function when moving scenes

Returns:
TypeDescription
void

reloadStyle ()void

タイムラインのCSSを再配置する
Rearranging the CSS in the Timeline

Returns:
TypeDescription
void

resetStyle ()void

レイヤーのタイムラインのスタイルを初期化
Initialize layer timeline style

Returns:
TypeDescription
void

setCharacterStyle ()void

DisplayObjectを配置したフレームのスタイルをセット
Set the style of the frame in which the DisplayObject is placed

Returns:
TypeDescription
void

setEmptyStyle ()void

空フレームのスタイルをセット
Set empty frame style

Returns:
TypeDescription
void

showIcon ()void

レイヤーのモードによってアイコンを出し分ける
Separate icons for each layer mode

Returns:
TypeDescription
void

sort (characters, frame)void

深度順に並び替え(昇順)
Sort by depth (ascending order)

NameTypeDescription
charactersarray
framenumber
Returns:
TypeDescription
void

toObject ()object

クラス内の変数をObjectにして返す
Return variables in a class as Objects

Returns:
TypeDescription
object