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

@akashic/game-configuration

Package Overview
Dependencies
Maintainers
5
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@akashic/game-configuration - npm Package Compare versions

Comparing version 1.12.0 to 2.0.0

12

lib/utils/extractAssetPaths.d.ts
import type { AudioAssetConfigurationBase } from "../AssetConfiguration";
import type { GameConfiguration } from "../GameConfiguration";
interface ExtractAssetPathsParameterObject {
/**
* ファイルパスを抜き出したい game.json の内容。
*/
gameConfiguration: GameConfiguration;
/**
* オーディオアセットの拡張子を解決する関数。
*
* 渡されたアセット定義のファイルパスは、これが返した拡張子を加えたものとして扱われる。
* 戻り値は "." 込みの拡張子の配列でなければならない。
*/
audioExtensionResolver?: (asset: AudioAssetConfigurationBase) => string[];
}
/**
* 指定された GameConfiguration から全アセットと全globalScriptsのパスを取得する
*/
export declare function extractAssetPaths(params: ExtractAssetPathsParameterObject): string[];
export {};

19

lib/utils/extractAssetPaths.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractAssetPaths = void 0;
// 指定された GameConfiguration から全アセットと全globalScriptsのパスを取得する
/**
* 指定された GameConfiguration から全アセットと全globalScriptsのパスを取得する
*/
function extractAssetPaths(params) {

@@ -23,15 +25,6 @@ var _a = params.gameConfiguration, assets = _a.assets, globalScripts = _a.globalScripts;

function extractPath(asset, audioExtensionResolver) {
var _a;
var _a, _b, _c;
if (asset.type === "audio") {
var extensions = void 0;
if (audioExtensionResolver) {
extensions = audioExtensionResolver(asset);
}
else if ((_a = asset.hint) === null || _a === void 0 ? void 0 : _a.extensions) {
extensions = asset.hint.extensions;
}
else {
extensions = ["ogg", "aac"]; // 後方互換性として指定
}
return extensions.map(function (ext) { return "".concat(asset.path, ".").concat(ext); });
var exts = (_c = (_a = audioExtensionResolver === null || audioExtensionResolver === void 0 ? void 0 : audioExtensionResolver(asset)) !== null && _a !== void 0 ? _a : (_b = asset.hint) === null || _b === void 0 ? void 0 : _b.extensions) !== null && _c !== void 0 ? _c : [".ogg", ".aac"];
return exts.map(function (ext) { return "".concat(asset.path).concat(ext); });
}

@@ -38,0 +31,0 @@ else {

{
"name": "@akashic/game-configuration",
"version": "1.12.0",
"version": "2.0.0",
"description": "Type definitions and utilities for game.json, the manifest file for Akashic Engine.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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