Constructor
new Model()
- Source:
Example
function start(){
console.log("parameters",model.parameters.length)
console.log("parts",model.parts.length)
console.log("drawables",model.drawables.length)
console.log("motions",model.motions.length)
console.log("expressions",model.expressions.length)
}
Members
drawables :Array.<Drawable>
描画オブジェクトの一覧
Type:
- Array.<Drawable>
- Source:
expressions :Array.<Expression>
表情(exp3.json)の一覧
Type:
- Array.<Expression>
- Source:
motions :Array.<Motion>
モーション(motion3.json)の一覧
Type:
- Array.<Motion>
- Source:
multiplyColor :Color
乗算色
Type:
- Source:
Example
function start(){
model.multiplyColor="#00ff00"
console.log(model.multiplyColor)
}
parameters :Array.<Parameter>
パラメータの一覧
Type:
- Array.<Parameter>
- Source:
parts :Array.<Part>
パーツの一覧
Type:
- Array.<Part>
- Source:
screenColor :Color
スクリーン色
Type:
- Source:
Example
function start(){
model.screenColor="#ff0000"
console.log(model.screenColor)
}
Methods
drawable(id) → {Drawable}
描画オブジェクトを取得する。
Parameters:
Name | Type | Description |
---|---|---|
id |
string | IDが無い場合は名前で検索する |
- Source:
Returns:
- Type
- Drawable
expression(name) → {Expression}
表情を取得する。
Parameters:
Name | Type | Description |
---|---|---|
name |
string | ファイル名またはmodel3.jsonに記載の名前 |
- Source:
Returns:
- Type
- Expression
motion(name) → {Motion}
モーションを取得する。
Parameters:
Name | Type | Description |
---|---|---|
name |
string |
- Source:
Returns:
- Type
- Motion
move(param)
モデルを移動する
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | 設定オブジェクト。
Properties
|
- Source:
Example
model.move({
Rotation: 90,
Delay: 3
})
parameter(id) → {Parameter}
パラメータを取得する。
Parameters:
Name | Type | Description |
---|---|---|
id |
string | IDが無い場合は名前で検索する |
- Source:
Returns:
- Type
- Parameter
part(id) → {Part}
パーツを取得する。
Parameters:
Name | Type | Description |
---|---|---|
id |
string | IDが無い場合は名前で検索する |
- Source:
Returns:
- Type
- Part
stopMotion()
再生中のモーションを終了する関数
- Source: