Type Definitions
AudioAssetId
同じIDグループ内で重複しない任意の数値や文字列を設定する
\
\
Type:
- number | string
- Source:
Example
"ring_sound" or "explose_effect" or "click1" etc
Color
色指定文字列
Type:
- string
- Source:
- See:
Example
"blue","red","green" etc
DeviceContext
CanvasRenderingContext2D
Type:
- CanvasRenderingContext2D
- Source:
- See:
FontLocateImg
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
Img |
img | ASCIIFontImage or KANJIFontImage |
x |
number | x-position |
y |
number | y-position |
w |
number | width |
h |
number | height |
type |
number | 0:ASCII 1:半角カナ 2:漢字(SHIFT-JIS) |
- Source:
FontParam
PCGpatternMap
Type:
- object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name |
string | フォントID | ||
id |
ImageAssetId | 使用するイメージアセットID | ||
pattern[].x |
number | 切り取り開始位置X | ||
pattern[].y |
number | 切り取り開始位置Y | ||
pattern[].w |
number | 文字幅 | ||
pattern[].h |
number | 文字高さ | ||
ucc |
boolean |
<optional> |
false | UseControlCharFlag |
- Source:
FontTextStyle
CSS の font の記述子と同じ構文
Type:
- string
Example
"bold 48px serif"
GameCoreSysParam
-複数のScreenを設定可能、
-対象指定時、順番にgame.screen[0], game.screen[1] ... となる
-定数値にして名前を付けた方が管理が判りやすくなります
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
canvasId |
string | canvasDOM Id |
screen[].resolution.w |
number | screen width pixelsize |
screen[].resolution.h |
number | screen height pixelsize |
screen[].resolution.x |
number | screen offset x |
screen[].resolution.y |
number | screen offset y |
- Source:
Example
const GameCoreSysParam = {
CanvasId:"canvas",
screen: [
{resolution: {w:1024, h:768, x:0, y:0}},
{resolution: {w:1024, h:768, x:0, y:0}}
]
}
Gamepad
Gamepadオブジェクト
Type:
- object
ImageAssetId
同じIDグループ内で重複しない任意の数値や文字列を設定する
\
\
Type:
- number | string
- Source:
- To Do:
-
- 手間を省くために自動で生成するuniqIDManagerとか作ってもよいかもしれない
Example
"picture_sprite" or "asciifont" or "mycharactor" etc
Img
ImageData
Type:
- HTMLImageElement
- Source:
- See:
PutFuncCustomDraw
CanvasMethodを登録して表示させる。 device: {DeviceContext}
CustomDrawObject
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
draw |
function | 必須 {DeviceContext}を引数に呼び出される |
any |
* | 任意のプロパティ |
- Source:
Example
cl = { x: 100, y:100, r:30, c:"red",
draw:(d)=>{
d.beginPath();
d.strokeStyle = this.c;
d.lineWidth = 1;
d.arc(this.x, this.y, this.r, 0, 2 * Math.PI, false);
d.stroke();
}
}
TaskId
同じIDグループ内で重複しない任意の数値や文字列を設定する
\
\
Type:
- number | string
- Source:
Example
"main" or "root" or "system" etc
lfoParam
LFO setup Paramater
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
Freq |
number | LFO周波数 |
wavetype |
waveTypeString | LFOの波形タイプ |
depth |
number | LFO depth |
- Source:
Example
{Freq:0, wavetype:"none", depth:0};
mouseState
マウス状態
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
x |
number | x座標 |
y |
number | y座標 |
button |
number | ボタン状態 |
wheel |
number | ホイール移動量 |
- Source:
Example
button -1:何も押してない 0:左ボタン 2:右ボタン 1:ホイール
noteParam
PlayNoteParamater(UtiltyGenerate)
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
noteText |
string | NoteName A0-A8 |
Freq |
number | Frequency |
Vol |
number | NoteVolume |
time |
number | NoteLengthTime |
use |
boolean | use check flag |
- Source:
numberVolume
ボリュームパラメータ: 0.0から1.0の範囲内で指定すること
Type:
- number
- Source:
Example
(bitween 0.0~1.0)
resultLog
計測結果
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
fps |
number | FPS |
logpointer |
number | ログ配列の最新更新値へのインデックス値 |
interval.log |
Array.<number> | フレーム時間ログ |
interval.max |
number | 最大値 |
interval.min |
number | 最小値 |
interval.ave |
number | 平均値 |
workload.log |
Array.<number> | 負荷ログ |
workload.max |
number | 最大値 |
workload.min |
number | 最小値 |
workload.ave |
number | 平均値 |
- Source:
spPatternParam
スプライトパターン定義パラメータ
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
image |
ImageAssetId | イメージアセットID |
wait |
number | アニメーション変更間隔(フレーム数) |
pattern[].x |
number | イメージ範囲指定x |
pattern[].y |
number | イメージ範囲指定y |
pattern[].w |
number | イメージ範囲指定w |
pattern[].h |
number | イメージ範囲指定h |
pattern[].r |
number | 向き(0-359)上基準 |
pattern[].fv |
boolean | trueで上下反転 |
pattern[].fh |
boolean | trueで左右反転 |
- Source:
Example
const spPatternParam = {
image: "dummy",
wait: 0,
pattern: [
{ x: 0, y: 0, w: 0, h: 0, r: 0, fv: false, fh: false },
{ x: 0, y: 0, w: 0, h: 0, r: 0, fv: false, fh: false }
]
};
spPtnId
スプライトアニメーションパターンの登録ID
\ 同じIDグループ内で重複しない任意の数値や文字列を設定する
\
\ 同じIDグループ内で重複しない任意の数値や文字列を設定する
\
Type:
- number | string
- Source:
touchpadState
タッチパネル状態
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
pos |
Array.<object> | |
pos[].x |
number | x座標 |
pos[].y |
number | y座標 |
pos[].id |
number | touch.identifier |
vPadState
仮想ゲームパッド状態
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
deg |
number | 仮想パッド方向 |
button |
Array.<boolean> | 仮想ボタン押下状態 |
distance |
number | 仮想パッド距離 |
- Source:
viewportResult
ワールド座標から実画面座標に変換
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
x |
number | 表示領域内での座標X |
y |
number | 表示領域内での座標Y |
in |
boolean | 表示領域内+余白の中かどうか |
- Source:
waveTypeString
- 以下の文字列を設定する
\ - "sine":サイン波
\ - "square":矩形波
\ - "sawtooth":ノコギリ波
\ - "triangle":三角波
\ - "none":なし(LFOの波形タイプを選択時のみ)
\
\ - "sine":サイン波
\ - "square":矩形波
\ - "sawtooth":ノコギリ波
\ - "triangle":三角波
\ - "none":なし(LFOの波形タイプを選択時のみ)
\
Type:
- string
- Source:
Example
"sine" or "square" or "sawtooth" or "triangle" or "none"
wavetypeNumber
- 以下の数値で設定する
\ - 0: サイン波
\ - 1: 矩形波
\ - 2: ノコギリ波
\ - 3: 三角波
\
\ - 0: サイン波
\ - 1: 矩形波
\ - 2: ノコギリ波
\ - 3: 三角波
\
Type:
- number
- Source:
Example
0:"sine", 1:"square", 2:"sawtooth", 3:"triangle"