@akashic/akashic-engine
Advanced tools
Comparing version 3.9.2 to 3.9.3
import type { AssetConfigurationCommonBase } from "@akashic/game-configuration"; | ||
export declare type AssetGenerationConfiguration = VectorImageAssetGenerationConfiguration; | ||
export type AssetGenerationConfiguration = VectorImageAssetGenerationConfiguration; | ||
/** | ||
@@ -4,0 +4,0 @@ * Asset を動的に生成するための設定を表すインターフェース。 |
@@ -8,5 +8,5 @@ import type { AssetConfigurationMap, AudioSystemConfigurationMap, ModuleMainScriptsMap, AssetConfigurationCommonBase, ImageAssetConfigurationBase, ScriptAssetConfigurationBase, TextAssetConfigurationBase, AudioAssetConfigurationBase, VideoAssetConfigurationBase, VectorImageAssetConfigurationBase } from "@akashic/game-configuration"; | ||
import type { DynamicAssetConfiguration } from "./DynamicAssetConfiguration"; | ||
export declare type OneOfAsset = AudioAsset | ImageAsset | ScriptAsset | TextAsset | VideoAsset | VectorImageAsset; | ||
declare type AssetConfigurationCore = ImageAssetConfiguration | VectorImageAssetConfiguration | VideoAssetConfiguration | AudioAssetConfiguration | TextAssetConfiguration | ScriptAssetConfiguration; | ||
declare type UnneededKeysForAsset = "path" | "virtualPath" | "global"; | ||
export type OneOfAsset = AudioAsset | ImageAsset | ScriptAsset | TextAsset | VideoAsset | VectorImageAsset; | ||
type AssetConfigurationCore = ImageAssetConfiguration | VectorImageAssetConfiguration | VideoAssetConfiguration | AudioAssetConfiguration | TextAssetConfiguration | ScriptAssetConfiguration; | ||
type UnneededKeysForAsset = "path" | "virtualPath" | "global"; | ||
interface ImageAssetConfiguration extends Omit<AssetConfigurationCommonBase, "type">, Omit<ImageAssetConfigurationBase, UnneededKeysForAsset> { | ||
@@ -24,3 +24,3 @@ } | ||
} | ||
declare type AssetIdOrConf = string | DynamicAssetConfiguration | AssetGenerationConfiguration; | ||
type AssetIdOrConf = string | DynamicAssetConfiguration | AssetGenerationConfiguration; | ||
export interface AssetManagerParameterGameLike { | ||
@@ -27,0 +27,0 @@ resourceFactory: ResourceFactory; |
@@ -11,4 +11,4 @@ import type { AudioPlayContext } from "./AudioPlayContext"; | ||
*/ | ||
export declare type EasingFunction = (t: number, b: number, c: number, d: number) => number; | ||
export declare type AudioTransitionContext = { | ||
export type EasingFunction = (t: number, b: number, c: number, d: number) => number; | ||
export type AudioTransitionContext = { | ||
/** | ||
@@ -15,0 +15,0 @@ * 遷移を即座に完了する。 |
import type { AssetConfigurationCommonBase, AudioAssetConfigurationBase, ImageAssetConfigurationBase, ScriptAssetConfigurationBase, TextAssetConfigurationBase, VectorImageAssetConfigurationBase, VideoAssetConfigurationBase } from "@akashic/game-configuration"; | ||
export declare type DynamicAssetConfiguration = DynamicAudioAssetConfigurationBase | DynamicImageAssetConfigurationBase | DynamicVectorImageAssetConfigurationBase | DynamicTextAssetConfigurationBase | DynamicScriptAssetConfigurationBase | DynamicVideoAssetConfigurationBase; | ||
export type DynamicAssetConfiguration = DynamicAudioAssetConfigurationBase | DynamicImageAssetConfigurationBase | DynamicVectorImageAssetConfigurationBase | DynamicTextAssetConfigurationBase | DynamicScriptAssetConfigurationBase | DynamicVideoAssetConfigurationBase; | ||
/** | ||
@@ -48,3 +48,3 @@ * (実行時に定義される)Assetの設定を表すインターフェース。 | ||
} | ||
declare type UnneededKeysForDynamicAsset = "path" | "virtualPath" | "global"; | ||
type UnneededKeysForDynamicAsset = "path" | "virtualPath" | "global"; | ||
export {}; |
@@ -19,3 +19,3 @@ import type { CommonArea, CommonOffset, CommonRect, Renderer } from "@akashic/pdi-types"; | ||
} | ||
export declare type PointEvent = PointEventBase<E>; | ||
export type PointEvent = PointEventBase<E>; | ||
/** | ||
@@ -22,0 +22,0 @@ * ポインティング操作の開始を表すイベント。 |
@@ -20,3 +20,3 @@ import type { CommonOffset } from "@akashic/pdi-types"; | ||
*/ | ||
export declare type EventTypeString = "unknown" | "join" | "leave" | "timestamp" | "player-info" | "seed" | "point-down" | "point-move" | "point-up" | "message" | "operation"; | ||
export type EventTypeString = "unknown" | "join" | "leave" | "timestamp" | "player-info" | "seed" | "point-down" | "point-move" | "point-up" | "message" | "operation"; | ||
/** | ||
@@ -23,0 +23,0 @@ * イベントを表すインターフェース。 |
@@ -8,2 +8,2 @@ import type { Event } from "@akashic/playlog"; | ||
*/ | ||
export declare type EventFilter = (events: Event[], controller: EventFilterController) => Event[]; | ||
export type EventFilter = (events: Event[], controller: EventFilterController) => Event[]; |
@@ -63,3 +63,3 @@ import type { GameConfiguration } from "@akashic/game-configuration"; | ||
} | ||
export declare type GameMainFunction = (g: any, args: GameMainParameterObject) => void; | ||
export type GameMainFunction = (g: any, args: GameMainParameterObject) => void; | ||
/** | ||
@@ -66,0 +66,0 @@ * `Game` のコンストラクタに渡すことができるパラメータ。 |
@@ -727,3 +727,8 @@ "use strict"; | ||
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 のときの挙動 | ||
// TODO: selfId が null のときの挙動 | ||
this._pointEventResolver = new PointEventResolver_1.PointEventResolver({ | ||
sourceResolver: this, | ||
playerId: this.selfId, | ||
maxPoints: this._configuration.maxPoints | ||
}); | ||
// ES5だとNumber.MAX_SAFE_INTEGERは使えないのでその値(9007199254740991)を直接かける | ||
@@ -730,0 +735,0 @@ this.localRandom = new XorshiftRandomGenerator_1.XorshiftRandomGenerator(Math.floor(9007199254740991 * Math.random())); |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
export declare type LocalTickModeString = "non-local" | "full-local" | "interpolate-local"; | ||
export type LocalTickModeString = "non-local" | "full-local" | "interpolate-local"; |
@@ -17,2 +17,6 @@ import type { CommonOffset, PlatformPointEvent } from "@akashic/pdi-types"; | ||
playerId: string; | ||
/** | ||
* 同時にポイント可能な上限 | ||
*/ | ||
maxPoints?: number; | ||
} | ||
@@ -34,5 +38,7 @@ /** | ||
_playerId: string; | ||
_maxPoints: number | null; | ||
private _currentPoints; | ||
private _pointEventMap; | ||
constructor(param: PointEventResolverParameterObject); | ||
pointDown(e: PlatformPointEvent): pl.PointDownEvent; | ||
pointDown(e: PlatformPointEvent): pl.PointDownEvent | null; | ||
pointMove(e: PlatformPointEvent): pl.PointMoveEvent | null; | ||
@@ -39,0 +45,0 @@ pointUp(e: PlatformPointEvent): pl.PointUpEvent | null; |
@@ -18,2 +18,4 @@ "use strict"; | ||
function PointEventResolver(param) { | ||
var _a; | ||
this._currentPoints = 0; | ||
// g.Eと関連した座標データ | ||
@@ -23,4 +25,8 @@ this._pointEventMap = {}; | ||
this._playerId = param.playerId; | ||
this._maxPoints = (_a = param.maxPoints) !== null && _a !== void 0 ? _a : null; | ||
} | ||
PointEventResolver.prototype.pointDown = function (e) { | ||
if (this._maxPoints != null && this._currentPoints >= this._maxPoints) { | ||
return null; | ||
} | ||
var source = this._sourceResolver.findPointSource(e.offset); | ||
@@ -40,2 +46,3 @@ // @ts-ignore | ||
}; | ||
this._currentPoints++; | ||
// NOTE: 優先度は機械的にJoinedをつけておく。Joinしていない限りPointDownEventなどはリジェクトされる。 | ||
@@ -87,2 +94,3 @@ var ret = [ | ||
delete this._pointEventMap[e.identifier]; | ||
this._currentPoints--; | ||
var ret = [ | ||
@@ -89,0 +97,0 @@ 35 /* pl.EventCode.PointUp */, |
@@ -18,3 +18,3 @@ import type { Asset, CommonOffset, StorageLoadError } from "@akashic/pdi-types"; | ||
import { TimerManager } from "./TimerManager"; | ||
export declare type SceneRequestAssetHandler = () => void; | ||
export type SceneRequestAssetHandler = () => void; | ||
/** | ||
@@ -110,4 +110,4 @@ * `Scene` のコンストラクタに渡すことができるパラメータ。 | ||
*/ | ||
export declare type SceneStateString = "destroyed" | "standby" | "active" | "deactive" | "before-destroyed"; | ||
export declare type SceneLoadStateString = "initial" | "ready" | "ready-fired" | "loaded-fired"; | ||
export type SceneStateString = "destroyed" | "standby" | "active" | "deactive" | "before-destroyed"; | ||
export type SceneLoadStateString = "initial" | "ready" | "ready-fired" | "loaded-fired"; | ||
/** | ||
@@ -423,2 +423,4 @@ * シーンを表すクラス。 | ||
* Timerを削除する。 | ||
* `Scene#createTimer()`と同様に、通常はゲーム開発者がこのメソッドを呼び出す必要はない。 | ||
* このメソッドを利用する場合、メソッド実行前に対象のTimerのonElapseに登録したハンドラを全て削除しておく必要がある。 | ||
* @param timer 削除するTimer | ||
@@ -425,0 +427,0 @@ */ |
@@ -161,2 +161,4 @@ "use strict"; | ||
* Timerを削除する。 | ||
* `Scene#createTimer()`と同様に、通常はゲーム開発者がこのメソッドを呼び出す必要はない。 | ||
* このメソッドを利用する場合、メソッド実行前に対象のTimerのonElapseに登録したハンドラを全て削除しておく必要がある。 | ||
* @param timer 削除するTimer | ||
@@ -163,0 +165,0 @@ */ |
@@ -187,3 +187,3 @@ import type { StorageLoadError } from "@akashic/pdi-types"; | ||
} | ||
export declare type StorageValueStoreSerialization = any; | ||
export type StorageValueStoreSerialization = any; | ||
/** | ||
@@ -190,0 +190,0 @@ * ストレージの値をロードするクラス。 |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
export declare type TextAlignString = "left" | "center" | "right"; | ||
export type TextAlignString = "left" | "center" | "right"; |
@@ -10,2 +10,2 @@ /** | ||
*/ | ||
export declare type TickGenerationModeString = "by-clock" | "manual"; | ||
export type TickGenerationModeString = "by-clock" | "manual"; |
{ | ||
"name": "@akashic/akashic-engine", | ||
"version": "3.9.2", | ||
"version": "3.9.3", | ||
"description": "The core library of Akashic Engine", | ||
"main": "index.js", | ||
"dependencies": { | ||
"@akashic/game-configuration": "~1.6.0", | ||
"@akashic/game-configuration": "~1.8.0", | ||
"@akashic/pdi-types": "~1.6.0", | ||
@@ -9,0 +9,0 @@ "@akashic/playlog": "~3.1.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1583553
27551
+ Added@akashic/game-configuration@1.8.0(transitive)
- Removed@akashic/game-configuration@1.6.0(transitive)