rw-parser-ng 2.1.1 → 2.3.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/README.md +252 -52
- package/lib/codecs/bitmap.d.ts +6 -0
- package/lib/codecs/bitmap.js +77 -0
- package/lib/codecs/color.d.ts +6 -0
- package/lib/codecs/color.js +43 -0
- package/lib/codecs/dxt.d.ts +3 -0
- package/lib/codecs/dxt.js +212 -0
- package/lib/codecs/formats.d.ts +25 -0
- package/lib/codecs/formats.js +32 -0
- package/lib/codecs/index.d.ts +5 -0
- package/lib/codecs/index.js +21 -0
- package/lib/codecs/palette.d.ts +6 -0
- package/lib/codecs/palette.js +86 -0
- package/lib/common/types.d.ts +50 -0
- package/lib/common/types.js +2 -0
- package/lib/core/byte-stream.d.ts +20 -0
- package/lib/core/byte-stream.js +71 -0
- package/lib/core/errors.d.ts +5 -0
- package/lib/core/errors.js +34 -0
- package/lib/core/index.d.ts +5 -0
- package/lib/core/index.js +21 -0
- package/lib/core/rw-file.d.ts +9 -0
- package/lib/core/rw-file.js +36 -0
- package/lib/core/rw-sections.d.ts +24 -0
- package/lib/core/rw-sections.js +28 -0
- package/lib/core/rw-version.d.ts +3 -0
- package/lib/core/rw-version.js +27 -0
- package/lib/dff/dff-model-type.d.ts +5 -0
- package/lib/dff/dff-model-type.js +9 -0
- package/lib/dff/index.d.ts +4 -0
- package/lib/dff/index.js +20 -0
- package/lib/dff/parser.d.ts +5 -0
- package/lib/dff/parser.js +154 -0
- package/lib/dff/readers/2d-effect.d.ts +3 -0
- package/lib/dff/readers/2d-effect.js +211 -0
- package/lib/dff/readers/geometry.d.ts +4 -0
- package/lib/dff/readers/geometry.js +229 -0
- package/lib/dff/readers/index.d.ts +5 -0
- package/lib/dff/readers/index.js +21 -0
- package/lib/dff/readers/material.d.ts +5 -0
- package/lib/dff/readers/material.js +72 -0
- package/lib/dff/readers/mesh.d.ts +5 -0
- package/lib/dff/readers/mesh.js +84 -0
- package/lib/dff/readers/structure.d.ts +6 -0
- package/lib/dff/readers/structure.js +67 -0
- package/lib/dff/types.d.ts +237 -0
- package/lib/dff/types.js +44 -0
- package/lib/fxp/index.d.ts +2 -0
- package/lib/fxp/index.js +18 -0
- package/lib/fxp/info-parser.d.ts +2 -0
- package/lib/fxp/info-parser.js +169 -0
- package/lib/fxp/parser.d.ts +3 -0
- package/lib/fxp/parser.js +285 -0
- package/lib/fxp/types/common.d.ts +36 -0
- package/lib/fxp/types/common.js +2 -0
- package/lib/fxp/types/index.d.ts +3 -0
- package/lib/fxp/types/index.js +19 -0
- package/lib/fxp/types/info.d.ts +186 -0
- package/lib/fxp/types/info.js +2 -0
- package/lib/fxp/types/system.d.ts +27 -0
- package/lib/fxp/types/system.js +2 -0
- package/lib/ifp/index.d.ts +4 -0
- package/lib/ifp/index.js +20 -0
- package/lib/ifp/parser.d.ts +5 -0
- package/lib/ifp/parser.js +38 -0
- package/lib/ifp/readers/anp3.d.ts +3 -0
- package/lib/ifp/readers/anp3.js +56 -0
- package/lib/ifp/readers/anpk.d.ts +3 -0
- package/lib/ifp/readers/anpk.js +86 -0
- package/lib/ifp/types.d.ts +28 -0
- package/lib/ifp/types.js +9 -0
- package/lib/index.d.ts +6 -9
- package/lib/index.js +6 -13
- package/lib/renderware/fxp/FxpData.d.ts +246 -0
- package/lib/renderware/fxp/FxpData.js +2 -0
- package/lib/renderware/fxp/FxpParser.d.ts +3 -0
- package/lib/renderware/fxp/FxpParser.js +512 -0
- package/lib/renderware/fxp/index.d.ts +2 -0
- package/lib/renderware/fxp/index.js +18 -0
- package/lib/txd/bitmap-decoder.d.ts +3 -0
- package/lib/txd/bitmap-decoder.js +57 -0
- package/lib/txd/index.d.ts +3 -0
- package/lib/txd/index.js +19 -0
- package/lib/txd/parser.d.ts +8 -0
- package/lib/txd/parser.js +122 -0
- package/lib/txd/types.d.ts +27 -0
- package/lib/txd/types.js +2 -0
- package/package.json +16 -9
- package/src/codecs/bitmap.ts +75 -0
- package/src/codecs/color.ts +40 -0
- package/src/codecs/dxt.ts +243 -0
- package/src/codecs/formats.ts +28 -0
- package/src/codecs/index.ts +5 -0
- package/src/codecs/palette.ts +106 -0
- package/src/common/types.ts +59 -0
- package/src/core/byte-stream.ts +87 -0
- package/src/core/errors.ts +7 -0
- package/src/core/index.ts +5 -0
- package/src/core/rw-file.ts +23 -0
- package/src/core/rw-sections.ts +24 -0
- package/src/core/rw-version.ts +24 -0
- package/src/dff/dff-model-type.ts +5 -0
- package/src/dff/index.ts +4 -0
- package/src/dff/parser.ts +142 -0
- package/src/dff/readers/2d-effect.ts +265 -0
- package/src/dff/readers/geometry.ts +264 -0
- package/src/dff/readers/index.ts +5 -0
- package/src/dff/readers/material.ts +89 -0
- package/src/dff/readers/mesh.ts +93 -0
- package/src/dff/readers/structure.ts +79 -0
- package/src/dff/types.ts +278 -0
- package/src/fxp/index.ts +2 -0
- package/src/fxp/info-parser.ts +166 -0
- package/src/fxp/parser.ts +323 -0
- package/src/fxp/types/common.ts +23 -0
- package/src/fxp/types/index.ts +3 -0
- package/src/fxp/types/info.ts +251 -0
- package/src/fxp/types/system.ts +30 -0
- package/src/ifp/index.ts +4 -0
- package/src/ifp/parser.ts +16 -0
- package/src/ifp/readers/anp3.ts +75 -0
- package/src/ifp/readers/anpk.ts +110 -0
- package/src/ifp/types.ts +33 -0
- package/src/index.ts +6 -12
- package/src/txd/bitmap-decoder.ts +73 -0
- package/src/txd/index.ts +3 -0
- package/src/txd/parser.ts +148 -0
- package/src/txd/types.ts +29 -0
- package/src/renderware/RwFile.ts +0 -26
- package/src/renderware/RwSections.ts +0 -27
- package/src/renderware/common/types.ts +0 -59
- package/src/renderware/dff/DffModelType.ts +0 -5
- package/src/renderware/dff/DffParser.ts +0 -611
- package/src/renderware/errors/RwParseError.ts +0 -11
- package/src/renderware/ifp/IfpData.ts +0 -33
- package/src/renderware/ifp/IfpParser.ts +0 -203
- package/src/renderware/txd/TxdParser.ts +0 -235
- package/src/renderware/utils/ImageDecoder.ts +0 -571
- package/src/renderware/utils/ImageFormatEnums.ts +0 -28
- package/src/renderware/utils/RwVersion.ts +0 -28
- package/src/utils/ByteStream.ts +0 -80
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readAnp3 = readAnp3;
|
|
4
|
+
var types_1 = require("../types");
|
|
5
|
+
var QUAT_SCALE = 4096.0;
|
|
6
|
+
var POS_SCALE = 1024.0;
|
|
7
|
+
function readAnp3(file) {
|
|
8
|
+
file.skip(4); // ANP3 signature
|
|
9
|
+
file.readUint32(); // size
|
|
10
|
+
var name = file.readString(24);
|
|
11
|
+
var animationsCount = file.readUint32();
|
|
12
|
+
var animations = [];
|
|
13
|
+
for (var i = 0; i < animationsCount; i++) {
|
|
14
|
+
animations.push(readAnimation(file));
|
|
15
|
+
}
|
|
16
|
+
return { version: types_1.IfpVersion.ANP3, name: name, animations: animations };
|
|
17
|
+
}
|
|
18
|
+
function readAnimation(file) {
|
|
19
|
+
var name = file.readString(24);
|
|
20
|
+
var bonesCount = file.readUint32();
|
|
21
|
+
file.skip(8); // keyframes_size + unk
|
|
22
|
+
var bones = [];
|
|
23
|
+
for (var i = 0; i < bonesCount; i++) {
|
|
24
|
+
bones.push(readBone(file));
|
|
25
|
+
}
|
|
26
|
+
return { name: name, bones: bones };
|
|
27
|
+
}
|
|
28
|
+
function readBone(file) {
|
|
29
|
+
var name = file.readString(24);
|
|
30
|
+
var keyframeTypeNum = file.readUint32();
|
|
31
|
+
var keyframesCount = file.readUint32();
|
|
32
|
+
var keyframeType = keyframeTypeNum === 4 ? "KRT0" : "KR00";
|
|
33
|
+
var boneId = file.readInt32();
|
|
34
|
+
var keyframes = [];
|
|
35
|
+
var hasTranslation = keyframeType[2] === "T";
|
|
36
|
+
for (var i = 0; i < keyframesCount; i++) {
|
|
37
|
+
var qx = file.readInt16() / QUAT_SCALE;
|
|
38
|
+
var qy = file.readInt16() / QUAT_SCALE;
|
|
39
|
+
var qz = file.readInt16() / QUAT_SCALE;
|
|
40
|
+
var qw = file.readInt16() / QUAT_SCALE;
|
|
41
|
+
var time = file.readInt16();
|
|
42
|
+
var px = 0, py = 0, pz = 0;
|
|
43
|
+
if (hasTranslation) {
|
|
44
|
+
px = file.readInt16() / POS_SCALE;
|
|
45
|
+
py = file.readInt16() / POS_SCALE;
|
|
46
|
+
pz = file.readInt16() / POS_SCALE;
|
|
47
|
+
}
|
|
48
|
+
keyframes.push({
|
|
49
|
+
time: time,
|
|
50
|
+
position: { x: px, y: py, z: pz },
|
|
51
|
+
rotation: { w: qw, x: qx, y: qy, z: qz },
|
|
52
|
+
scale: { x: 1, y: 1, z: 1 },
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return { name: name, keyframeType: keyframeType, useBoneId: true, boneId: boneId, keyframes: keyframes };
|
|
56
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readAnpk = readAnpk;
|
|
4
|
+
var types_1 = require("../types");
|
|
5
|
+
function readAnpk(file) {
|
|
6
|
+
file.skip(4); // ANPK signature
|
|
7
|
+
file.readUint32(); // size
|
|
8
|
+
file.skip(4); // INFO
|
|
9
|
+
var infoLen = file.readUint32();
|
|
10
|
+
var animationsCount = file.readUint32();
|
|
11
|
+
var name = file.readString(infoLen - 4);
|
|
12
|
+
file.skip((4 - (infoLen % 4)) % 4); // align
|
|
13
|
+
var animations = [];
|
|
14
|
+
for (var i = 0; i < animationsCount; i++) {
|
|
15
|
+
animations.push(readAnimation(file));
|
|
16
|
+
}
|
|
17
|
+
return { version: types_1.IfpVersion.ANPK, name: name, animations: animations };
|
|
18
|
+
}
|
|
19
|
+
function readAnimation(file) {
|
|
20
|
+
file.skip(4); // NAME
|
|
21
|
+
var nameLen = file.readUint32();
|
|
22
|
+
var name = file.readString(nameLen);
|
|
23
|
+
file.skip((4 - (nameLen % 4)) % 4); // align
|
|
24
|
+
file.skip(4); // DGAN
|
|
25
|
+
file.skip(4); // animation_size
|
|
26
|
+
file.skip(4); // INFO
|
|
27
|
+
file.skip(4); // unk_size
|
|
28
|
+
var bonesCount = file.readUint32();
|
|
29
|
+
file.skip(4); // unk
|
|
30
|
+
var bones = [];
|
|
31
|
+
for (var i = 0; i < bonesCount; i++) {
|
|
32
|
+
bones.push(readBone(file));
|
|
33
|
+
}
|
|
34
|
+
return { name: name, bones: bones };
|
|
35
|
+
}
|
|
36
|
+
function readBone(file) {
|
|
37
|
+
file.skip(4); // CPAN
|
|
38
|
+
file.skip(4); // bone_len
|
|
39
|
+
file.skip(4); // ANIM
|
|
40
|
+
var animLen = file.readUint32();
|
|
41
|
+
var name = file.readString(28);
|
|
42
|
+
var keyframesCount = file.readUint32();
|
|
43
|
+
file.skip(8); // unk
|
|
44
|
+
var useBoneId = animLen === 44;
|
|
45
|
+
var boneId = 0;
|
|
46
|
+
if (useBoneId) {
|
|
47
|
+
boneId = file.readInt32();
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
file.skip(8); // sibling_x, sibling_y
|
|
51
|
+
}
|
|
52
|
+
var keyframeType = "K000";
|
|
53
|
+
var keyframes = [];
|
|
54
|
+
if (keyframesCount > 0) {
|
|
55
|
+
keyframeType = file.readString(4);
|
|
56
|
+
file.skip(4); // keyframes_len
|
|
57
|
+
var hasTranslation = keyframeType[2] === "T";
|
|
58
|
+
var hasScale = keyframeType[3] === "S";
|
|
59
|
+
for (var i = 0; i < keyframesCount; i++) {
|
|
60
|
+
var qx = file.readFloat();
|
|
61
|
+
var qy = file.readFloat();
|
|
62
|
+
var qz = file.readFloat();
|
|
63
|
+
var qw = file.readFloat();
|
|
64
|
+
var px = 0, py = 0, pz = 0;
|
|
65
|
+
if (hasTranslation) {
|
|
66
|
+
px = file.readFloat();
|
|
67
|
+
py = file.readFloat();
|
|
68
|
+
pz = file.readFloat();
|
|
69
|
+
}
|
|
70
|
+
var sx = 1, sy = 1, sz = 1;
|
|
71
|
+
if (hasScale) {
|
|
72
|
+
sx = file.readFloat();
|
|
73
|
+
sy = file.readFloat();
|
|
74
|
+
sz = file.readFloat();
|
|
75
|
+
}
|
|
76
|
+
var time = file.readFloat();
|
|
77
|
+
keyframes.push({
|
|
78
|
+
time: time,
|
|
79
|
+
position: { x: px, y: py, z: pz },
|
|
80
|
+
rotation: { w: qw, x: qx, y: qy, z: qz },
|
|
81
|
+
scale: { x: sx, y: sy, z: sz },
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return { name: name, keyframeType: keyframeType, useBoneId: useBoneId, boneId: boneId, keyframes: keyframes };
|
|
86
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RwQuaternion, RwVector3 } from "../common/types";
|
|
2
|
+
export declare enum IfpVersion {
|
|
3
|
+
ANP3 = 0,
|
|
4
|
+
ANPK = 1,
|
|
5
|
+
UNSUPPORTED = 2
|
|
6
|
+
}
|
|
7
|
+
export interface RwIfp {
|
|
8
|
+
version: IfpVersion;
|
|
9
|
+
name: string;
|
|
10
|
+
animations: RwIfpAnimation[];
|
|
11
|
+
}
|
|
12
|
+
export interface RwIfpAnimation {
|
|
13
|
+
name: string;
|
|
14
|
+
bones: RwIfpBone[];
|
|
15
|
+
}
|
|
16
|
+
export interface RwIfpBone {
|
|
17
|
+
name: string;
|
|
18
|
+
keyframeType: string;
|
|
19
|
+
useBoneId: boolean;
|
|
20
|
+
boneId: number;
|
|
21
|
+
keyframes: RwIfpKeyframe[];
|
|
22
|
+
}
|
|
23
|
+
export interface RwIfpKeyframe {
|
|
24
|
+
time: number;
|
|
25
|
+
position: RwVector3;
|
|
26
|
+
rotation: RwQuaternion;
|
|
27
|
+
scale: RwVector3;
|
|
28
|
+
}
|
package/lib/ifp/types.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IfpVersion = void 0;
|
|
4
|
+
var IfpVersion;
|
|
5
|
+
(function (IfpVersion) {
|
|
6
|
+
IfpVersion[IfpVersion["ANP3"] = 0] = "ANP3";
|
|
7
|
+
IfpVersion[IfpVersion["ANPK"] = 1] = "ANPK";
|
|
8
|
+
IfpVersion[IfpVersion["UNSUPPORTED"] = 2] = "UNSUPPORTED";
|
|
9
|
+
})(IfpVersion || (exports.IfpVersion = IfpVersion = {}));
|
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from './renderware/dff/DffModelType';
|
|
8
|
-
export * from './renderware/ifp/IfpData';
|
|
9
|
-
export * from './renderware/common/types';
|
|
1
|
+
export * from "./common/types";
|
|
2
|
+
export * from "./core";
|
|
3
|
+
export * from "./dff";
|
|
4
|
+
export * from "./fxp";
|
|
5
|
+
export * from "./ifp";
|
|
6
|
+
export * from "./txd";
|
package/lib/index.js
CHANGED
|
@@ -14,16 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Object.defineProperty(exports, "RwSections", { enumerable: true, get: function () { return RwSections_1.RwSections; } });
|
|
24
|
-
__exportStar(require("./renderware/dff/DffParser"), exports);
|
|
25
|
-
__exportStar(require("./renderware/txd/TxdParser"), exports);
|
|
26
|
-
__exportStar(require("./renderware/ifp/IfpParser"), exports);
|
|
27
|
-
__exportStar(require("./renderware/dff/DffModelType"), exports);
|
|
28
|
-
__exportStar(require("./renderware/ifp/IfpData"), exports);
|
|
29
|
-
__exportStar(require("./renderware/common/types"), exports);
|
|
17
|
+
__exportStar(require("./common/types"), exports);
|
|
18
|
+
__exportStar(require("./core"), exports);
|
|
19
|
+
__exportStar(require("./dff"), exports);
|
|
20
|
+
__exportStar(require("./fxp"), exports);
|
|
21
|
+
__exportStar(require("./ifp"), exports);
|
|
22
|
+
__exportStar(require("./txd"), exports);
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
export interface FxKeyframe {
|
|
2
|
+
time: number;
|
|
3
|
+
value: number;
|
|
4
|
+
}
|
|
5
|
+
export interface FxInterpData {
|
|
6
|
+
looped: boolean;
|
|
7
|
+
keys: FxKeyframe[];
|
|
8
|
+
}
|
|
9
|
+
export interface FxInfoEmRate {
|
|
10
|
+
type: "emrate";
|
|
11
|
+
rate: FxInterpData;
|
|
12
|
+
}
|
|
13
|
+
export interface FxInfoEmSize {
|
|
14
|
+
type: "emsize";
|
|
15
|
+
radius: FxInterpData;
|
|
16
|
+
sizeMinX: FxInterpData;
|
|
17
|
+
sizeMaxX: FxInterpData;
|
|
18
|
+
sizeMinY: FxInterpData;
|
|
19
|
+
sizeMaxY: FxInterpData;
|
|
20
|
+
sizeMinZ: FxInterpData;
|
|
21
|
+
sizeMaxZ: FxInterpData;
|
|
22
|
+
}
|
|
23
|
+
export interface FxInfoEmSpeed {
|
|
24
|
+
type: "emspeed";
|
|
25
|
+
speed: FxInterpData;
|
|
26
|
+
bias: FxInterpData;
|
|
27
|
+
}
|
|
28
|
+
export interface FxInfoEmDir {
|
|
29
|
+
type: "emdir";
|
|
30
|
+
dirX: FxInterpData;
|
|
31
|
+
dirY: FxInterpData;
|
|
32
|
+
dirZ: FxInterpData;
|
|
33
|
+
}
|
|
34
|
+
export interface FxInfoEmAngle {
|
|
35
|
+
type: "emangle";
|
|
36
|
+
min: FxInterpData;
|
|
37
|
+
max: FxInterpData;
|
|
38
|
+
}
|
|
39
|
+
export interface FxInfoEmLife {
|
|
40
|
+
type: "emlife";
|
|
41
|
+
life: FxInterpData;
|
|
42
|
+
bias: FxInterpData;
|
|
43
|
+
}
|
|
44
|
+
export interface FxInfoEmPos {
|
|
45
|
+
type: "empos";
|
|
46
|
+
x: FxInterpData;
|
|
47
|
+
y: FxInterpData;
|
|
48
|
+
z: FxInterpData;
|
|
49
|
+
}
|
|
50
|
+
export interface FxInfoEmWeather {
|
|
51
|
+
type: "emweather";
|
|
52
|
+
interp: FxInterpData;
|
|
53
|
+
}
|
|
54
|
+
export interface FxInfoEmRotation {
|
|
55
|
+
type: "emrotation";
|
|
56
|
+
min: FxInterpData;
|
|
57
|
+
max: FxInterpData;
|
|
58
|
+
}
|
|
59
|
+
export interface FxInfoNoise {
|
|
60
|
+
type: "noise";
|
|
61
|
+
x: FxInterpData;
|
|
62
|
+
y: FxInterpData;
|
|
63
|
+
z: FxInterpData;
|
|
64
|
+
}
|
|
65
|
+
export interface FxInfoForce {
|
|
66
|
+
type: "force";
|
|
67
|
+
forceX: FxInterpData;
|
|
68
|
+
forceY: FxInterpData;
|
|
69
|
+
forceZ: FxInterpData;
|
|
70
|
+
}
|
|
71
|
+
export interface FxInfoFriction {
|
|
72
|
+
type: "friction";
|
|
73
|
+
friction: FxInterpData;
|
|
74
|
+
}
|
|
75
|
+
export interface FxInfoAttractPt {
|
|
76
|
+
type: "attractpt";
|
|
77
|
+
x: FxInterpData;
|
|
78
|
+
y: FxInterpData;
|
|
79
|
+
z: FxInterpData;
|
|
80
|
+
power: FxInterpData;
|
|
81
|
+
}
|
|
82
|
+
export interface FxInfoAttractLine {
|
|
83
|
+
type: "attractline";
|
|
84
|
+
x1: FxInterpData;
|
|
85
|
+
y1: FxInterpData;
|
|
86
|
+
z1: FxInterpData;
|
|
87
|
+
x2: FxInterpData;
|
|
88
|
+
y2: FxInterpData;
|
|
89
|
+
z2: FxInterpData;
|
|
90
|
+
power: FxInterpData;
|
|
91
|
+
}
|
|
92
|
+
export interface FxInfoGroundCollide {
|
|
93
|
+
type: "groundcollide";
|
|
94
|
+
damping: FxInterpData;
|
|
95
|
+
bounce: FxInterpData;
|
|
96
|
+
}
|
|
97
|
+
export interface FxInfoWind {
|
|
98
|
+
type: "wind";
|
|
99
|
+
interp: FxInterpData;
|
|
100
|
+
}
|
|
101
|
+
export interface FxInfoJitter {
|
|
102
|
+
type: "jitter";
|
|
103
|
+
x: FxInterpData;
|
|
104
|
+
y: FxInterpData;
|
|
105
|
+
z: FxInterpData;
|
|
106
|
+
}
|
|
107
|
+
export interface FxInfoRotSpeed {
|
|
108
|
+
type: "rotspeed";
|
|
109
|
+
speed: FxInterpData;
|
|
110
|
+
speedBias: FxInterpData;
|
|
111
|
+
accel: FxInterpData;
|
|
112
|
+
accelBias: FxInterpData;
|
|
113
|
+
}
|
|
114
|
+
export interface FxInfoFloat {
|
|
115
|
+
type: "float";
|
|
116
|
+
interp: FxInterpData;
|
|
117
|
+
}
|
|
118
|
+
export interface FxInfoUnderwater {
|
|
119
|
+
type: "underwater";
|
|
120
|
+
}
|
|
121
|
+
export interface FxInfoColour {
|
|
122
|
+
type: "colour";
|
|
123
|
+
red: FxInterpData;
|
|
124
|
+
green: FxInterpData;
|
|
125
|
+
blue: FxInterpData;
|
|
126
|
+
alpha: FxInterpData;
|
|
127
|
+
}
|
|
128
|
+
export interface FxInfoSize {
|
|
129
|
+
type: "size";
|
|
130
|
+
sizeX: FxInterpData;
|
|
131
|
+
sizeY: FxInterpData;
|
|
132
|
+
sizeXBias: FxInterpData;
|
|
133
|
+
sizeYBias: FxInterpData;
|
|
134
|
+
}
|
|
135
|
+
export interface FxInfoSpriteRect {
|
|
136
|
+
type: "spriterect";
|
|
137
|
+
interps: FxInterpData[];
|
|
138
|
+
}
|
|
139
|
+
export interface FxInfoHeatHaze {
|
|
140
|
+
type: "heathaze";
|
|
141
|
+
interps: FxInterpData[];
|
|
142
|
+
}
|
|
143
|
+
export interface FxInfoTrail {
|
|
144
|
+
type: "trail";
|
|
145
|
+
interps: FxInterpData[];
|
|
146
|
+
}
|
|
147
|
+
export interface FxInfoFlat {
|
|
148
|
+
type: "flat";
|
|
149
|
+
rightX: FxInterpData;
|
|
150
|
+
rightY: FxInterpData;
|
|
151
|
+
rightZ: FxInterpData;
|
|
152
|
+
upX: FxInterpData;
|
|
153
|
+
upY: FxInterpData;
|
|
154
|
+
upZ: FxInterpData;
|
|
155
|
+
atX: FxInterpData;
|
|
156
|
+
atY: FxInterpData;
|
|
157
|
+
atZ: FxInterpData;
|
|
158
|
+
}
|
|
159
|
+
export interface FxInfoDir {
|
|
160
|
+
type: "dir";
|
|
161
|
+
interps: FxInterpData[];
|
|
162
|
+
}
|
|
163
|
+
export interface FxInfoAnimTexture {
|
|
164
|
+
type: "animtex";
|
|
165
|
+
interps: FxInterpData[];
|
|
166
|
+
}
|
|
167
|
+
export interface FxInfoColourRange {
|
|
168
|
+
type: "colourrange";
|
|
169
|
+
redMin: FxInterpData;
|
|
170
|
+
redMax: FxInterpData;
|
|
171
|
+
greenMin: FxInterpData;
|
|
172
|
+
greenMax: FxInterpData;
|
|
173
|
+
blueMin: FxInterpData;
|
|
174
|
+
blueMax: FxInterpData;
|
|
175
|
+
alphaMin: FxInterpData;
|
|
176
|
+
alphaMax: FxInterpData;
|
|
177
|
+
}
|
|
178
|
+
export interface FxInfoSelfLit {
|
|
179
|
+
type: "selflit";
|
|
180
|
+
}
|
|
181
|
+
export interface FxInfoColourBright {
|
|
182
|
+
type: "colourbright";
|
|
183
|
+
red: FxInterpData;
|
|
184
|
+
green: FxInterpData;
|
|
185
|
+
blue: FxInterpData;
|
|
186
|
+
alpha: FxInterpData;
|
|
187
|
+
brightness: FxInterpData;
|
|
188
|
+
}
|
|
189
|
+
export interface FxInfoSmoke {
|
|
190
|
+
type: "smoke";
|
|
191
|
+
interps: FxInterpData[];
|
|
192
|
+
}
|
|
193
|
+
export type FxInfo = FxInfoEmRate | FxInfoEmSize | FxInfoEmSpeed | FxInfoEmDir | FxInfoEmAngle | FxInfoEmLife | FxInfoEmPos | FxInfoEmWeather | FxInfoEmRotation | FxInfoNoise | FxInfoForce | FxInfoFriction | FxInfoAttractPt | FxInfoAttractLine | FxInfoGroundCollide | FxInfoWind | FxInfoJitter | FxInfoRotSpeed | FxInfoFloat | FxInfoUnderwater | FxInfoColour | FxInfoSize | FxInfoSpriteRect | FxInfoHeatHaze | FxInfoTrail | FxInfoFlat | FxInfoDir | FxInfoAnimTexture | FxInfoColourRange | FxInfoSelfLit | FxInfoColourBright | FxInfoSmoke;
|
|
194
|
+
export interface FxMatrix {
|
|
195
|
+
right: {
|
|
196
|
+
x: number;
|
|
197
|
+
y: number;
|
|
198
|
+
z: number;
|
|
199
|
+
};
|
|
200
|
+
up: {
|
|
201
|
+
x: number;
|
|
202
|
+
y: number;
|
|
203
|
+
z: number;
|
|
204
|
+
};
|
|
205
|
+
at: {
|
|
206
|
+
x: number;
|
|
207
|
+
y: number;
|
|
208
|
+
z: number;
|
|
209
|
+
};
|
|
210
|
+
pos: {
|
|
211
|
+
x: number;
|
|
212
|
+
y: number;
|
|
213
|
+
z: number;
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
export interface FxEmitterBP {
|
|
217
|
+
name: string;
|
|
218
|
+
matrix: FxMatrix;
|
|
219
|
+
textures: (string | null)[];
|
|
220
|
+
alphaOn: boolean;
|
|
221
|
+
srcBlendId: number;
|
|
222
|
+
dstBlendId: number;
|
|
223
|
+
lodStart: number;
|
|
224
|
+
lodEnd: number;
|
|
225
|
+
infos: FxInfo[];
|
|
226
|
+
}
|
|
227
|
+
export interface FxBoundingSphere {
|
|
228
|
+
x: number;
|
|
229
|
+
y: number;
|
|
230
|
+
z: number;
|
|
231
|
+
radius: number;
|
|
232
|
+
}
|
|
233
|
+
export interface FxSystemBP {
|
|
234
|
+
filename: string;
|
|
235
|
+
name: string;
|
|
236
|
+
length: number;
|
|
237
|
+
loopIntervalMin: number;
|
|
238
|
+
loopLength: number;
|
|
239
|
+
playMode: number;
|
|
240
|
+
cullDist: number;
|
|
241
|
+
boundingSphere: FxBoundingSphere | null;
|
|
242
|
+
prims: FxEmitterBP[];
|
|
243
|
+
}
|
|
244
|
+
export interface FxProject {
|
|
245
|
+
systems: Map<string, FxSystemBP>;
|
|
246
|
+
}
|