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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run-scene-v2",
3
- "version": "0.1.136",
3
+ "version": "0.1.138",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "dependencies": {
@@ -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("run-scene-core/examples/jsm/controls/OrbitControls").OrbitControls;
36
+ controls: import("../Controls/ConstrainedOrbitControls").ConstrainedOrbitControls;
37
37
  engineDom: HTMLElement;
38
38
  render2: CSS3DRenderer;
39
39
  render3: CSS3DRenderer;
@@ -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("run-scene-core/examples/jsm/controls/OrbitControls").OrbitControls;
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.136";
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 = "_||_";
@@ -75,6 +75,9 @@ export declare type ExportJSONEx = {
75
75
  };
76
76
  msg?: string;
77
77
  isDecodeCompress?: boolean;
78
+ exporterOptions?: {
79
+ notPp?: boolean;
80
+ };
78
81
  };
79
82
  export declare type ExportJSONExNotOption = {
80
83
  [P in keyof ExportJSONEx]-?: ExportJSONEx[P];
@@ -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
+ }
@@ -124,6 +124,7 @@ export declare class OptionsEx {
124
124
  compressTexture: boolean;
125
125
  notMaterial: boolean;
126
126
  outTime: number;
127
+ notPp: boolean;
127
128
  };
128
129
  stats: Stats | undefined;
129
130
  runScene: RunScene;
@@ -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): Promise<Texture>;
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): Promise<Texture>;
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) => Promise<Texture>;
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 = OrbitControls;
31
+ type Controls = ConstrainedOrbitControls;
32
32
  type Texture = THREE.Texture;
33
33
  type Render = THREE.WebGLRenderer;
34
34
  }