Class: Instance

Instance

全てのライブラリの親クラス
Parent class for all libraries

new instance.Instance (object)

NameTypeDescription
objectobject

Members

defaultSymbol abstractreadonly

シンボルを指定した時の継承先を返す
Returns the inheritance destination when a symbol is specified.

folderId number

格納先のフォルダID
Destination folder ID

Default Value:
  • 0

id number

ライブラリ内のユニークな値
Unique value in the library

name string

ライブラリ名、フォルダのパスを含めた名前をユニークとして利用する
Use the name including the library name and folder path as unique

path string readonly

フォルダを含めたライブラリのパスを返す
Returns the path to the library, including folders

symbol string

Next2D Playerでのシンボルアクセス用の値
Value for symbol access in Next2D Player

type string

ライブラリの方の値、InstanceTypeクラスの固定値を参照
See the value toward the library, fixed value in the InstanceType class.

Methods

calcFilter (width, height, place)object

指定されたFilterの描画範囲を計算
Calculates the drawing range of the specified Filter

NameTypeDescription
widthnumber
heightnumber
placeobject
Returns:
TypeDescription
object

createBitmapData (width, height)next2d.display.BitmapData

幅と高さを指定して、BitmapDataクラスを生成
Generate BitmapData class by specifying width and height

NameTypeDescription
widthnumber
heightnumber
Returns:
TypeDescription
next2d.display.BitmapData

createContainer (instance, place)next2d.display.Sprite

BitmapDataに渡すSpriteを生成
Generate Sprite to be passed to BitmapData

NameTypeDescription
instanceDisplayObject
placeobject
Returns:
TypeDescription
next2d.display.Sprite

createInstance ()* abstract

Next2DのDisplayObjectを生成
Generate Next2D DisplayObject

Returns:
TypeDescription
*

getBounds (matrix)object abstract

表示領域(バウンディングボックス)のObjectを返す
Returns the Object of the display area (bounding box)

NameTypeDefaultDescription
matrixarraynulloptional
Returns:
TypeDescription
object

getPathWithWorkSpace (work_space)string

指定したワークスペースからPathを取得
Get Path from the specified workspace

NameTypeDescription
work_spaceWorkSpace
Returns:
TypeDescription
string

getPreview ()HTMLImageElement

プレビュー用のImageクラスを生成
Generate Image class for preview

Returns:
TypeDescription
HTMLImageElement

initialize ()void abstract

初期起動関数
initial invoking function

Returns:
TypeDescription
void

remove ()void

ライブラリからの削除処理、配置先からも削除を行う
Process deletion from the library and also from the placement site.

Returns:
TypeDescription
void

showController (place, name)

このアイテムが設定されたDisplayObjectが選択された時
内部情報をコントローラーに表示する
When a DisplayObject with this item set is selected,
internal information is displayed on the controller.

NameTypeDefaultDescription
placeobject
namestring""optional

toImage (width, height, place, range, static_frame)HTMLImageElement

Next2DのBitmapDataクラスを経由してImageクラスを生成
Generate Image class via Next2D BitmapData class

NameTypeDefaultDescription
widthnumber
heightnumber
placeobject
rangeobjectnulloptional
static_framenumber0optional
Returns:
TypeDescription
HTMLImageElement

toObject ()object abstract

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

Returns:
TypeDescription
object

toPublish ()object abstract

書き出し用のObjectを返す
Returns an Object for export

Returns:
TypeDescription
object