run-scene-v2 0.1.149 → 0.1.151
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/build/index.js +1 -1
- package/package.json +1 -1
- package/types/src/Const/constMaterial.d.ts +1 -1
- package/types/src/Const/constRunScene.d.ts +1 -1
- package/types/src/Const/constStr.d.ts +2 -0
- package/types/src/LtPostProcessing/BaseLtPostProcessing.d.ts +1 -0
- package/types/src/LtPostProcessing/Outline.d.ts +5 -9
- package/types/src/LtPostProcessing/SelectiveBloom.d.ts +3 -2
- package/types/src/Material/Def.MaterialEx.d.ts +4 -0
- package/types/src/Material/MaterialDefMap.d.ts +4 -0
- package/types/src/Material/MaterialDefType.d.ts +1 -1
- package/types/src/Material/MaterialRegistry.d.ts +1 -3
- package/types/src/Material/defMaterial/ForceShield.d.ts +16 -0
- package/types/src/Material/defMaterial/WireframeReveal.d.ts +16 -0
- package/types/src/ModelEx/Model.Debug.d.ts +107 -0
- package/types/src/ModelEx/ModelEx.d.ts +12 -0
- package/types/src/ModelEx/ModelExDef/ModelExDef.d.ts +1 -1
- package/types/src/OptionsEx.d.ts +5 -0
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const defMaterialNames: readonly ["BasicMaterial", "SpriteMaterial", "FakeInterior", "Reflector", "Fresnel", "Physical", "Matcap", "TreeLeaf", "Weather", "MixTexture", "SkyBox", "MeshPhongMaterial", "MyMeshLambertMaterial", "MeshReflectorMaterial", "InteriorMappingMaterial"];
|
|
1
|
+
export declare const defMaterialNames: readonly ["BasicMaterial", "SpriteMaterial", "FakeInterior", "Reflector", "Fresnel", "Physical", "Matcap", "TreeLeaf", "Weather", "MixTexture", "SkyBox", "MeshPhongMaterial", "MyMeshLambertMaterial", "MeshReflectorMaterial", "InteriorMappingMaterial", "ForceShield", "WireframeReveal"];
|
|
2
2
|
export declare const commonMaterialNames: readonly ["BasicMaterial", "FakeInterior", "Fresnel", "Physical", "Matcap", "TreeLeaf", "Weather", "MixTexture", "SkyBox", "MeshPhongMaterial", "MyMeshLambertMaterial"];
|
|
@@ -58,6 +58,7 @@ export default abstract class BaseLtPostProcessing {
|
|
|
58
58
|
init(): void;
|
|
59
59
|
bindSnapshot(): void;
|
|
60
60
|
onSetState?(state: boolean): void;
|
|
61
|
+
canbeState?(state: boolean): boolean;
|
|
61
62
|
setState(state: boolean): Promise<void>;
|
|
62
63
|
setSize: (inputData?: any) => void;
|
|
63
64
|
setModel?(map: {
|
|
@@ -93,6 +93,7 @@ export default class Outline extends BaseLtPostProcessing {
|
|
|
93
93
|
static needInit: boolean;
|
|
94
94
|
afterLoadedCreate: boolean;
|
|
95
95
|
index: number;
|
|
96
|
+
protected num: number;
|
|
96
97
|
onInited(): void;
|
|
97
98
|
create(): any;
|
|
98
99
|
catchModels: any[];
|
|
@@ -103,8 +104,10 @@ export default class Outline extends BaseLtPostProcessing {
|
|
|
103
104
|
_setModel: (...any: any) => void;
|
|
104
105
|
getSelection(): any;
|
|
105
106
|
closeAll(): void;
|
|
107
|
+
canbeState(state: boolean): boolean;
|
|
108
|
+
onModelSizeChange(size: number): void;
|
|
106
109
|
}
|
|
107
|
-
export declare class Outline1 extends
|
|
110
|
+
export declare class Outline1 extends Outline {
|
|
108
111
|
name: TypeLtPostProcessing["type"];
|
|
109
112
|
static config: {
|
|
110
113
|
[x: string]: {
|
|
@@ -192,18 +195,11 @@ export declare class Outline1 extends BaseLtPostProcessing {
|
|
|
192
195
|
type?: "number" | "boolean" | "color" | "text" | "select" | "texture" | "color_obj" | "color_str" | "v2" | "v3" | "other" | "btn";
|
|
193
196
|
};
|
|
194
197
|
};
|
|
195
|
-
|
|
196
|
-
static needInit: boolean;
|
|
197
|
-
afterLoadedCreate: boolean;
|
|
198
|
-
index: number;
|
|
198
|
+
protected num: number;
|
|
199
199
|
onInited(): void;
|
|
200
200
|
create(): any;
|
|
201
|
-
catchModels: any[];
|
|
202
201
|
setModel(map: {
|
|
203
202
|
model: any;
|
|
204
203
|
state: boolean;
|
|
205
204
|
}): void;
|
|
206
|
-
_setModel: (...any: any) => void;
|
|
207
|
-
getSelection(): any;
|
|
208
|
-
closeAll(): void;
|
|
209
205
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SelectiveBloomEffect } from "postprocessing-fork";
|
|
2
1
|
import MapEx from "../Ex/MapEx";
|
|
3
2
|
import BaseLtPostProcessing from "./BaseLtPostProcessing";
|
|
4
3
|
import type { TypeLtPostProcessing } from "./LtPostProcessing";
|
|
@@ -93,7 +92,7 @@ export default class SelectiveBloom extends BaseLtPostProcessing {
|
|
|
93
92
|
};
|
|
94
93
|
paramsConfig: ParamsConfigManager<unknown>;
|
|
95
94
|
static paramsConfig: ParamsConfigManager<unknown>;
|
|
96
|
-
effect:
|
|
95
|
+
effect: any;
|
|
97
96
|
static needInit: boolean;
|
|
98
97
|
afterLoadedCreate: boolean;
|
|
99
98
|
index: number;
|
|
@@ -106,4 +105,6 @@ export default class SelectiveBloom extends BaseLtPostProcessing {
|
|
|
106
105
|
state: boolean;
|
|
107
106
|
}): void;
|
|
108
107
|
_setModel: (...any: any) => void;
|
|
108
|
+
canbeState(_state: boolean): boolean;
|
|
109
|
+
onModelSizeChange(_size: number): void;
|
|
109
110
|
}
|
|
@@ -14,6 +14,8 @@ import { Reflector } from "./defMaterial/Reflector";
|
|
|
14
14
|
import { SkyBox } from "./defMaterial/SkyBox";
|
|
15
15
|
import { TreeLeaf } from "./defMaterial/TreeLeaf";
|
|
16
16
|
import { Weather } from "./defMaterial/Weather";
|
|
17
|
+
import { ForceShield } from "./defMaterial/ForceShield";
|
|
18
|
+
import { WireframeReveal } from "./defMaterial/WireframeReveal";
|
|
17
19
|
export default class DefMaterial {
|
|
18
20
|
runScene: RunScene;
|
|
19
21
|
map: {
|
|
@@ -29,6 +31,8 @@ export default class DefMaterial {
|
|
|
29
31
|
SkyBox: SkyBox;
|
|
30
32
|
BasicMaterial: BasicMaterial;
|
|
31
33
|
ExMaterial: ExMaterial;
|
|
34
|
+
ForceShield: ForceShield;
|
|
35
|
+
WireframeReveal: WireframeReveal;
|
|
32
36
|
};
|
|
33
37
|
constructor(runScene: RunScene);
|
|
34
38
|
getFn(type: DefMaterialType["all"]): any;
|
|
@@ -16,6 +16,8 @@ import { Reflector } from "./defMaterial/Reflector";
|
|
|
16
16
|
import { SkyBox } from "./defMaterial/SkyBox";
|
|
17
17
|
import { TreeLeaf } from "./defMaterial/TreeLeaf";
|
|
18
18
|
import { Weather } from "./defMaterial/Weather";
|
|
19
|
+
import { ForceShield } from "./defMaterial/ForceShield";
|
|
20
|
+
import { WireframeReveal } from "./defMaterial/WireframeReveal";
|
|
19
21
|
import { materialRegistry } from "./MaterialRegistry";
|
|
20
22
|
export declare const defMaterialMap: {
|
|
21
23
|
readonly SpriteMaterial: typeof MySpriteMaterial;
|
|
@@ -38,6 +40,8 @@ export declare const defMaterialMap: {
|
|
|
38
40
|
readonly MyMeshLambertMaterial: typeof MyMeshLambertMaterial;
|
|
39
41
|
readonly "group-projected": typeof GroundProjected;
|
|
40
42
|
readonly ExMaterial: typeof ExMaterial;
|
|
43
|
+
readonly ForceShield: typeof ForceShield;
|
|
44
|
+
readonly WireframeReveal: typeof WireframeReveal;
|
|
41
45
|
};
|
|
42
46
|
export declare const defMaterialExMap: {
|
|
43
47
|
readonly InteriorMappingMaterial: import("./MaterialEx/InteriorMappingMaterial").default;
|
|
@@ -6,7 +6,7 @@ import type MultiLeverUndo from "../Undo/UndoMultiLevel";
|
|
|
6
6
|
import type ImportMaterial from "./ExportAndImport/ImportMaterial";
|
|
7
7
|
import type { SnapshotType } from "../Snapshot/SnapshotType";
|
|
8
8
|
export declare type DefMaterialType = {
|
|
9
|
-
all: "SpriteMaterial" | "FakeInterior" | "Fresnel" | "Matcap" | "MixTexture" | "Physical" | "Reflector" | "TreeLeaf" | "Weather" | "SkyBox" | "LineBasicMaterial" | "BasicMaterial" | "MyMeshPhongMaterial" | "MeshPhongMaterial" | "MyMeshLambertMaterial" | "MeshLambertMaterial" | "MyPointsMaterial" | "MeshReflectorMaterial" | "InteriorMappingMaterial";
|
|
9
|
+
all: "SpriteMaterial" | "FakeInterior" | "Fresnel" | "Matcap" | "MixTexture" | "Physical" | "Reflector" | "TreeLeaf" | "Weather" | "SkyBox" | "LineBasicMaterial" | "BasicMaterial" | "MyMeshPhongMaterial" | "MeshPhongMaterial" | "MyMeshLambertMaterial" | "MeshLambertMaterial" | "MyPointsMaterial" | "MeshReflectorMaterial" | "InteriorMappingMaterial" | "ForceShield" | "WireframeReveal";
|
|
10
10
|
subType: "ExMaterial";
|
|
11
11
|
};
|
|
12
12
|
export declare type MyMaterialType = {
|
|
@@ -6,9 +6,7 @@ import { ExportGltfTextures, MyMaterialType } from "./MaterialDefType";
|
|
|
6
6
|
declare class MaterialRegistry {
|
|
7
7
|
private static instance;
|
|
8
8
|
private materialTools;
|
|
9
|
-
defMap: {
|
|
10
|
-
RiverMaterial: any;
|
|
11
|
-
};
|
|
9
|
+
defMap: {};
|
|
12
10
|
private constructor();
|
|
13
11
|
static getInstance(): MaterialRegistry;
|
|
14
12
|
registerMaterial(key: keyof DefMaterialMapType, tools: MyMaterialType["tools"]): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import RunScene from "../../RunScene";
|
|
2
|
+
import { E } from "../../Types/Engine";
|
|
3
|
+
import { MyMaterialType } from "../MaterialDefType";
|
|
4
|
+
import { SnapshotType } from "../../Snapshot/SnapshotType";
|
|
5
|
+
export declare const snapshotDefForForceShieldMaterial: SnapshotType["Def"];
|
|
6
|
+
export declare class ForceShield {
|
|
7
|
+
runScene: RunScene;
|
|
8
|
+
private static readonly IgnoredAttributes;
|
|
9
|
+
constructor(runScene: RunScene);
|
|
10
|
+
undo(map: {
|
|
11
|
+
material: E.Material;
|
|
12
|
+
list: string[];
|
|
13
|
+
val: any;
|
|
14
|
+
}): void;
|
|
15
|
+
static tools: MyMaterialType["tools"];
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import RunScene from "../../RunScene";
|
|
2
|
+
import { E } from "../../Types/Engine";
|
|
3
|
+
import { MyMaterialType } from "../MaterialDefType";
|
|
4
|
+
import { SnapshotType } from "../../Snapshot/SnapshotType";
|
|
5
|
+
export declare const snapshotDefForWireframeRevealMaterial: SnapshotType["Def"];
|
|
6
|
+
export declare class WireframeReveal {
|
|
7
|
+
runScene: RunScene;
|
|
8
|
+
private static readonly IgnoredAttributes;
|
|
9
|
+
constructor(runScene: RunScene);
|
|
10
|
+
undo(map: {
|
|
11
|
+
material: E.Material;
|
|
12
|
+
list: string[];
|
|
13
|
+
val: any;
|
|
14
|
+
}): void;
|
|
15
|
+
static tools: MyMaterialType["tools"];
|
|
16
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { E } from "../Types/Engine";
|
|
2
|
+
export interface ModelDebugInfo {
|
|
3
|
+
id: string;
|
|
4
|
+
uuid: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
position: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
z: number;
|
|
11
|
+
};
|
|
12
|
+
rotation: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
z: number;
|
|
16
|
+
};
|
|
17
|
+
scale: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
z: number;
|
|
21
|
+
};
|
|
22
|
+
worldPosition: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
z: number;
|
|
26
|
+
};
|
|
27
|
+
worldRotation: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
z: number;
|
|
31
|
+
};
|
|
32
|
+
worldScale: {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
z: number;
|
|
36
|
+
};
|
|
37
|
+
parent: {
|
|
38
|
+
id: string | null;
|
|
39
|
+
uuid: string;
|
|
40
|
+
name: string;
|
|
41
|
+
position: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
z: number;
|
|
45
|
+
};
|
|
46
|
+
rotation: {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
z: number;
|
|
50
|
+
};
|
|
51
|
+
scale: {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
z: number;
|
|
55
|
+
};
|
|
56
|
+
} | null;
|
|
57
|
+
geometry: {
|
|
58
|
+
uuid: string;
|
|
59
|
+
hasBoundingBox: boolean;
|
|
60
|
+
boundingBox: {
|
|
61
|
+
min: {
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
z: number;
|
|
65
|
+
};
|
|
66
|
+
max: {
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
z: number;
|
|
70
|
+
};
|
|
71
|
+
center: {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
z: number;
|
|
75
|
+
};
|
|
76
|
+
} | null;
|
|
77
|
+
vertexCount: number;
|
|
78
|
+
} | null;
|
|
79
|
+
matrix: number[];
|
|
80
|
+
matrixWorld: number[];
|
|
81
|
+
}
|
|
82
|
+
export declare const modelDebug: {
|
|
83
|
+
/**
|
|
84
|
+
* 打印模型的详细调试信息
|
|
85
|
+
* 用于调试 setClonedModels 方法中的位置问题
|
|
86
|
+
*/
|
|
87
|
+
printModelsInfo(models: E.unknowModel[], label?: string): ModelDebugInfo[];
|
|
88
|
+
/**
|
|
89
|
+
* 获取单个模型的完整调试信息
|
|
90
|
+
*/
|
|
91
|
+
getModelDebugInfo(model: E.unknowModel): ModelDebugInfo | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* 格式化打印单个模型的信息
|
|
94
|
+
*/
|
|
95
|
+
printModelInfo(info: ModelDebugInfo): void;
|
|
96
|
+
/**
|
|
97
|
+
* 比较两组模型信息,找出差异
|
|
98
|
+
*/
|
|
99
|
+
compareModelsInfo(beforeModels: E.unknowModel[], afterModels: E.unknowModel[], label?: string): {
|
|
100
|
+
beforeInfo: ModelDebugInfo[];
|
|
101
|
+
afterInfo: ModelDebugInfo[];
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* 导出模型信息为 JSON(用于保存和分析)
|
|
105
|
+
*/
|
|
106
|
+
exportModelsInfoAsJSON(models: E.unknowModel[], filename?: string): string;
|
|
107
|
+
};
|
|
@@ -55,6 +55,16 @@ export default class EngineModel {
|
|
|
55
55
|
def: ModelExDef;
|
|
56
56
|
camFlow: ModelExCamFlow;
|
|
57
57
|
instance: ModelInstance;
|
|
58
|
+
debug: {
|
|
59
|
+
printModelsInfo(models: any[], label?: string): import("./Model.Debug").ModelDebugInfo[];
|
|
60
|
+
getModelDebugInfo(model: any): import("./Model.Debug").ModelDebugInfo;
|
|
61
|
+
printModelInfo(info: import("./Model.Debug").ModelDebugInfo): void;
|
|
62
|
+
compareModelsInfo(beforeModels: any[], afterModels: any[], label?: string): {
|
|
63
|
+
beforeInfo: import("./Model.Debug").ModelDebugInfo[];
|
|
64
|
+
afterInfo: import("./Model.Debug").ModelDebugInfo[];
|
|
65
|
+
};
|
|
66
|
+
exportModelsInfoAsJSON(models: any[], filename?: string): string;
|
|
67
|
+
};
|
|
58
68
|
get select(): E.Model | undefined;
|
|
59
69
|
set select(model: E.Model | undefined);
|
|
60
70
|
defNodeMap: {
|
|
@@ -214,6 +224,8 @@ export default class EngineModel {
|
|
|
214
224
|
renderer?: E.Render;
|
|
215
225
|
inputBoxHelper?: any;
|
|
216
226
|
zoom?: number;
|
|
227
|
+
/** 直接指定聚焦距离(优先级高于 zoom);传入数字如 50 则相机固定远离聚焦点 50 单位 */
|
|
228
|
+
distance?: number;
|
|
217
229
|
keepMinDistance?: boolean;
|
|
218
230
|
}) => void;
|
|
219
231
|
instanceModel(m: E.unknowModel): void;
|
|
@@ -3,7 +3,7 @@ import type { E } from "../../Types/Engine";
|
|
|
3
3
|
import { DefModelTypes } from "../ModelType";
|
|
4
4
|
import GroundProjected from "./GroundProjected/GroundProjected";
|
|
5
5
|
import Lod from "./Lod";
|
|
6
|
-
import { TypeModelBase } from
|
|
6
|
+
import { TypeModelBase } from "./ModelBaseType";
|
|
7
7
|
import Vertices from "./Vertices/Vertices";
|
|
8
8
|
import WaterModel from "./WaterModel";
|
|
9
9
|
import { RandomTree } from "./RandomTree";
|