New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@akashic/akashic-engine

Package Overview
Dependencies
Maintainers
4
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@akashic/akashic-engine - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

5

lib/AssetManager.d.ts
import { AssetConfigurationMap, AudioSystemConfigurationMap, ModuleMainScriptsMap } from "@akashic/game-configuration";
import { Asset, AssetLoadHandler, AudioAsset, AssetLoadError, ImageAsset, ResourceFactory, ScriptAsset, TextAsset, VideoAsset, VectorImageAsset } from "@akashic/pdi-types";
import { AssetManagerLoadHandler } from "./AssetManagerLoadHandler";
import { AudioSystem } from "./AudioSystem";
import { AudioSystemManager } from "./AudioSystemManager";

@@ -218,2 +219,6 @@ import { DynamicAssetConfiguration } from "./DynamicAssetConfiguration";

_replaceModulePathToAbsolute(accessorPath: string): string;
/**
* @private
*/
_getAudioSystem(assetIdOrConf: string | DynamicAssetConfiguration): AudioSystem | null;
}

44

lib/AssetManager.js

@@ -219,9 +219,19 @@ "use strict";

else {
var a = this._createAssetFor(assetIdOrConf);
loadingInfo = new AssetLoadingInfo(a, handler);
this._loadings[assetId] = loadingInfo;
this._refCounts[assetId] = 1;
waiting = true;
loadingInfo.loading = true;
a._load(this);
var system = this._getAudioSystem(assetIdOrConf);
var audioAsset = system === null || system === void 0 ? void 0 : system.getDestroyRequestedAsset(assetId);
if (system && audioAsset) {
system.cancelRequestDestroy(audioAsset);
this._assets[assetId] = audioAsset;
this._refCounts[assetId] = 1;
handler._onAssetLoad(audioAsset);
}
else {
var a = this._createAssetFor(assetIdOrConf);
loadingInfo = new AssetLoadingInfo(a, handler);
this._loadings[assetId] = loadingInfo;
this._refCounts[assetId] = 1;
waiting = true;
loadingInfo.loading = true;
a._load(this);
}
}

@@ -543,2 +553,22 @@ return waiting;

};
/**
* @private
*/
AssetManager.prototype._getAudioSystem = function (assetIdOrConf) {
var conf;
if (typeof assetIdOrConf === "string") {
conf = this.configuration[assetIdOrConf];
}
else {
var dynConf = assetIdOrConf;
conf = dynConf;
}
if (!conf) {
return null;
}
if (conf.type !== "audio") {
return null;
}
return conf.systemId ? this._audioSystemManager[conf.systemId] : this._audioSystemManager[this._defaultAudioSystemId];
};
AssetManager.MAX_ERROR_COUNT = 3;

@@ -545,0 +575,0 @@ return AssetManager;

@@ -1,2 +0,2 @@

import { AudioAsset, AudioPlayer, AudioPlayerEvent, ResourceFactory } from "@akashic/pdi-types";
import { AudioAsset, AudioPlayer, AudioPlayerEvent, ResourceFactory, AudioSystem as PdiAudioSystem } from "@akashic/pdi-types";
export interface AudioSystemParameterObject {

@@ -20,3 +20,3 @@ /**

}
export declare abstract class AudioSystem implements AudioSystem {
export declare abstract class AudioSystem implements PdiAudioSystem {
id: string;

@@ -59,2 +59,13 @@ /**

/**
* `this.requestDestroy()` により破棄要求されているアセットの破棄を取り消す。
* @param asset アセット。
*/
cancelRequestDestroy(asset: AudioAsset): void;
/**
* `this.requestDestroy()` により破棄要求されていて、まだ実際には破棄されていないアセット。
* 対象のアセットが破棄要求されていなければ `null` を返す。
* @param assetId アセットID。
*/
getDestroyRequestedAsset(assetId: string): AudioAsset | null;
/**
* @private

@@ -61,0 +72,0 @@ */

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -49,2 +51,22 @@ function __() { this.constructor = d; }

/**
* `this.requestDestroy()` により破棄要求されているアセットの破棄を取り消す。
* @param asset アセット。
*/
// NOTE: akashic-engine の独自仕様
AudioSystem.prototype.cancelRequestDestroy = function (asset) {
delete this._destroyRequestedAssets[asset.id];
};
/**
* `this.requestDestroy()` により破棄要求されていて、まだ実際には破棄されていないアセット。
* 対象のアセットが破棄要求されていなければ `null` を返す。
* @param assetId アセットID。
*/
// NOTE: akashic-engine の独自仕様
AudioSystem.prototype.getDestroyRequestedAsset = function (assetId) {
if (this._destroyRequestedAssets.hasOwnProperty(assetId)) {
return this._destroyRequestedAssets[assetId];
}
return null;
};
/**
* @private

@@ -51,0 +73,0 @@ */

4

lib/BitmapFont.js

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -10,5 +10,6 @@ "use strict";

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.VideoSystem = exports.ShaderProgram = exports.Module = exports.AudioSystem = void 0;
__exportStar(require("@akashic/game-configuration"), exports);

@@ -15,0 +16,0 @@ __exportStar(require("@akashic/trigger"), exports);

@@ -10,3 +10,3 @@ "use strict";

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};

@@ -13,0 +13,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

{
"name": "@akashic/akashic-engine",
"version": "3.2.0",
"version": "3.2.1",
"description": "The core library of Akashic Engine",

@@ -15,22 +15,22 @@ "main": "index.js",

"@akashic/pdi-common-impl": "~0.2.0",
"@types/jest": "^25.2.3",
"@typescript-eslint/eslint-plugin": "^4.31.0",
"@types/jest": "^27.0.2",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^7.0.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^24.4.0",
"jest": "^25.5.4",
"prettier": "^1.19.1",
"eslint-plugin-jest": "^24.7.0",
"jest": "^27.3.1",
"prettier": "^2.4.1",
"rimraf": "^3.0.2",
"rollup": "^1.32.1",
"rollup": "^2.58.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^7.0.2",
"textlint": "^11.6.3",
"textlint-rule-max-ten": "^2.0.4",
"textlint-rule-no-mix-dearu-desumasu": "^4.0.1",
"textlint": "^12.0.2",
"textlint-rule-max-ten": "^4.0.2",
"textlint-rule-no-mix-dearu-desumasu": "^5.0.0",
"textlint-rule-prh": "^5.3.0",
"ts-jest": "^25.5.1",
"ts-jest": "^27.0.7",
"typedoc": "^0.16.11",
"typescript": "^3.7.7",
"typescript": "^4.4.4",
"xorshift": "0.2.0"

@@ -37,0 +37,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc