@wwawing/engine 3.8.0 → 3.9.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/wwa.js +3 -3
- package/lib/wwa_audio/WWAAudio.d.ts +9 -0
- package/lib/wwa_audio/WWAAudioElement.d.ts +13 -0
- package/lib/wwa_audio/WWAWebAudio.d.ts +18 -0
- package/lib/wwa_audio/index.d.ts +4 -0
- package/lib/wwa_data.d.ts +8 -2
- package/lib/wwa_inject_html.d.ts +1 -0
- package/lib/wwa_main.d.ts +10 -3
- package/lib/wwa_save/WWASaveDataDBList.d.ts +3 -0
- package/lib/wwa_save/WWASaveDataDBListForIE.d.ts +20 -0
- package/package.json +12 -11
- package/lib/json_api_client/index.d.ts +0 -12
- package/lib/wwa_sound.d.ts +0 -24
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import WWAAudio from './WWAAudio';
|
|
2
|
+
export default class WWAAudioElement extends WWAAudio {
|
|
3
|
+
private _mainElement;
|
|
4
|
+
private _subElement;
|
|
5
|
+
private _currentElement;
|
|
6
|
+
private _nextIsSub;
|
|
7
|
+
constructor(idx: number, file: string, parentNode: Node);
|
|
8
|
+
private _createElement;
|
|
9
|
+
play(): void;
|
|
10
|
+
pause(): void;
|
|
11
|
+
hasData(): boolean;
|
|
12
|
+
isError(): boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import WWAAudio from './WWAAudio';
|
|
2
|
+
export default class WWAWebAudio extends WWAAudio {
|
|
3
|
+
private audioContext;
|
|
4
|
+
private audioGain;
|
|
5
|
+
private audioBuffer;
|
|
6
|
+
private bufferSources;
|
|
7
|
+
private isLoaded;
|
|
8
|
+
private pos;
|
|
9
|
+
constructor(idx: number, file: string, audioContext: AudioContext, audioGain: GainNode);
|
|
10
|
+
private _load;
|
|
11
|
+
private _setData;
|
|
12
|
+
private _cancelLoad;
|
|
13
|
+
play(): void;
|
|
14
|
+
pause(): void;
|
|
15
|
+
hasData(): boolean;
|
|
16
|
+
isLoading(): boolean;
|
|
17
|
+
isError(): boolean;
|
|
18
|
+
}
|
package/lib/wwa_data.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { WWA } from "./wwa_main";
|
|
|
2
2
|
import { Camera } from "./wwa_camera";
|
|
3
3
|
import { KeyCode } from "./wwa_input";
|
|
4
4
|
import { WWAData } from "@wwawing/common-interface";
|
|
5
|
-
import type { JsonResponseErrorKind } from "./json_api_client";
|
|
6
5
|
export { WWAData };
|
|
7
6
|
export declare class EquipmentStatus {
|
|
8
7
|
strength: number;
|
|
@@ -143,6 +142,8 @@ export declare enum BROWSER_TYPE {
|
|
|
143
142
|
CHROME = 1,
|
|
144
143
|
FIREFOX = 2,
|
|
145
144
|
SAFARI = 3,
|
|
145
|
+
EDGE = 4,
|
|
146
|
+
INTERNET_EXPLORER = 5,
|
|
146
147
|
OTHERS = 9999
|
|
147
148
|
}
|
|
148
149
|
export declare enum ChoiceCallInfo {
|
|
@@ -558,4 +559,9 @@ export declare enum IDTable {
|
|
|
558
559
|
BITMASK = 65535
|
|
559
560
|
}
|
|
560
561
|
export declare type StatusSolutionKind = "all" | "bare" | "equipment";
|
|
561
|
-
export declare type
|
|
562
|
+
export declare type JsonRequestErrorKind = "brokenJson" | "httpError";
|
|
563
|
+
export declare type UserVarNameListRequestErrorKind = JsonRequestErrorKind | "notObject" | "noFileSpecified";
|
|
564
|
+
export declare type JsonRequestError<ErrorKind = JsonRequestErrorKind> = {
|
|
565
|
+
kind: ErrorKind;
|
|
566
|
+
detail: string;
|
|
567
|
+
};
|
package/lib/wwa_inject_html.d.ts
CHANGED
package/lib/wwa_main.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Face, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex, StatusKind, StatusSolutionKind } from "./wwa_data";
|
|
1
|
+
import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Face, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex, StatusKind, StatusSolutionKind, JsonRequestError } from "./wwa_data";
|
|
2
2
|
import { MessageWindow, ParsedMessage } from "./wwa_message";
|
|
3
3
|
import { ItemMenu } from "./wwa_item_menu";
|
|
4
4
|
import { WWACompress } from "./wwa_save";
|
|
@@ -16,6 +16,8 @@ export declare class WWA {
|
|
|
16
16
|
private _monster;
|
|
17
17
|
private _keyStore;
|
|
18
18
|
private _mouseStore;
|
|
19
|
+
private _virtualPadStore;
|
|
20
|
+
private _virtualPadButtonElements;
|
|
19
21
|
private _gamePadStore;
|
|
20
22
|
private _camera;
|
|
21
23
|
_itemMenu: ItemMenu;
|
|
@@ -50,7 +52,7 @@ export declare class WWA {
|
|
|
50
52
|
private _lastMessage;
|
|
51
53
|
private _frameCoord;
|
|
52
54
|
private _battleEffectCoord;
|
|
53
|
-
private
|
|
55
|
+
private _audioInstances;
|
|
54
56
|
private _temporaryInputDisable;
|
|
55
57
|
private _isLoadedSound;
|
|
56
58
|
private _isSkippedSoundMessage;
|
|
@@ -73,6 +75,7 @@ export declare class WWA {
|
|
|
73
75
|
private _userVarNameListRequestError;
|
|
74
76
|
private _canDisplayUserVars;
|
|
75
77
|
private _isActive;
|
|
78
|
+
private _itemboxBackgroundPos;
|
|
76
79
|
private _mapIDTable;
|
|
77
80
|
private _mapObjectIDTable;
|
|
78
81
|
wwaCustomEventEmitter: IEventEmitter;
|
|
@@ -92,7 +95,7 @@ export declare class WWA {
|
|
|
92
95
|
private _setProgressBar;
|
|
93
96
|
private _setLoadingMessage;
|
|
94
97
|
private _setErrorMessage;
|
|
95
|
-
|
|
98
|
+
createWWAAudioInstance(idx: number): void;
|
|
96
99
|
loadSound(): void;
|
|
97
100
|
checkAllSoundLoaded(): void;
|
|
98
101
|
private _setSoundLoadedCheckTimer;
|
|
@@ -281,6 +284,9 @@ export declare class WWA {
|
|
|
281
284
|
x: number;
|
|
282
285
|
y: number;
|
|
283
286
|
}): void;
|
|
287
|
+
private _getVirtualPadButton;
|
|
288
|
+
private _setVirtualPadTouch;
|
|
289
|
+
private _setVirtualPadLeave;
|
|
284
290
|
private _actionGamePadButtonItemMacro;
|
|
285
291
|
setGamePadButtonItemTable(buttonID: number, itemBoxNo: number): void;
|
|
286
292
|
private _checkSaveDataCompatibility;
|
|
@@ -291,3 +297,4 @@ export declare class WWA {
|
|
|
291
297
|
isCalledByMacro: boolean;
|
|
292
298
|
}): boolean;
|
|
293
299
|
}
|
|
300
|
+
export declare const getJSONFile: (fileName: string, callback: (error: JsonRequestError, result: unknown) => void) => void;
|
|
@@ -13,12 +13,15 @@ declare type WWASaveDataItem = {
|
|
|
13
13
|
};
|
|
14
14
|
export default class WWASaveDataDBList extends WWASaveDataList {
|
|
15
15
|
private selectDatas;
|
|
16
|
+
private selectLoad;
|
|
17
|
+
private indexedDB;
|
|
16
18
|
private IDBTransaction;
|
|
17
19
|
private onCheckLoadingSaveData;
|
|
18
20
|
private onCompleteLoadingSaveData;
|
|
19
21
|
private static doNotAnything;
|
|
20
22
|
protected keyPath: string | string[];
|
|
21
23
|
constructor(onCheckLoadingSaveData: OnCheckLoadingSaveDataFunction, onCompleteLoadingSaveData: OnCompleteLoadingSaveDataFunction, prototype?: WWASaveDataDBList);
|
|
24
|
+
private getAlEmulate;
|
|
22
25
|
private indexDBOpen;
|
|
23
26
|
private createDataBase;
|
|
24
27
|
private getObjectStore;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import WWASaveDataDBList from "./WWASaveDataDBList";
|
|
2
|
+
import { OnCompleteLoadingSaveDataFunction, OnCheckLoadingSaveDataFunction } from ".";
|
|
3
|
+
declare type WWASaveDataItem = {
|
|
4
|
+
url?: string;
|
|
5
|
+
id: number;
|
|
6
|
+
hash: string;
|
|
7
|
+
image: string;
|
|
8
|
+
data: object;
|
|
9
|
+
date: Date;
|
|
10
|
+
worldName: string;
|
|
11
|
+
urlWithId: string;
|
|
12
|
+
mapDataRevisionKey: string;
|
|
13
|
+
};
|
|
14
|
+
export default class WWASaveDataDBListForIE extends WWASaveDataDBList {
|
|
15
|
+
constructor(onCheckLoadingSaveData: OnCheckLoadingSaveDataFunction, onCompleteLoadingSaveData: OnCompleteLoadingSaveDataFunction);
|
|
16
|
+
protected keyPath: string;
|
|
17
|
+
protected makeSaveDataItem(saveID: number, gameCvs: HTMLCanvasElement, compressedData: object, date: Date): WWASaveDataItem;
|
|
18
|
+
protected getSaveDataResult(store: IDBObjectStore, onsuccess: (result: WWASaveDataItem[]) => void): void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwawing/engine",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0-beta.0",
|
|
4
4
|
"description": "World Wide Adventure: an RPG Engine.",
|
|
5
5
|
"main": "./lib/wwa.js",
|
|
6
6
|
"files": [
|
|
@@ -45,13 +45,14 @@
|
|
|
45
45
|
"@types/pug": "^2.0.4",
|
|
46
46
|
"@types/terser-webpack-plugin": "^5.0.3",
|
|
47
47
|
"@types/webpack": "^5.28.0",
|
|
48
|
-
"@wwawing/assets": "^3.
|
|
49
|
-
"@wwawing/common-interface": "^3.
|
|
50
|
-
"@wwawing/debug-server": "^3.
|
|
51
|
-
"@wwawing/event-emitter": "^3.
|
|
52
|
-
"@wwawing/loader": "^3.
|
|
53
|
-
"@wwawing/page-generator": "^3.
|
|
54
|
-
"@wwawing/styles": "^3.
|
|
48
|
+
"@wwawing/assets": "^3.9.0-beta.0",
|
|
49
|
+
"@wwawing/common-interface": "^3.9.0-beta.0",
|
|
50
|
+
"@wwawing/debug-server": "^3.9.0-beta.0",
|
|
51
|
+
"@wwawing/event-emitter": "^3.9.0-beta.0",
|
|
52
|
+
"@wwawing/loader": "^3.9.0-beta.0",
|
|
53
|
+
"@wwawing/page-generator": "^3.9.0-beta.0",
|
|
54
|
+
"@wwawing/styles": "^3.9.0-beta.0",
|
|
55
|
+
"@wwawing/virtual-pad": "^3.9.0-beta.0",
|
|
55
56
|
"crypto-js": "4.0.0",
|
|
56
57
|
"npm-run-all": "^4.1.5",
|
|
57
58
|
"pug": "^3.0.2",
|
|
@@ -59,8 +60,8 @@
|
|
|
59
60
|
"shx": "^0.3.3",
|
|
60
61
|
"terser-webpack-plugin": "^5.3.0",
|
|
61
62
|
"ts-loader": "^4.3.0",
|
|
62
|
-
"ts-node": "^10.
|
|
63
|
-
"typescript": "^4.
|
|
63
|
+
"ts-node": "^10.4.0",
|
|
64
|
+
"typescript": "^4.5.4",
|
|
64
65
|
"webpack": "^5.65.0",
|
|
65
66
|
"webpack-cli": "^4.9.1"
|
|
66
67
|
},
|
|
@@ -71,5 +72,5 @@
|
|
|
71
72
|
"node": ">=16",
|
|
72
73
|
"npm": ">=8"
|
|
73
74
|
},
|
|
74
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "31f57918222d901ab542e8382dcd2c2b79023af4"
|
|
75
76
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare type JsonResponseErrorKind = "brokenJson" | "httpError" | "connectionError";
|
|
2
|
-
export declare type JsonResponseKind = JsonResponseErrorKind | "data";
|
|
3
|
-
export declare type JsonResponseError<ErrorKind = JsonResponseErrorKind> = {
|
|
4
|
-
kind: ErrorKind;
|
|
5
|
-
errorMessage: string;
|
|
6
|
-
};
|
|
7
|
-
export declare type JsonResponseData = {
|
|
8
|
-
kind: "data";
|
|
9
|
-
data: unknown;
|
|
10
|
-
};
|
|
11
|
-
export declare type JsonResponse<ResponseKind = JsonResponseKind> = JsonResponseError<Exclude<ResponseKind, "data">> | JsonResponseData;
|
|
12
|
-
export declare const fetchJsonFile: (fileName: string) => Promise<JsonResponse>;
|
package/lib/wwa_sound.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare class Sound {
|
|
2
|
-
private id;
|
|
3
|
-
private fileName;
|
|
4
|
-
private audioContext;
|
|
5
|
-
private audioGain;
|
|
6
|
-
private audioBuffer;
|
|
7
|
-
private bufferSources;
|
|
8
|
-
private isLoaded;
|
|
9
|
-
private isExceededMaxRetryCount?;
|
|
10
|
-
constructor(id: number, fileName: string, audioContext: AudioContext, audioGain: GainNode);
|
|
11
|
-
private fetchSoundFile;
|
|
12
|
-
private getArrayBuffer;
|
|
13
|
-
private load;
|
|
14
|
-
private retry;
|
|
15
|
-
private setData;
|
|
16
|
-
private cancelLoad;
|
|
17
|
-
play(): void;
|
|
18
|
-
pause(): void;
|
|
19
|
-
isBgm(): boolean;
|
|
20
|
-
hasData(): boolean;
|
|
21
|
-
isLoading(): boolean;
|
|
22
|
-
isError(): boolean;
|
|
23
|
-
private disposeBufferSource;
|
|
24
|
-
}
|