run-scene-v2 0.1.136 → 0.1.138
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/Assets/Assets.d.ts +1 -1
- package/types/src/Code.d.ts +1 -1
- package/types/src/Const/constModel.d.ts +1 -1
- package/types/src/Const/constRunScene.d.ts +2 -1
- package/types/src/Exporter/GLTFExporter/ExporterGltf.d.ts +3 -0
- package/types/src/Graph/GraphBase.d.ts +1 -0
- package/types/src/ModelEx/ModelExDef/ModelExDef.d.ts +2 -0
- package/types/src/ModelEx/ModelExDef/WindField.d.ts +57 -0
- package/types/src/OptionsEx.d.ts +1 -0
- package/types/src/Texture/TextureEx.d.ts +7 -2
- package/types/src/Texture/TextureUtils.d.ts +3 -1
- package/types/src/Types/Engine.d.ts +2 -2
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ export default class Assets {
|
|
|
33
33
|
scene: import("run-scene-core").Scene;
|
|
34
34
|
camera: import("run-scene-core").PerspectiveCamera;
|
|
35
35
|
renderer: import("run-scene-core").WebGLRenderer;
|
|
36
|
-
controls: import("
|
|
36
|
+
controls: import("../Controls/ConstrainedOrbitControls").ConstrainedOrbitControls;
|
|
37
37
|
engineDom: HTMLElement;
|
|
38
38
|
render2: CSS3DRenderer;
|
|
39
39
|
render3: CSS3DRenderer;
|
package/types/src/Code.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export default class Code {
|
|
|
27
27
|
scene: Three.Scene;
|
|
28
28
|
camera: Three.PerspectiveCamera;
|
|
29
29
|
renderer: Three.WebGLRenderer;
|
|
30
|
-
controls: import("
|
|
30
|
+
controls: import("./Controls/ConstrainedOrbitControls").ConstrainedOrbitControls;
|
|
31
31
|
engineDom: HTMLElement;
|
|
32
32
|
render2: import("run-scene-core/examples/jsm/renderers/CSS3DRenderer").CSS3DRenderer;
|
|
33
33
|
render3: import("run-scene-core/examples/jsm/renderers/CSS3DRenderer").CSS3DRenderer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const defModelNames: readonly ["Group", "Box", "Plane", "Sphere", "Sprite", "VerticesRain", "Water", "3DDom", "3DSprite", "2DDom", "GroundProjected", "Lod", "RandomTree", "FluffyGrass", "Atmosphere", "Text"];
|
|
1
|
+
export declare const defModelNames: readonly ["Group", "Box", "Plane", "Sphere", "Sprite", "VerticesRain", "Water", "3DDom", "3DSprite", "2DDom", "GroundProjected", "Lod", "RandomTree", "FluffyGrass", "Atmosphere", "WindField", "Text"];
|
|
2
2
|
export declare const commonModelNames: readonly ["Group", "Box", "Plane", "Sprite", "VerticesRain", "Water", "GroundProjected", "3DDom", "3DSprite", "2DDom"];
|
|
3
3
|
export declare const constModelNameForDom: readonly ["3DDom", "3DSprite", "2DDom"];
|
|
4
4
|
export declare const exModelNames: readonly ["test", "Text"];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare const version = "0.1.
|
|
1
|
+
export declare const version = "0.1.138";
|
|
2
2
|
export declare const versionStr: string;
|
|
3
3
|
import "./constStr";
|
|
4
4
|
import "./constAssets";
|
|
5
5
|
export declare const defExt = ".lt";
|
|
6
|
+
export declare const defCompressExt = ".ltc";
|
|
6
7
|
export declare const defFileName = "linktwins.lt";
|
|
7
8
|
export declare const sliceBufferStr = "_||_";
|
|
@@ -341,6 +341,7 @@ export default abstract class GraphBase extends LGraphNode {
|
|
|
341
341
|
drawMessage(ctx: CanvasRenderingContext2D): void;
|
|
342
342
|
drawRoundRect(ctx: CanvasRenderingContext2D, r: number, x: number, y: number, w: number, h: number): void;
|
|
343
343
|
hasSubNode(type: "input" | "out", name: string): boolean;
|
|
344
|
+
getIns(): Graph;
|
|
344
345
|
log(any: string, parms?: GraphBaseType["triggerParms"]): void;
|
|
345
346
|
findOutNodeByName(name: string): GraphBase[];
|
|
346
347
|
onLoadProperties(map: Obj): void;
|
|
@@ -9,6 +9,7 @@ import WaterModel from "./WaterModel";
|
|
|
9
9
|
import { RandomTree } from "./RandomTree";
|
|
10
10
|
import { FluffyGrass } from "./FluffyGrass";
|
|
11
11
|
import Atmosphere from "./Atmosphere";
|
|
12
|
+
import WindField from "./WindField";
|
|
12
13
|
export declare type ModelExDefType = {
|
|
13
14
|
tools: {
|
|
14
15
|
type: string;
|
|
@@ -28,6 +29,7 @@ export default class ModelExDef {
|
|
|
28
29
|
lod: Lod;
|
|
29
30
|
fluffyGrass: FluffyGrass;
|
|
30
31
|
atmosphere: Atmosphere;
|
|
32
|
+
windField: WindField;
|
|
31
33
|
models: string[];
|
|
32
34
|
constructor(runScene: RunScene);
|
|
33
35
|
createSavedModel(type: DefModelTypes): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import RunScene from "../../RunScene";
|
|
2
|
+
import { ParamsConfigManager } from "../../Config/ParamsConfig";
|
|
3
|
+
import { E } from "../../Types/Engine";
|
|
4
|
+
import { HelperBeforeModel } from "./BeforeModel";
|
|
5
|
+
import { Obj } from "js-funcs";
|
|
6
|
+
import { TypeModelBase } from "./ModelBaseType";
|
|
7
|
+
export default class WindField implements HelperBeforeModel {
|
|
8
|
+
isHelperBeforeModel: boolean;
|
|
9
|
+
runScene: RunScene;
|
|
10
|
+
models: any[];
|
|
11
|
+
paramsConfig: ParamsConfigManager<unknown>;
|
|
12
|
+
static paramsConfig: ParamsConfigManager<unknown>;
|
|
13
|
+
static type: string;
|
|
14
|
+
type: string;
|
|
15
|
+
private windFields;
|
|
16
|
+
private windPlanes;
|
|
17
|
+
private lbmBuffers;
|
|
18
|
+
private lbmComputeMaterial;
|
|
19
|
+
private lbmRenderMaterial;
|
|
20
|
+
private computeGeometry;
|
|
21
|
+
private computeScene;
|
|
22
|
+
private computeCamera;
|
|
23
|
+
constructor(runScene: RunScene);
|
|
24
|
+
dispose(): void;
|
|
25
|
+
private initializeLBMCompute;
|
|
26
|
+
private createLBMComputeMaterial;
|
|
27
|
+
private createLBMRenderMaterial;
|
|
28
|
+
private updateModel;
|
|
29
|
+
private createLBMBuffers;
|
|
30
|
+
private initializeLBMTexture;
|
|
31
|
+
private performLBMStep;
|
|
32
|
+
private debugVelocityField;
|
|
33
|
+
private updateObstacles;
|
|
34
|
+
private updateObstacleData;
|
|
35
|
+
private isDescendant;
|
|
36
|
+
private getBounds;
|
|
37
|
+
create(map?: {
|
|
38
|
+
oldParams?: Obj;
|
|
39
|
+
}): any;
|
|
40
|
+
private createWindFieldModel;
|
|
41
|
+
private createLBMPlane;
|
|
42
|
+
private createWindPlane;
|
|
43
|
+
private initializeWindField;
|
|
44
|
+
private updateWindFieldConfig;
|
|
45
|
+
private updateWindPlaneVisualization;
|
|
46
|
+
private updateBoundsConfig;
|
|
47
|
+
private updateWindPlaneConfig;
|
|
48
|
+
to(model: E.unknowModel): void;
|
|
49
|
+
toNormal: (map: {
|
|
50
|
+
type: string;
|
|
51
|
+
model: E.unknowModel;
|
|
52
|
+
runScene: RunScene;
|
|
53
|
+
}) => {
|
|
54
|
+
model: any;
|
|
55
|
+
};
|
|
56
|
+
parse: (map: TypeModelBase["process"]) => any[];
|
|
57
|
+
}
|
package/types/src/OptionsEx.d.ts
CHANGED
|
@@ -76,7 +76,9 @@ export default class EngineTexture {
|
|
|
76
76
|
clone(oldTexture: E.Texture): E.Texture;
|
|
77
77
|
getDef(img?: ImageBitmap): Texture;
|
|
78
78
|
private getSameAndAddtoAll;
|
|
79
|
-
afterLoad(texture: E.Texture, blob?: Blob
|
|
79
|
+
afterLoad(texture: E.Texture, blob?: Blob, opts?: {
|
|
80
|
+
md5?: boolean;
|
|
81
|
+
}): Promise<Texture>;
|
|
80
82
|
getSameTexture(md5: string, oldTexture: E.Texture): E.Texture | undefined;
|
|
81
83
|
initTextureAndAddtoAll(texture: E.Texture): Promise<Texture>;
|
|
82
84
|
addTextureToAll(texture: E.Texture): void;
|
|
@@ -87,6 +89,7 @@ export default class EngineTexture {
|
|
|
87
89
|
coverByImage(texture: E.Texture, file: File | null | E.Texture, opts?: {
|
|
88
90
|
addUndo?: boolean;
|
|
89
91
|
}): Promise<UndoBase[]>;
|
|
92
|
+
setTextureEncodeing(texture: E.Texture, opts: string): void;
|
|
90
93
|
remove(texture: E.Texture | E.Texture[]): Promise<void>;
|
|
91
94
|
delete(texture: E.Texture): void;
|
|
92
95
|
setAnima: (m: {
|
|
@@ -102,7 +105,9 @@ export default class EngineTexture {
|
|
|
102
105
|
getSize(texture: E.Texture): number;
|
|
103
106
|
setEncoding(encoding: "def" | "srgb"): void;
|
|
104
107
|
getAllBase64ByType(_type: "id"): {};
|
|
105
|
-
createByImg(img: ImageBitmap | ImageData, blob?: Blob
|
|
108
|
+
createByImg(img: ImageBitmap | ImageData, blob?: Blob, opts?: {
|
|
109
|
+
md5?: boolean;
|
|
110
|
+
}): Promise<Texture>;
|
|
106
111
|
bindDataForTexture(t: E.Texture, newT: E.Texture): void;
|
|
107
112
|
awaitOuterToImgBitMapMap: MapEx<string, boolean>;
|
|
108
113
|
toStandard(texture: E.Texture): Promise<{
|
|
@@ -62,7 +62,9 @@ export declare const disposeTexture: (texture: E.Texture | null) => void;
|
|
|
62
62
|
export declare const setTextureBlob: (texture: Texture, blob: Blob) => void;
|
|
63
63
|
export declare const setTextureSize: (texture: Texture) => void;
|
|
64
64
|
export declare const setTextureUrl: (texture: Texture, blob: Blob) => void;
|
|
65
|
-
export declare const bindTextureBaseData: (texture: E.Texture, _runScene: RunScene, inputBlob?: Blob
|
|
65
|
+
export declare const bindTextureBaseData: (texture: E.Texture, _runScene: RunScene, inputBlob?: Blob, opts?: {
|
|
66
|
+
md5?: boolean;
|
|
67
|
+
}) => Promise<Texture>;
|
|
66
68
|
export declare const getBlobByTexture: (texture: E.Texture) => any;
|
|
67
69
|
export declare const initTexture: (texture: E.Texture) => Texture;
|
|
68
70
|
export declare const parseImageBitMapByBlob: (blob: ImageBitmapSource, map?: TextureExType["loadOptions"]) => Promise<ImageBitmap>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Obj } from "js-funcs";
|
|
2
2
|
import { Euler, Object3D, Vector2, Vector3 } from "run-scene-core";
|
|
3
|
-
import { OrbitControls } from "run-scene-core/examples/jsm/controls/OrbitControls";
|
|
4
3
|
import * as THREE from "run-scene-core";
|
|
4
|
+
import { ConstrainedOrbitControls } from "../Controls/ConstrainedOrbitControls";
|
|
5
5
|
export interface UserData {
|
|
6
6
|
isTimeLineUsed: boolean | undefined;
|
|
7
7
|
id: string;
|
|
@@ -28,7 +28,7 @@ export declare namespace E {
|
|
|
28
28
|
type BaseMaterialTexture = "map" | "metalnessMap" | "roughnessMap" | "normalMap" | "aoMap" | "emissiveMap" | "alphaMap" | "lightMap" | "envMap" | "displacementMap";
|
|
29
29
|
type Camera = THREE.PerspectiveCamera;
|
|
30
30
|
type Scene = THREE.Scene;
|
|
31
|
-
type Controls =
|
|
31
|
+
type Controls = ConstrainedOrbitControls;
|
|
32
32
|
type Texture = THREE.Texture;
|
|
33
33
|
type Render = THREE.WebGLRenderer;
|
|
34
34
|
}
|