@akashic/akashic-engine
Advanced tools
Comparing version 3.0.0-beta.24 to 3.0.0-beta.25
# ChangeLog | ||
## 3.0.0-beta.25 | ||
仕様変更 | ||
* `g.TextBaseline` を廃止 | ||
## 3.0.0-beta.24 | ||
@@ -4,0 +9,0 @@ |
@@ -24,2 +24,3 @@ "use strict"; | ||
this._suppressed = false; | ||
this._muted = false; | ||
this._resourceFactory = param.resourceFactory; | ||
@@ -128,4 +129,4 @@ this._updateMuted(); | ||
if (this._player) { | ||
this._player.onPlay.remove({ owner: this, func: this._handlePlay }); | ||
this._player.onStop.remove({ owner: this, func: this._handleStop }); | ||
this._player.onPlay.remove(this._handlePlay, this); | ||
this._player.onStop.remove(this._handleStop, this); | ||
} | ||
@@ -190,3 +191,4 @@ this._player = undefined; | ||
for (var i = 0; i < this.players.length; ++i) { | ||
if (this.players[i].currentAudio && this.players[i].currentAudio.id === asset.id) | ||
var currentAudio = this.players[i].currentAudio; | ||
if (currentAudio && currentAudio.id === asset.id) | ||
ret.push(this.players[i]); | ||
@@ -209,4 +211,4 @@ } | ||
var player = this.players[i]; | ||
player.onPlay.remove({ owner: this, func: this._handlePlay }); | ||
player.onStop.remove({ owner: this, func: this._handleStop }); | ||
player.onPlay.remove(this._handlePlay, this); | ||
player.onStop.remove(this._handleStop, this); | ||
} | ||
@@ -249,3 +251,3 @@ this.players = []; | ||
return; | ||
e.player.onStop.remove({ owner: this, func: this._handleStop }); | ||
e.player.onStop.remove(this._handleStop, this); | ||
this.players.splice(index, 1); | ||
@@ -252,0 +254,0 @@ if (this._destroyRequestedAssets[e.audio.id]) { |
@@ -38,2 +38,3 @@ import { GlyphArea, GlyphLike } from "../pdi-types/GlyphLike"; | ||
* `map` で指定を省略した文字に使われる、デフォルトの文字の幅。 | ||
* この値を省略した場合、 map の持つ全ての GlyphArea は width を持たなければならない。そうでない場合の動作は不定である。 | ||
*/ | ||
@@ -43,2 +44,3 @@ defaultGlyphWidth?: number; | ||
* `map` で指定を省略した文字に使われる、デフォルトの文字の高さ | ||
* この値を省略した場合、 map の持つ全ての GlyphArea は height を持たなければならない。そうでない場合の動作は不定である。 | ||
*/ | ||
@@ -62,3 +64,3 @@ defaultGlyphHeight?: number; | ||
}; | ||
missingGlyph: GlyphArea; | ||
missingGlyph: GlyphArea | undefined; | ||
size: number; | ||
@@ -65,0 +67,0 @@ /** |
@@ -29,2 +29,3 @@ "use strict"; | ||
var _this = _super.call(this) || this; | ||
// @ts-ignore | ||
_this.surface = SurfaceUtil_1.SurfaceUtil.asSurface(param.src); | ||
@@ -39,7 +40,7 @@ if (param.glyphInfo) { | ||
else { | ||
_this.map = param.map; | ||
_this.defaultGlyphWidth = param.defaultGlyphWidth; | ||
_this.defaultGlyphHeight = param.defaultGlyphHeight; | ||
_this.map = param.map || {}; | ||
_this.defaultGlyphWidth = param.defaultGlyphWidth || 0; | ||
_this.defaultGlyphHeight = param.defaultGlyphHeight || 0; | ||
_this.missingGlyph = param.missingGlyph; | ||
_this.size = param.defaultGlyphHeight; | ||
_this.size = param.defaultGlyphHeight || 0; | ||
} | ||
@@ -46,0 +47,0 @@ return _this; |
@@ -38,3 +38,3 @@ import { RendererLike } from "../pdi-types/RendererLike"; | ||
*/ | ||
name: string; | ||
name: string | undefined; | ||
/** | ||
@@ -41,0 +41,0 @@ * @private |
@@ -100,2 +100,4 @@ "use strict"; | ||
Camera2D.prototype._updateMatrix = function () { | ||
if (!this._matrix) | ||
return; | ||
// カメラの angle, x, y はエンティティと逆方向に作用することに注意。 | ||
@@ -102,0 +104,0 @@ if (this.angle || this.scaleX !== 1 || this.scaleY !== 1 || this.anchorX !== 0 || this.anchorY !== 0) { |
@@ -196,3 +196,3 @@ import { FontFamily } from "../pdi-types/FontFamily"; | ||
*/ | ||
glyphForCharacter(code: number): GlyphLike; | ||
glyphForCharacter(code: number): GlyphLike | null; | ||
/** | ||
@@ -206,5 +206,5 @@ * BtimapFontの生成。 | ||
*/ | ||
asBitmapFont(missingGlyphChar?: string): BitmapFont; | ||
asBitmapFont(missingGlyphChar?: string): BitmapFont | null; | ||
destroy(): void; | ||
destroyed(): boolean; | ||
} |
@@ -83,3 +83,4 @@ "use strict"; | ||
} | ||
_this._atlasSet.addAtlas(); | ||
if (_this._atlasSet) | ||
_this._atlasSet.addAtlas(); | ||
if (_this.hint.presetChars) { | ||
@@ -144,3 +145,3 @@ for (var i = 0, len = _this.hint.presetChars.length; i < len; i++) { | ||
} | ||
var missingGlyphCharCodePoint; | ||
var missingGlyphCharCodePoint = null; | ||
if (missingGlyphChar) { | ||
@@ -171,2 +172,3 @@ missingGlyphCharCodePoint = Util_1.Util.charCodeAt(missingGlyphChar, 0); | ||
// そのために this.size をコンストラクタの第4引数に与えることにする。 | ||
// @ts-ignore | ||
var missingGlyph = glyphAreaMap[missingGlyphCharCodePoint]; | ||
@@ -193,4 +195,4 @@ var atlas = this._atlasSet.getAtlas(0); | ||
} | ||
this._glyphs = null; | ||
this._glyphFactory = null; | ||
this._glyphs = undefined; | ||
this._glyphFactory = undefined; | ||
this._destroyed = true; | ||
@@ -197,0 +199,0 @@ }; |
@@ -108,2 +108,3 @@ "use strict"; | ||
// set id, scene | ||
// @ts-ignore NOTE: Game クラスで割り当てられるため、ここでは undefined を許容している | ||
_this.id = param.id; | ||
@@ -110,0 +111,0 @@ param.scene.register(_this); |
@@ -96,3 +96,3 @@ import { GlyphLike } from "../../pdi-types/GlyphLike"; | ||
*/ | ||
maxWidth: number; | ||
maxWidth: number | undefined; | ||
/** | ||
@@ -112,3 +112,3 @@ * `width` プロパティを `this.text` の描画に必要な幅で自動的に更新するかを表す。 | ||
*/ | ||
textColor: string; | ||
textColor: string | undefined; | ||
/** | ||
@@ -115,0 +115,0 @@ * @private |
@@ -92,3 +92,3 @@ "use strict"; | ||
} | ||
var scale = this.maxWidth > 0 && this.maxWidth < this._textWidth ? this.maxWidth / this._textWidth : 1; | ||
var scale = this.maxWidth && this.maxWidth > 0 && this.maxWidth < this._textWidth ? this.maxWidth / this._textWidth : 1; | ||
var offsetX = 0; | ||
@@ -95,0 +95,0 @@ switch (this._realTextAlign) { |
@@ -35,2 +35,3 @@ "use strict"; | ||
else { | ||
// @ts-ignore | ||
_this._surface = SurfaceUtil_1.SurfaceUtil.asSurface(param.src); | ||
@@ -128,2 +129,3 @@ } | ||
else { | ||
// @ts-ignore | ||
this._surface = SurfaceUtil_1.SurfaceUtil.asSurface(this.src); | ||
@@ -130,0 +132,0 @@ } |
@@ -48,4 +48,4 @@ import { CommonOffset } from "../pdi-types/commons"; | ||
export interface PointSourceBase<T extends PointTarget> { | ||
target: T; | ||
point: CommonOffset; | ||
target: T | undefined; | ||
point: CommonOffset | undefined; | ||
local?: boolean; | ||
@@ -75,7 +75,7 @@ } | ||
local: boolean; | ||
player: Player; | ||
player: Player | undefined; | ||
pointerId: number; | ||
point: CommonOffset; | ||
target: T; | ||
constructor(pointerId: number, target: T, point: CommonOffset, player?: Player, local?: boolean, priority?: number); | ||
target: T | undefined; | ||
constructor(pointerId: number, target: T | undefined, point: CommonOffset, player?: Player, local?: boolean, priority?: number); | ||
} | ||
@@ -87,3 +87,3 @@ /** | ||
type: "point-down"; | ||
constructor(pointerId: number, target: T, point: CommonOffset, player?: Player, local?: boolean, priority?: number); | ||
constructor(pointerId: number, target: T | undefined, point: CommonOffset, player?: Player, local?: boolean, priority?: number); | ||
} | ||
@@ -102,3 +102,3 @@ /** | ||
prevDelta: CommonOffset; | ||
constructor(pointerId: number, target: T, point: CommonOffset, prevDelta: CommonOffset, startDelta: CommonOffset, player?: Player, local?: boolean, priority?: number); | ||
constructor(pointerId: number, target: T | undefined, point: CommonOffset, prevDelta: CommonOffset, startDelta: CommonOffset, player?: Player, local?: boolean, priority?: number); | ||
} | ||
@@ -120,3 +120,3 @@ /** | ||
prevDelta: CommonOffset; | ||
constructor(pointerId: number, target: T, point: CommonOffset, prevDelta: CommonOffset, startDelta: CommonOffset, player?: Player, local?: boolean, priority?: number); | ||
constructor(pointerId: number, target: T | undefined, point: CommonOffset, prevDelta: CommonOffset, startDelta: CommonOffset, player?: Player, local?: boolean, priority?: number); | ||
} | ||
@@ -131,3 +131,3 @@ /** | ||
local: boolean; | ||
player: Player; | ||
player: Player | undefined; | ||
data: any; | ||
@@ -144,3 +144,3 @@ constructor(data: any, player?: Player, local?: boolean, priority?: number); | ||
local: boolean; | ||
player: Player; | ||
player: Player | undefined; | ||
code: number; | ||
@@ -158,3 +158,3 @@ data: any; | ||
player: Player; | ||
storageValues: StorageValueStore; | ||
storageValues: StorageValueStore | undefined; | ||
constructor(player: Player, storageValues?: StorageValueStore, priority?: number); | ||
@@ -161,0 +161,0 @@ } |
@@ -27,4 +27,5 @@ "use strict"; | ||
function PointEventBase(pointerId, target, point, player, local, priority) { | ||
// @ts-ignore TODO: priority のデフォルト値の扱い | ||
this.priority = priority; | ||
this.local = local; | ||
this.local = !!local; | ||
this.player = player; | ||
@@ -101,4 +102,5 @@ this.pointerId = pointerId; | ||
this.type = "message"; | ||
// @ts-ignore TODO: priority のデフォルト値の扱い | ||
this.priority = priority; | ||
this.local = local; | ||
this.local = !!local; | ||
this.player = player; | ||
@@ -117,4 +119,5 @@ this.data = data; | ||
this.type = "operation"; | ||
// @ts-ignore TODO: priority のデフォルト値の扱い | ||
this.priority = priority; | ||
this.local = local; | ||
this.local = !!local; | ||
this.player = player; | ||
@@ -134,2 +137,3 @@ this.code = code; | ||
this.type = "join"; | ||
// @ts-ignore TODO: priority のデフォルト値の扱い | ||
this.priority = priority; | ||
@@ -149,2 +153,3 @@ this.player = player; | ||
this.type = "leave"; | ||
// @ts-ignore TODO: priority のデフォルト値の扱い | ||
this.priority = priority; | ||
@@ -162,2 +167,3 @@ this.player = player; | ||
this.type = "timestamp"; | ||
// @ts-ignore TODO: priority のデフォルト値の扱い | ||
this.priority = priority; | ||
@@ -177,2 +183,3 @@ this.player = player; | ||
this.type = "player-info"; | ||
// @ts-ignore TODO: priority のデフォルト値の扱い | ||
this.priority = priority; | ||
@@ -193,2 +200,3 @@ this.playerId = playerId; | ||
this.type = "seed"; | ||
// @ts-ignore TODO: priority のデフォルト値の扱い | ||
this.priority = priority; | ||
@@ -195,0 +203,0 @@ this.generator = generator; |
@@ -31,2 +31,3 @@ "use strict"; | ||
var playerId = pev[2 /* PlayerId */]; | ||
// @ts-ignore | ||
var player = this._playerTable[playerId] || { id: playerId }; | ||
@@ -39,5 +40,8 @@ switch (eventCode) { | ||
}; | ||
// @ts-ignore | ||
if (this._playerTable[playerId] && this._playerTable[playerId].userData != null) { | ||
// @ts-ignore | ||
player.userData = this._playerTable[playerId].userData; | ||
} | ||
// @ts-ignore | ||
this._playerTable[playerId] = player; | ||
@@ -64,2 +68,3 @@ var store = undefined; | ||
var userData = pev[4 /* UserData */]; | ||
// @ts-ignore | ||
this._playerTable[playerId] = { | ||
@@ -70,2 +75,3 @@ id: playerId, | ||
}; | ||
// @ts-ignore | ||
return new Event_1.PlayerInfoEvent(playerId, playerName, userData, prio); | ||
@@ -164,4 +170,4 @@ case 32 /* Message */: | ||
var pointDown = e; | ||
targetId = pointDown.target ? pointDown.target.id : null; | ||
playerId = preservePlayer ? pointDown.player.id : this._playerId; | ||
targetId = pointDown.target ? pointDown.target.id : undefined; | ||
playerId = preservePlayer && pointDown.player ? pointDown.player.id : this._playerId; | ||
return [ | ||
@@ -179,4 +185,4 @@ 33 /* PointDown */, | ||
var pointMove = e; | ||
targetId = pointMove.target ? pointMove.target.id : null; | ||
playerId = preservePlayer ? pointMove.player.id : this._playerId; | ||
targetId = pointMove.target ? pointMove.target.id : undefined; | ||
playerId = preservePlayer && pointMove.player ? pointMove.player.id : this._playerId; | ||
return [ | ||
@@ -198,4 +204,4 @@ 34 /* PointMove */, | ||
var pointUp = e; | ||
targetId = pointUp.target ? pointUp.target.id : null; | ||
playerId = preservePlayer ? pointUp.player.id : this._playerId; | ||
targetId = pointUp.target ? pointUp.target.id : undefined; | ||
playerId = preservePlayer && pointUp.player ? pointUp.player.id : this._playerId; | ||
return [ | ||
@@ -217,3 +223,3 @@ 35 /* PointUp */, | ||
var message = e; | ||
playerId = preservePlayer ? message.player.id : this._playerId; | ||
playerId = preservePlayer && message.player ? message.player.id : this._playerId; | ||
return [ | ||
@@ -228,3 +234,3 @@ 32 /* Message */, | ||
var op = e; | ||
playerId = preservePlayer ? op.player.id : this._playerId; | ||
playerId = preservePlayer && op.player ? op.player.id : this._playerId; | ||
return [ | ||
@@ -231,0 +237,0 @@ 64 /* Operation */, |
@@ -313,3 +313,3 @@ import * as pl from "@akashic/playlog"; | ||
*/ | ||
surfaceAtlasSet: SurfaceAtlasSetLike | undefined; | ||
surfaceAtlasSet: SurfaceAtlasSetLike; | ||
/** | ||
@@ -316,0 +316,0 @@ * 操作プラグインの管理者。 |
@@ -49,3 +49,2 @@ "use strict"; | ||
this.scenes = []; | ||
this.random = null; | ||
this.age = 0; | ||
@@ -56,2 +55,16 @@ this.assetBase = param.assetBase || ""; | ||
this.selfId = param.selfId; | ||
this.db = undefined; | ||
this.loadingScene = undefined; | ||
this.operationPlugins = undefined; | ||
this.random = undefined; | ||
this._defaultLoadingScene = undefined; | ||
this._eventConverter = undefined; | ||
this._pointEventResolver = undefined; | ||
this._idx = undefined; | ||
this._localDb = undefined; | ||
this._localIdx = undefined; | ||
this._cameraIdx = undefined; | ||
this._isTerminated = undefined; | ||
this._modified = undefined; | ||
this._postTickTasks = undefined; | ||
this.playId = undefined; | ||
@@ -63,3 +76,3 @@ this.isSkipping = false; | ||
this.assets = {}; | ||
this.surfaceAtlasSet = undefined; | ||
this.surfaceAtlasSet = new SurfaceAtlasSet_1.SurfaceAtlasSet({ resourceFactory: this.resourceFactory }); | ||
this.onJoin = new trigger_1.Trigger(); | ||
@@ -115,3 +128,3 @@ this.onLeave = new trigger_1.Trigger(); | ||
var operationPluginsField = gameConfiguration.operationPlugins || []; | ||
this.operationPluginManager = new OperationPluginManager_1.OperationPluginManager(this, param.operationPluginViewInfo, operationPluginsField); | ||
this.operationPluginManager = new OperationPluginManager_1.OperationPluginManager(this, param.operationPluginViewInfo || null, operationPluginsField); | ||
this._onOperationPluginOperated = new trigger_1.Trigger(); | ||
@@ -609,8 +622,7 @@ this._operationPluginOperated = this._onOperationPluginOperated; | ||
this._postTickTasks = []; | ||
this._eventConverter = new EventConverter_1.EventConverter({ game: this, playerId: this.selfId }); | ||
this._pointEventResolver = new PointEventResolver_1.PointEventResolver({ sourceResolver: this, playerId: this.selfId }); | ||
this._eventConverter = new EventConverter_1.EventConverter({ game: this, playerId: this.selfId }); // TODO: selfId が null のときの挙動 | ||
this._pointEventResolver = new PointEventResolver_1.PointEventResolver({ sourceResolver: this, playerId: this.selfId }); // TODO: selfId が null のときの挙動 | ||
this._isTerminated = false; | ||
this.vars = {}; | ||
if (this.surfaceAtlasSet) | ||
this.surfaceAtlasSet.destroy(); | ||
this.surfaceAtlasSet.destroy(); | ||
this.surfaceAtlasSet = new SurfaceAtlasSet_1.SurfaceAtlasSet({ resourceFactory: this.resourceFactory }); | ||
@@ -728,5 +740,3 @@ switch (this._configuration.defaultLoadingScene) { | ||
this._postTickTasks = []; | ||
if (this.surfaceAtlasSet) { | ||
this.surfaceAtlasSet.destroy(); | ||
} | ||
this.surfaceAtlasSet.destroy(); | ||
this.surfaceAtlasSet = undefined; | ||
@@ -791,3 +801,3 @@ }; | ||
this.isLoaded = true; | ||
this._onLoad.fire(); | ||
this._onLoad.fire(this); | ||
}; | ||
@@ -794,0 +804,0 @@ Game.prototype._handleOperationPluginOperated = function (op) { |
@@ -29,5 +29,5 @@ import { AssetConfigurationMap, AudioSystemConfigurationMap, ModuleMainScriptsMap } from "./AssetConfiguration"; | ||
/** | ||
* アセット宣言。ユニットテスト記述の都合上省略を許すが、通常非undefinedでしか使わない。 | ||
* アセット宣言。 | ||
*/ | ||
assets?: AssetConfigurationMap; | ||
assets: AssetConfigurationMap; | ||
/** | ||
@@ -34,0 +34,0 @@ * 操作プラグインの情報。 |
@@ -54,3 +54,3 @@ import { CommonOffset } from "../pdi-types/commons"; | ||
*/ | ||
update(width: number, height: number, scaleX: number, scaleY: number, angle: number, x: number, y: number, anchorX: number, anchorY: number): void; | ||
update(width: number, height: number, scaleX: number, scaleY: number, angle: number, x: number, y: number, anchorX: number | null, anchorY: number | null): void; | ||
/** | ||
@@ -68,3 +68,3 @@ * `update()` によって得られる行列の逆変換になるよう変換行列の値を再計算する。 | ||
*/ | ||
updateByInverse(width: number, height: number, scaleX: number, scaleY: number, angle: number, x: number, y: number, anchorX: number, anchorY: number): void; | ||
updateByInverse(width: number, height: number, scaleX: number, scaleY: number, angle: number, x: number, y: number, anchorX: number | null, anchorY: number | null): void; | ||
/** | ||
@@ -71,0 +71,0 @@ * 値を単位行列にリセットする。x/yの座標情報を初期値に反映させることも出来る。 |
@@ -18,2 +18,3 @@ "use strict"; | ||
this._matrix = new Array(6); | ||
// @ts-ignore | ||
this.update(widthOrSrc, height, scaleX, scaleY, angle, 0, 0, anchorX, anchorY); | ||
@@ -20,0 +21,0 @@ } |
@@ -32,3 +32,3 @@ import { ModuleLike } from "../pdi-types/ModuleLike"; | ||
*/ | ||
parent: ModuleLike; | ||
parent: ModuleLike | null; | ||
/** | ||
@@ -57,3 +57,3 @@ * このモジュールの読み込みが完了しているか。 | ||
*/ | ||
_virtualDirname: string; | ||
_virtualDirname: string | undefined; | ||
/** | ||
@@ -60,0 +60,0 @@ * @private |
@@ -97,2 +97,3 @@ "use strict"; | ||
if (targetScriptAsset) { | ||
// @ts-ignore | ||
if (this._scriptCaches.hasOwnProperty(resolvedPath)) | ||
@@ -109,2 +110,3 @@ return this._scriptCaches[resolvedPath]._cachedValue(); | ||
var script = new ScriptAssetContext_1.ScriptAssetContext(targetScriptAsset, module); | ||
// @ts-ignore | ||
this._scriptCaches[resolvedPath] = script; | ||
@@ -117,2 +119,3 @@ return script._executeScript(currentModule); | ||
// Note: node.jsではここでBOMの排除をしているが、いったんakashicでは排除しないで実装 | ||
// @ts-ignore | ||
var cache = (this._scriptCaches[resolvedPath] = new RequireCachedValue_1.RequireCachedValue(JSON.parse(targetScriptAsset.data))); | ||
@@ -119,0 +122,0 @@ return cache._cachedValue(); |
@@ -21,7 +21,7 @@ import { CommonRect } from "../pdi-types/commons"; | ||
*/ | ||
_surface: SurfaceLike; | ||
_surface: SurfaceLike | undefined; | ||
/** | ||
* @private | ||
*/ | ||
_beforeSrcSurface: SurfaceLike; | ||
_beforeSrcSurface: SurfaceLike | undefined; | ||
/** | ||
@@ -28,0 +28,0 @@ * `NinePatchSurfaceEffector` のインスタンスを生成する。 |
@@ -128,5 +128,7 @@ "use strict"; | ||
if (this.angle || this.scaleX !== 1 || this.scaleY !== 1 || this.anchorX !== 0 || this.anchorY !== 0) { | ||
// @ts-ignore | ||
this._matrix.update(this.width, this.height, this.scaleX, this.scaleY, this.angle, this.x, this.y, this.anchorX, this.anchorY); | ||
} | ||
else { | ||
// @ts-ignore | ||
this._matrix.reset(this.x, this.y); | ||
@@ -133,0 +135,0 @@ } |
@@ -36,3 +36,3 @@ import { Trigger } from "@akashic/trigger"; | ||
private _initialized; | ||
constructor(game: Game, viewInfo: OperationPluginViewInfo, infos: InternalOperationPluginInfo[]); | ||
constructor(game: Game, viewInfo: OperationPluginViewInfo | null, infos: InternalOperationPluginInfo[]); | ||
/** | ||
@@ -39,0 +39,0 @@ * 初期化する。 |
@@ -17,3 +17,3 @@ import { OperationPlugin } from "./OperationPlugin"; | ||
*/ | ||
new (game: any, viewInfo: OperationPluginViewInfo, option?: any): OperationPlugin; | ||
new (game: any, viewInfo: OperationPluginViewInfo | null, option?: any): OperationPlugin; | ||
} |
@@ -7,3 +7,3 @@ import * as pl from "@akashic/playlog"; | ||
export interface PointSourceResolver { | ||
findPointSource(point: CommonOffset, camera?: Camera): PointSource; | ||
findPointSource(point: CommonOffset, camera?: Camera): PointSource | undefined; | ||
} | ||
@@ -10,0 +10,0 @@ export interface PointEventResolverParameterObject { |
@@ -23,7 +23,11 @@ "use strict"; | ||
var source = this._sourceResolver.findPointSource(e.offset); | ||
// @ts-ignore | ||
var point = source.point ? source.point : e.offset; | ||
var targetId = source.target ? source.target.id : null; | ||
// @ts-ignore | ||
var targetId = source.target ? source.target.id : undefined; | ||
// @ts-ignore | ||
var local = source.local; | ||
this._pointEventMap[e.identifier] = { | ||
targetId: targetId, | ||
local: source.local, | ||
local: local, | ||
point: point, | ||
@@ -43,3 +47,3 @@ start: { x: e.offset.x, y: e.offset.y }, | ||
]; | ||
if (source.local) | ||
if (source && source.local) | ||
ret.push(source.local); // 7?: ローカル | ||
@@ -46,0 +50,0 @@ return ret; |
@@ -267,2 +267,3 @@ "use strict"; | ||
Scene.prototype.unregister = function (e) { | ||
// @ts-ignore | ||
e.scene = undefined; | ||
@@ -325,7 +326,7 @@ this.game.unregister(e); | ||
var children = this.children; | ||
var m = camera && camera instanceof Camera2D_1.Camera2D ? camera.getMatrix() : null; | ||
var m = camera && camera instanceof Camera2D_1.Camera2D ? camera.getMatrix() : undefined; | ||
for (var i = children.length - 1; i >= 0; --i) { | ||
var ret = children[i].findPointSourceByPoint(point, m, force); | ||
if (ret) { | ||
ret.local = ret.target.local || mayConsumeLocalTick; | ||
ret.local = (ret.target && ret.target.local) || mayConsumeLocalTick; | ||
return ret; | ||
@@ -332,0 +333,0 @@ } |
@@ -52,3 +52,3 @@ import { ShaderProgramLike } from "../pdi-types/ShaderProgramLike"; | ||
*/ | ||
fragmentShader: string; | ||
fragmentShader: string | undefined; | ||
/** | ||
@@ -60,3 +60,3 @@ * 各シェーダに与えられるuniform値のマップ。 | ||
[name: string]: ShaderUniform; | ||
}; | ||
} | undefined; | ||
/** | ||
@@ -63,0 +63,0 @@ * シェーダプログラムの実体。 |
@@ -236,11 +236,11 @@ import { StorageLoadError } from "../pdi-types/errors"; | ||
*/ | ||
_write: (key: StorageKey, value: StorageValue, option?: StorageWriteOption) => void; | ||
_write: ((key: StorageKey, value: StorageValue, option?: StorageWriteOption) => void) | undefined; | ||
/** | ||
* @private | ||
*/ | ||
_load: (keys: StorageReadKey[], load: StorageLoader, serialization?: StorageValueStoreSerialization) => void; | ||
_load: ((keys: StorageReadKey[], load: StorageLoader, serialization?: StorageValueStoreSerialization) => void) | undefined; | ||
/** | ||
* @private | ||
*/ | ||
_requestedKeysForJoinPlayer: StorageReadKey[]; | ||
_requestedKeysForJoinPlayer: StorageReadKey[] | undefined; | ||
/** | ||
@@ -247,0 +247,0 @@ * ストレージに値を書き込む。 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function calcAtlasSize(hint) { | ||
// @ts-ignore | ||
var width = Math.ceil(Math.min(hint.initialAtlasWidth, hint.maxAtlasWidth)); | ||
// @ts-ignore | ||
var height = Math.ceil(Math.min(hint.initialAtlasHeight, hint.maxAtlasHeight)); | ||
@@ -72,3 +74,4 @@ return { width: width, height: height }; | ||
this._currentAtlasIndex = index; | ||
glyph.surface.destroy(); | ||
if (glyph.surface) | ||
glyph.surface.destroy(); | ||
glyph.surface = atlas._surface; | ||
@@ -75,0 +78,0 @@ glyph.x = slot.x; |
@@ -11,3 +11,3 @@ import { CommonRect } from "../pdi-types/commons"; | ||
*/ | ||
function asSurface(src: ImageAssetLike | SurfaceLike | undefined): SurfaceLike; | ||
function asSurface(src: ImageAssetLike | SurfaceLike | undefined): SurfaceLike | undefined; | ||
type AnimatingHandler = { | ||
@@ -14,0 +14,0 @@ /** |
@@ -38,3 +38,3 @@ import { CommonArea, CommonOffset } from "../pdi-types/commons"; | ||
*/ | ||
function charCodeAt(str: string, idx: number): number; | ||
function charCodeAt(str: string, idx: number): number | null; | ||
/** | ||
@@ -41,0 +41,0 @@ * enum の値の文字列を snake-case に変換した文字列を返す。 |
@@ -112,3 +112,2 @@ export * from "@akashic/trigger"; | ||
export * from "./engine/TextAlignString"; | ||
export * from "./engine/TextBaseline"; | ||
export * from "./engine/TextMetrics"; | ||
@@ -115,0 +114,0 @@ export * from "./engine/TickGenerationModeString"; |
@@ -69,3 +69,2 @@ "use strict"; | ||
__export(require("./engine/TextAlign")); | ||
__export(require("./engine/TextBaseline")); | ||
__export(require("./engine/Timer")); | ||
@@ -72,0 +71,0 @@ __export(require("./engine/TimerManager")); |
@@ -43,3 +43,3 @@ import { GlyphLike } from "../pdi-types/GlyphLike"; | ||
*/ | ||
surface: SurfaceLike; | ||
surface: SurfaceLike | undefined; | ||
/** | ||
@@ -46,0 +46,0 @@ * X軸方向についての描画位置調整量。 |
@@ -18,6 +18,6 @@ import { ImageAssetHint } from "../pdi-types/ImageAssetHint"; | ||
height: number; | ||
hint: ImageAssetHint; | ||
hint: ImageAssetHint | undefined; | ||
constructor(id: string, assetPath: string, width: number, height: number); | ||
abstract asSurface(): SurfaceLike; | ||
initialize(hint: ImageAssetHint): void; | ||
initialize(hint: ImageAssetHint | undefined): void; | ||
} |
@@ -16,4 +16,5 @@ import { ScriptAssetLike } from "../pdi-types/ScriptAssetLike"; | ||
script: string; | ||
constructor(id: string, path: string); | ||
abstract execute(execEnv: ScriptAssetRuntimeValue): any; | ||
destroy(): void; | ||
} |
@@ -28,5 +28,6 @@ "use strict"; | ||
__extends(ScriptAsset, _super); | ||
function ScriptAsset() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
function ScriptAsset(id, path) { | ||
var _this = _super.call(this, id, path) || this; | ||
_this.type = "script"; | ||
_this.script = undefined; | ||
return _this; | ||
@@ -33,0 +34,0 @@ } |
@@ -33,3 +33,3 @@ import { CommonSize } from "../pdi-types/commons"; | ||
*/ | ||
_acquireSurfaceAtlasSlot(width: number, height: number): SurfaceAtlasSlotLike; | ||
_acquireSurfaceAtlasSlot(width: number, height: number): SurfaceAtlasSlotLike | null; | ||
/** | ||
@@ -48,3 +48,3 @@ * @private | ||
*/ | ||
addSurface(surface: SurfaceLike, offsetX: number, offsetY: number, width: number, height: number): SurfaceAtlasSlotLike; | ||
addSurface(surface: SurfaceLike, offsetX: number, offsetY: number, width: number, height: number): SurfaceAtlasSlotLike | null; | ||
/** | ||
@@ -51,0 +51,0 @@ * このSurfaceAtlasの破棄を行う。 |
@@ -9,2 +9,3 @@ "use strict"; | ||
} | ||
// @ts-ignore | ||
slot = slot.next; | ||
@@ -11,0 +12,0 @@ } |
@@ -12,5 +12,5 @@ import { SurfaceAtlasSlotLike } from "../pdi-types/SurfaceAtlasSlotLike"; | ||
height: number; | ||
prev: SurfaceAtlasSlotLike; | ||
next: SurfaceAtlasSlotLike; | ||
prev: SurfaceAtlasSlotLike | null; | ||
next: SurfaceAtlasSlotLike | null; | ||
constructor(x: number, y: number, width: number, height: number); | ||
} |
@@ -17,5 +17,5 @@ import { AssetLike } from "./AssetLike"; | ||
height: number; | ||
hint: ImageAssetHint; | ||
hint: ImageAssetHint | undefined; | ||
asSurface(): SurfaceLike; | ||
initialize(hint: ImageAssetHint): void; | ||
initialize(hint: ImageAssetHint | undefined): void; | ||
} |
@@ -23,3 +23,3 @@ /** | ||
*/ | ||
parent: ModuleLike; | ||
parent: ModuleLike | null; | ||
/** | ||
@@ -26,0 +26,0 @@ * このモジュールの読み込みが完了しているか。 |
@@ -16,12 +16,12 @@ import { ShaderUniform } from "./ShaderUniform"; | ||
* | ||
* この値は本クラスの生成時にのみ指定可能であり、直接書き換えてはならない。 | ||
* この値が省略された場合、エンジンで用意されたデフォルトのフラグメントシェーダを利用する。 | ||
*/ | ||
fragmentShader: string; | ||
fragmentShader: string | undefined; | ||
/** | ||
* 各シェーダに与えられるuniform値のマップ。 | ||
* この値は本クラスの生成時にのみ指定可能であり、 `ShaderUniform#value` 以外の値を直接書き換えてはならない。 | ||
* `ShaderUniform#value` 以外の値を直接書き換えてはならない。 | ||
*/ | ||
uniforms: { | ||
[name: string]: ShaderUniform; | ||
}; | ||
} | undefined; | ||
/** | ||
@@ -28,0 +28,0 @@ * シェーダプログラムの実体。 |
@@ -27,3 +27,3 @@ import { CommonSize } from "./commons"; | ||
*/ | ||
addSurface(surface: SurfaceLike, offsetX: number, offsetY: number, width: number, height: number): SurfaceAtlasSlotLike; | ||
addSurface(surface: SurfaceLike, offsetX: number, offsetY: number, width: number, height: number): SurfaceAtlasSlotLike | null; | ||
/** | ||
@@ -30,0 +30,0 @@ * サーフェスアトラスの大きさを取得する。 |
@@ -8,4 +8,4 @@ import { CommonArea } from "./commons"; | ||
export interface SurfaceAtlasSlotLike extends CommonArea { | ||
prev: SurfaceAtlasSlotLike; | ||
next: SurfaceAtlasSlotLike; | ||
prev: SurfaceAtlasSlotLike | null; | ||
next: SurfaceAtlasSlotLike | null; | ||
} |
@@ -5,3 +5,3 @@ import { Trigger } from "@akashic/trigger"; | ||
player: VideoPlayerLike; | ||
video: VideoAssetLike; | ||
video: VideoAssetLike | undefined; | ||
} | ||
@@ -8,0 +8,0 @@ /** |
{ | ||
"name": "@akashic/akashic-engine", | ||
"version": "3.0.0-beta.24", | ||
"version": "3.0.0-beta.25", | ||
"description": "The core library of Akashic Engine", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"@akashic/playlog": "~2.0.0", | ||
"@akashic/trigger": "~0.1.7" | ||
"@akashic/trigger": "~1.0.0" | ||
}, | ||
@@ -11,0 +11,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1313408
27215
258
+ Added@akashic/trigger@1.0.1(transitive)
- Removed@akashic/trigger@0.1.7(transitive)
Updated@akashic/trigger@~1.0.0