UNPKG

1.91 kBTypeScriptView Raw
1/**
2 * 各アセット定義。
3 * game.json の "assets" の各要素の型。
4 */
5export interface AssetConfiguration {
6 type: string;
7 path: string;
8 virtualPath?: string;
9 width?: number;
10 height?: number;
11 systemId?: string;
12 global?: boolean;
13 duration?: number;
14 hint?: {
15 untainted?: boolean;
16 };
17}
18/**
19 * AudioSystem 定義。
20 * game.json の "audio" の各要素の型。
21 */
22export interface AudioSystemConfiguration {
23 music?: boolean;
24}
25/**
26 * アセット定義。
27 * game.json の "assets" の値の型。
28 */
29export interface Assets {
30 [key: string]: AssetConfiguration;
31 mainScene?: AssetConfiguration;
32}
33/**
34 * 操作プラグイン定義。
35 */
36export interface OperationPluginDeclaration {
37 code: number;
38 script: string;
39 option?: any;
40}
41export declare type ModuleMainScripts = {
42 [path: string]: string;
43};
44/**
45 * game.json の型。
46 */
47export interface GameConfiguration {
48 width: number;
49 height: number;
50 fps?: number;
51 main?: string;
52 audio?: {
53 [key: string]: AudioSystemConfiguration;
54 };
55 assets?: Assets;
56 globalScripts?: string[];
57 operationPlugins?: OperationPluginDeclaration[];
58 environment?: ModuleEnvironment;
59 moduleMainScripts?: ModuleMainScripts;
60 exportZipInfo?: ExportZipInfo;
61}
62export interface ModuleEnvironment {
63 "sandbox-runtime"?: string;
64}
65/**
66 * akashic export zip 実行時のオプション情報。
67 * エクスポート結果に埋め込む値であるため、実行環境のディレクトリの情報は持たせていないことに注意。
68 */
69export interface ExportZipInfo {
70 version: string;
71 option: {
72 quiet?: boolean;
73 force?: boolean;
74 strip?: boolean;
75 minify?: boolean;
76 bundle?: boolean;
77 babel?: boolean;
78 hashFilename?: number | boolean;
79 omitEmptyJs?: boolean;
80 };
81}