@anov/3d 0.0.13 → 0.0.15

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.
Files changed (49) hide show
  1. package/dist/factory/3d.d.ts +23 -14
  2. package/dist/factory/3d.js +143 -55
  3. package/dist/factory/3d.js.map +1 -1
  4. package/dist/factory/regionData.d.ts +8 -0
  5. package/dist/factory/regionData.js +59 -6
  6. package/dist/factory/regionData.js.map +1 -1
  7. package/dist/factory/unit/CameraPoi.d.ts +52 -4
  8. package/dist/factory/unit/CameraPoi.js +701 -55
  9. package/dist/factory/unit/CameraPoi.js.map +1 -1
  10. package/dist/factory/unit/glsl/heat/frag.d.ts +2 -0
  11. package/dist/factory/unit/glsl/heat/frag.glsl +37 -0
  12. package/dist/factory/unit/glsl/heat/frag.js +3 -0
  13. package/dist/factory/unit/glsl/heat/frag.js.map +1 -0
  14. package/dist/factory/unit/glsl/heat/ver.d.ts +2 -0
  15. package/dist/factory/unit/glsl/heat/ver.glsl +15 -0
  16. package/dist/factory/unit/glsl/heat/ver.js +3 -0
  17. package/dist/factory/unit/glsl/heat/ver.js.map +1 -0
  18. package/dist/factory/unit/handle.d.ts +4 -0
  19. package/dist/factory/unit/handle.js +20 -14
  20. package/dist/factory/unit/handle.js.map +1 -1
  21. package/dist/factory/unit/index.js +23 -13
  22. package/dist/factory/unit/index.js.map +1 -1
  23. package/dist/factory/unit/inspection/InspectionObject.d.ts +26 -0
  24. package/dist/factory/unit/{inspection.js → inspection/InspectionObject.js} +275 -133
  25. package/dist/factory/unit/inspection/InspectionObject.js.map +1 -0
  26. package/dist/factory/unit/{inspection.d.ts → inspection/index.d.ts} +8 -9
  27. package/dist/factory/unit/inspection/index.js +160 -0
  28. package/dist/factory/unit/inspection/index.js.map +1 -0
  29. package/dist/factory/unit/inspection/lineData.d.ts +21 -0
  30. package/dist/factory/unit/inspection/lineData.js +32 -0
  31. package/dist/factory/unit/inspection/lineData.js.map +1 -0
  32. package/dist/factory/unit/poi.d.ts +1 -0
  33. package/dist/factory/unit/poi.js +28 -14
  34. package/dist/factory/unit/poi.js.map +1 -1
  35. package/dist/factory/utils/constant.d.ts +0 -1
  36. package/dist/factory/utils/constant.js +0 -1
  37. package/dist/factory/utils/constant.js.map +1 -1
  38. package/dist/factory/utils/finirMaterial.d.ts +1 -0
  39. package/dist/factory/utils/finirMaterial.js +19 -1
  40. package/dist/factory/utils/finirMaterial.js.map +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/index.js.map +1 -1
  43. package/dist/module/environment/time/index.d.ts +1 -1
  44. package/dist/utils/index.d.ts +1 -1
  45. package/package.json +4 -3
  46. package/dist/factory/unit/inspection.js.map +0 -1
  47. package/dist/factory/unit/poi copy.d.ts +0 -15
  48. package/dist/factory/unit/poi copy.js +0 -144
  49. package/dist/factory/unit/poi copy.js.map +0 -1
@@ -1,15 +1,19 @@
1
1
  import type { OrbitControls, SceneControl } from '@anov/3d-core';
2
2
  import { InteractionManager, Vector3 } from '@anov/3d-core';
3
3
  import { Camera } from '@anov/3d-ability';
4
- import type { InitOptions } from '../applicationApi';
5
- import { SceneStyle, SceneTag } from './utils/constant';
4
+ import type WallManage from './unit/wall';
5
+ import type LineManage from './unit/line';
6
+ import type CylinderManage from './unit/cylinder';
7
+ import type PoiManage from './unit/poi';
8
+ import type CircleManage from './unit/circle';
6
9
  import type AreaBoundingBoxManage from './unit/areaBoundingBox';
10
+ import type Inspection from './unit/inspection';
11
+ import { SceneStyle, SceneTag } from './utils/constant';
7
12
  declare type factory3dOption = {
8
- model?: string;
13
+ model: string;
9
14
  environment: string;
10
- decoderPath?: string;
11
- controls: InitOptions['controls'];
12
15
  };
16
+ export declare const usePath = "http://172.16.223.163:9000/anov-prod/anov-3d/factory/example/";
13
17
  declare class Factory3D {
14
18
  position: Vector3;
15
19
  scene: SceneControl;
@@ -17,30 +21,35 @@ declare class Factory3D {
17
21
  cameraUtil: Camera;
18
22
  tag: SceneTag;
19
23
  style: SceneStyle;
20
- option: factory3dOption;
21
- private wall;
22
- private line;
23
- private cylinder;
24
- private poi;
25
- private circle;
24
+ private option;
25
+ wall: WallManage;
26
+ line: LineManage;
27
+ cylinder: CylinderManage;
28
+ poi: PoiManage;
29
+ circle: CircleManage;
26
30
  areaBoundingBox: AreaBoundingBoxManage;
31
+ inspection: Inspection;
32
+ usePath: string;
33
+ private pipeline;
27
34
  private realModl;
28
35
  private techModel;
36
+ private realGroundModel;
37
+ private realTreeModel;
38
+ private thermaLimaging;
29
39
  private eventHandleFn;
30
- private toggleState;
31
40
  private boxSkeyTexture;
32
41
  interactionManager: InteractionManager;
33
- maxDistance: number;
34
42
  constructor(option: factory3dOption);
35
43
  /**
36
44
  * render factory 3d scene
37
45
  */
38
46
  renderScene(scene: SceneControl): void;
47
+ private loadModel;
39
48
  /**
40
49
  * toggle SceneStyle
41
50
  * @param params
42
51
  */
43
- private toggleSceneStyle;
52
+ toggleSceneStyle(params: SceneStyle): void;
44
53
  toggleTag(tag: SceneTag): void;
45
54
  private globalEventsAgent;
46
55
  /**
@@ -5,17 +5,21 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- import { EquirectangularReflectionMapping, InteractionManager, ModelLoader, Vector3, lib, use, utils } from '@anov/3d-core';
9
- import { Camera } from '@anov/3d-ability';
10
- import { SceneStyle, SceneTag } from "./utils/constant";
8
+ import { Color, EquirectangularReflectionMapping, InteractionManager, ModelLoader, ShaderMaterial, TextureLoader, Vector2, Vector3, lib, use, utils } from '@anov/3d-core';
9
+ import { Camera, initPostEffects } from '@anov/3d-ability';
11
10
  import { finirMaterialV1 } from "./utils/finirMaterial";
12
11
  import handleUnit, { toggleTag as _toggleTag } from "./unit";
13
12
  import { globalEvents } from "./globalData";
14
- import switchMaterial from "./utils/switchMaterial";
13
+ import { SceneStyle, SceneTag } from "./utils/constant";
15
14
  import factoryGlobalObject from "./globalControl";
15
+ import frag from "./unit/glsl/heat/frag";
16
+ import vert from "./unit/glsl/heat/ver";
16
17
  var load = new ModelLoader();
17
18
  var rgbeLoader = new lib.RGBELoader();
18
19
  var emitter = utils.emitter;
20
+ var resourcePath = './';
21
+ var resourcePath2 = 'http://172.16.223.163:9000/anov-prod/anov-3d/factory/example/';
22
+ export var usePath = resourcePath2;
19
23
  var Factory3D = /*#__PURE__*/function () {
20
24
  function Factory3D(option) {
21
25
  _classCallCheck(this, Factory3D);
@@ -32,13 +36,17 @@ var Factory3D = /*#__PURE__*/function () {
32
36
  _defineProperty(this, "poi", void 0);
33
37
  _defineProperty(this, "circle", void 0);
34
38
  _defineProperty(this, "areaBoundingBox", void 0);
39
+ _defineProperty(this, "inspection", void 0);
40
+ _defineProperty(this, "usePath", usePath);
41
+ _defineProperty(this, "pipeline", void 0);
35
42
  _defineProperty(this, "realModl", void 0);
36
43
  _defineProperty(this, "techModel", void 0);
44
+ _defineProperty(this, "realGroundModel", void 0);
45
+ _defineProperty(this, "realTreeModel", void 0);
46
+ _defineProperty(this, "thermaLimaging", void 0);
37
47
  _defineProperty(this, "eventHandleFn", new Map());
38
- _defineProperty(this, "toggleState", true);
39
48
  _defineProperty(this, "boxSkeyTexture", void 0);
40
49
  _defineProperty(this, "interactionManager", void 0);
41
- _defineProperty(this, "maxDistance", 1200);
42
50
  this.option = option;
43
51
  this.globalEventsAgent();
44
52
  factoryGlobalObject.setFactory(this);
@@ -52,44 +60,121 @@ var Factory3D = /*#__PURE__*/function () {
52
60
  value: function renderScene(scene) {
53
61
  var _this = this;
54
62
  this.scene = scene;
55
- this.cameraUtil = new Camera(scene.camera, scene.controls);
63
+ this.cameraUtil = new Camera(scene.camera, scene.controls, scene);
56
64
  this.control = scene.controls;
57
- this.option.model && load.loadGLTF(this.option.model, false, true, this.option.decoderPath, function (gltf) {
58
- var group = gltf.scene.clone();
65
+ scene.camera.layers.set(0);
66
+ load.loadGLTF("".concat(this.usePath, "landScap3.glb"), false, true, './draco/', function (gltf) {
67
+ _this.realTreeModel = gltf.scene;
68
+
69
+ // this.interactionManager.add(gltf.scene)
70
+
71
+ // gltf.scene.addEventListener('click', (value) => {
72
+ // this.position = value.point
73
+ // })
74
+ scene.add(_this.realTreeModel);
75
+ return gltf;
76
+ });
77
+ var interactionManager = new InteractionManager(this.scene.renderer, this.scene.camera, this.scene.renderer.domElement) // Modified By LM this.scene.cssRenderer.cssRenderer.domElement,
78
+ ;
79
+
80
+ this.interactionManager = interactionManager;
81
+ utils.storeManagement.set('interactionManager', interactionManager);
82
+ use.useframe(function () {
83
+ interactionManager.update();
84
+ });
85
+ this.loadModel();
86
+ scene.renderer.toneMappingExposure = 0.4;
87
+ }
88
+ }, {
89
+ key: "loadModel",
90
+ value: function loadModel() {
91
+ var _this2 = this;
92
+ // real model
93
+ load.loadGLTF("".concat(this.usePath, "222.glb"), false, true, './draco/', function (gltf) {
94
+ _this2.scene.add(gltf.scene);
95
+ gltf.scene.visible = SceneStyle.real === _this2.style;
96
+ _this2.realModl = gltf.scene;
97
+
98
+ // this.interactionManager.add(gltf.scene)
99
+
100
+ // gltf.scene.addEventListener('click', (value) => {
101
+ // this.position = value.point
102
+ // })
103
+
104
+ handleUnit.call(_this2);
105
+ return gltf;
106
+ });
107
+
108
+ // tech model
109
+ load.loadGLTF("".concat(this.usePath, "2222.glb"), false, true, './draco/', function (gltf) {
110
+ var group = gltf.scene;
59
111
  group.traverse(function (child) {
112
+ // @ts-ignore
60
113
  if (child.type === 'Mesh') {
61
114
  // @ts-ignore
62
115
  child.material = finirMaterialV1;
63
116
  }
64
117
  });
65
- _this.scene.add(gltf.scene);
66
- _this.scene.add(group);
67
- gltf.scene.visible = SceneStyle.real === _this.style;
68
- group.visible = SceneStyle.tech === _this.style;
69
- _this.techModel = group;
70
- _this.realModl = gltf.scene;
71
- var interactionManager = new InteractionManager(_this.scene.renderer, _this.scene.camera, _this.scene.renderer.domElement) // Modified By LM this.scene.cssRenderer.cssRenderer.domElement,
72
- ;
118
+ _this2.scene.add(group);
119
+ group.visible = SceneStyle.tech === _this2.style;
120
+ _this2.techModel = group;
121
+ return gltf;
122
+ });
73
123
 
74
- _this.interactionManager = interactionManager;
75
- utils.storeManagement.set('interactionManager', interactionManager);
76
- use.useframe(function () {
77
- interactionManager.update();
124
+ // thermaLimaging model
125
+ load.loadGLTF("".concat(this.usePath, "2222.glb"), false, true, './draco/', function (gltf) {
126
+ var group = gltf.scene;
127
+ group.traverse(function (child) {
128
+ if (child.type === 'Mesh') {
129
+ // @ts-ignore
130
+ child.material = new ShaderMaterial({
131
+ vertexShader: vert,
132
+ fragmentShader: frag,
133
+ uniforms: {
134
+ texture1: {
135
+ value: new TextureLoader().load('./test01.jpg')
136
+ },
137
+ texture2: {
138
+ value: new TextureLoader().load('./test02.jpg')
139
+ },
140
+ uvScale: {
141
+ value: new Vector2(1, 1)
142
+ }
143
+ },
144
+ depthTest: false,
145
+ depthWrite: false
146
+ });
147
+ child.layers.set(2);
148
+ }
78
149
  });
150
+ _this2.scene.add(group);
151
+ _this2.thermaLimaging = group;
152
+ return gltf;
153
+ });
154
+ load.loadGLTF("".concat(this.usePath, "guandao.glb"), false, true, './draco/', function (gltf) {
155
+ _this2.scene.add(gltf.scene);
156
+ _this2.pipeline = gltf.scene;
157
+ return gltf;
158
+ });
79
159
 
80
- // interactionManager.add(gltf.scene)
160
+ // ground
161
+ load.loadGLTF("".concat(this.usePath, "landScap.glb"), false, true, './draco/', function (gltf) {
162
+ _this2.scene.add(gltf.scene);
81
163
 
82
- gltf.scene.addEventListener('click', function (e) {
83
- _this.position = e.point;
84
- });
85
- handleUnit.call(_this);
164
+ // this.interactionManager.add(gltf.scene)
165
+
166
+ // gltf.scene.addEventListener('click', (value) => {
167
+ // this.position = value.point
168
+ // })
169
+
170
+ _this2.realGroundModel = gltf.scene;
86
171
  return gltf;
87
172
  });
88
- this.option.environment && rgbeLoader.setPath('').load(this.option.environment, function (texture) {
173
+ rgbeLoader.setPath("".concat(this.usePath)).load('demo.hdr', function (texture) {
89
174
  texture.mapping = EquirectangularReflectionMapping;
90
- _this.boxSkeyTexture = texture;
91
- _this.scene.scene.background = texture;
92
- _this.scene.scene.environment = texture;
175
+ _this2.boxSkeyTexture = texture;
176
+ _this2.scene.scene.environment = texture;
177
+ _this2.scene.scene.background = new Color('#ccc');
93
178
  });
94
179
  }
95
180
 
@@ -99,35 +184,27 @@ var Factory3D = /*#__PURE__*/function () {
99
184
  */
100
185
  }, {
101
186
  key: "toggleSceneStyle",
102
- value:
103
- /**
104
- * toggle SceneStyle
105
- * @param params
106
- */
107
- function toggleSceneStyle(params) {
187
+ value: function toggleSceneStyle(params) {
108
188
  if (this.style === params) return;
109
189
  this.style = params;
110
190
  if (this.style === SceneStyle.tech) {
191
+ this.pipeline.visible = false;
111
192
  this.techModel.visible = true;
112
193
  this.realModl.visible = false;
194
+ this.realTreeModel.visible = false;
113
195
  this.scene.scene.background = null;
196
+ this.realGroundModel && (this.realGroundModel.visible = false);
197
+ this.scene.renderer.toneMappingExposure = 0.6;
114
198
  }
115
-
116
- // this.realModl.traverse((child) => {
117
- // if (child.type === 'Mesh') {
118
- // switchMaterial(child as Object3D & { material: Material }, finirMaterialV1, {
119
- // speed: 40,
120
- // start: -500,
121
- // end: 2000,
122
- // callback: endCallBack,
123
- // })
124
- // }
125
- // })
126
-
127
199
  if (params === SceneStyle.real) {
200
+ this.pipeline.visible = true;
128
201
  this.techModel.visible = false;
129
202
  this.realModl.visible = true;
130
- this.scene.scene.background = this.boxSkeyTexture;
203
+ this.realGroundModel && (this.realGroundModel.visible = true);
204
+ this.realTreeModel && (this.realTreeModel.visible = true);
205
+ this.scene.scene.background = new Color('#ccc');
206
+ this.scene.scene.environment = this.boxSkeyTexture;
207
+ this.scene.renderer.toneMappingExposure = 0.4;
131
208
  }
132
209
  }
133
210
  }, {
@@ -139,11 +216,11 @@ var Factory3D = /*#__PURE__*/function () {
139
216
  }, {
140
217
  key: "globalEventsAgent",
141
218
  value: function globalEventsAgent() {
142
- var _this2 = this;
219
+ var _this3 = this;
143
220
  globalEvents.forEach(function (eventKey) {
144
221
  emitter.on(eventKey, function (args) {
145
- var _this2$eventHandleFn$;
146
- (_this2$eventHandleFn$ = _this2.eventHandleFn.get(eventKey)) === null || _this2$eventHandleFn$ === void 0 ? void 0 : _this2$eventHandleFn$.forEach(function (fn) {
222
+ var _this3$eventHandleFn$;
223
+ (_this3$eventHandleFn$ = _this3.eventHandleFn.get(eventKey)) === null || _this3$eventHandleFn$ === void 0 ? void 0 : _this3$eventHandleFn$.forEach(function (fn) {
147
224
  fn(args);
148
225
  });
149
226
  });
@@ -156,9 +233,20 @@ var Factory3D = /*#__PURE__*/function () {
156
233
  }, {
157
234
  key: "toggleView",
158
235
  value: function toggleView() {
159
- var cutoutCamera = this.scene.cutoutCamera;
160
- this.scene.cutoutCamera = this.scene.camera;
161
- this.scene.setMainCamera(cutoutCamera);
236
+ if (this.scene.cutoutCamera === this.inspection.minCamera) {
237
+ var cutoutCamera = this.inspection.minCamera;
238
+ this.scene.cutoutCamera = this.scene.camera;
239
+ this.scene.camera = cutoutCamera;
240
+ initPostEffects(this.scene.scene, this.scene.renderer, cutoutCamera);
241
+ } else {
242
+ var mainCamera = this.scene.cutoutCamera;
243
+ var _cutoutCamera = this.inspection.minCamera;
244
+ this.scene.camera = mainCamera;
245
+ this.scene.cutoutCamera = _cutoutCamera;
246
+ initPostEffects(this.scene.scene, this.scene.renderer, _cutoutCamera, {
247
+ type: 'sub'
248
+ });
249
+ }
162
250
  }
163
251
  }, {
164
252
  key: "addEventListener",
@@ -1 +1 @@
1
- {"version":3,"names":["EquirectangularReflectionMapping","InteractionManager","ModelLoader","Vector3","lib","use","utils","Camera","SceneStyle","SceneTag","finirMaterialV1","handleUnit","toggleTag","globalEvents","switchMaterial","factoryGlobalObject","load","rgbeLoader","RGBELoader","emitter","Factory3D","option","overview","real","Map","globalEventsAgent","setFactory","scene","cameraUtil","camera","controls","control","model","loadGLTF","decoderPath","gltf","group","clone","traverse","child","type","material","add","visible","style","tech","techModel","realModl","interactionManager","renderer","domElement","storeManagement","set","useframe","update","addEventListener","e","position","point","call","environment","setPath","texture","mapping","boxSkeyTexture","background","params","tag","apply","forEach","eventKey","on","args","eventHandleFn","get","fn","cutoutCamera","setMainCamera","eventName","handleFn","push"],"sources":["../../src/factory/3d.ts"],"sourcesContent":["import type { DataTexture, Group, Material, Object3D, OrbitControls, SceneControl } from '@anov/3d-core'\nimport { EquirectangularReflectionMapping, InteractionManager, ModelLoader, Vector3, lib, use, utils } from '@anov/3d-core'\nimport { Camera } from '@anov/3d-ability'\nimport type { InitOptions } from '../applicationApi'\nimport { SceneStyle, SceneTag } from './utils/constant'\nimport { finirMaterialV1 } from './utils/finirMaterial'\nimport handleUnit, { toggleTag } from './unit'\nimport type WallManage from './unit/wall'\nimport type LineManage from './unit/line'\nimport type CylinderManage from './unit/cylinder'\nimport type PoiManage from './unit/poi'\nimport type CircleManage from './unit/circle'\nimport type AreaBoundingBoxManage from './unit/areaBoundingBox'\nimport { globalEvents } from './globalData'\nimport switchMaterial from './utils/switchMaterial'\nimport factoryGlobalObject from './globalControl'\n\ntype factory3dOption = {\n model?: string\n environment: string\n decoderPath?: string\n controls: InitOptions['controls']\n}\nconst load = new ModelLoader()\nconst rgbeLoader = new lib.RGBELoader()\nconst { emitter } = utils\n\nclass Factory3D {\n position: Vector3 = new Vector3(0, 0, 0)\n scene!: SceneControl\n control!: OrbitControls\n cameraUtil!: Camera\n\n public tag = SceneTag.overview\n public style: SceneStyle = SceneStyle.real\n public option: factory3dOption\n private wall!: WallManage\n private line!: LineManage\n private cylinder!: CylinderManage\n private poi!: PoiManage\n private circle!: CircleManage\n areaBoundingBox!: AreaBoundingBoxManage\n\n private realModl!: Group\n private techModel!: Group\n\n private eventHandleFn: Map<string, ((args?: any) => void)[]> = new Map()\n\n private toggleState = true\n private boxSkeyTexture!: DataTexture\n\n interactionManager!: InteractionManager\n public maxDistance = 1200\n\n constructor(option: factory3dOption) {\n this.option = option\n this.globalEventsAgent()\n factoryGlobalObject.setFactory(this)\n }\n\n /**\n * render factory 3d scene\n */\n renderScene(scene: SceneControl) {\n this.scene = scene\n this.cameraUtil = new Camera(scene.camera!, scene.controls!)\n this.control = scene.controls!\n\n this.option.model && load.loadGLTF(this.option.model, false, true, this.option.decoderPath, (gltf) => {\n const group = gltf.scene.clone()\n group.traverse((child) => {\n if (child.type === 'Mesh') {\n // @ts-ignore\n child.material = finirMaterialV1\n }\n })\n\n this.scene.add(gltf.scene)\n this.scene.add(group)\n\n gltf.scene.visible = SceneStyle.real === this.style\n group.visible = SceneStyle.tech === this.style\n\n this.techModel = group as Group\n this.realModl = gltf.scene as Group\n\n const interactionManager = new InteractionManager(\n this.scene.renderer,\n this.scene.camera,\n this.scene.renderer.domElement, // Modified By LM this.scene.cssRenderer.cssRenderer.domElement,\n )\n\n this.interactionManager = interactionManager\n\n utils.storeManagement.set('interactionManager', interactionManager)\n\n use.useframe(() => {\n interactionManager.update()\n })\n\n // interactionManager.add(gltf.scene)\n\n gltf.scene.addEventListener('click', (e) => {\n this.position = e.point\n })\n\n handleUnit.call(this)\n\n return gltf\n })\n\n this.option.environment && rgbeLoader.setPath('').load(this.option.environment, (texture) => {\n texture.mapping = EquirectangularReflectionMapping\n\n this.boxSkeyTexture = texture\n this.scene.scene.background = texture\n this.scene.scene.environment = texture\n })\n }\n\n /**\n * toggle SceneStyle\n * @param params\n */\n private toggleSceneStyle(params: SceneStyle) {\n if (this.style === params)\n return\n\n if (params === SceneStyle.tech)\n this.toggleState = false\n\n this.style = params\n\n const endCallBack = () => {\n if (this.style === SceneStyle.tech) {\n this.realModl.visible = false\n this.toggleState = true\n }\n }\n\n if (this.style === SceneStyle.tech) {\n this.realModl.traverse((child) => {\n if (child.type === 'Mesh') {\n switchMaterial(child as Object3D & { material: Material }, finirMaterialV1, {\n speed: 40,\n start: -500,\n end: 2000,\n callback: endCallBack,\n })\n }\n })\n }\n\n if (params === SceneStyle.real) {\n this.realModl.visible = SceneStyle.real === this.style\n this.scene.scene.background = this.boxSkeyTexture\n }\n else {\n this.scene.scene.background = null\n }\n\n this.techModel.visible = SceneStyle.tech === this.style\n }\n\n /**\n * toggle SceneStyle\n * @param params\n */\n toggleSceneStyle(params: SceneStyle) {\n if (this.style === params)\n return\n\n this.style = params\n\n if (this.style === SceneStyle.tech) {\n this.techModel.visible = true\n this.realModl.visible = false\n this.scene.scene.background = null\n }\n\n // this.realModl.traverse((child) => {\n // if (child.type === 'Mesh') {\n // switchMaterial(child as Object3D & { material: Material }, finirMaterialV1, {\n // speed: 40,\n // start: -500,\n // end: 2000,\n // callback: endCallBack,\n // })\n // }\n // })\n\n if (params === SceneStyle.real) {\n this.techModel.visible = false\n this.realModl.visible = true\n this.scene.scene.background = this.boxSkeyTexture\n }\n }\n\n public toggleTag(tag: SceneTag) {\n if (this.tag === tag)\n return\n\n toggleTag[tag].apply(this, [this])\n }\n\n private globalEventsAgent() {\n globalEvents.forEach((eventKey) => {\n emitter.on(eventKey, (args) => {\n this.eventHandleFn.get(eventKey)?.forEach((fn) => {\n fn(args)\n })\n })\n })\n }\n\n /**\n * toggle view\n */\n toggleView() {\n const cutoutCamera = this.scene.cutoutCamera\n\n this.scene.cutoutCamera = this.scene.camera\n this.scene.setMainCamera(cutoutCamera)\n }\n\n addEventListener(eventName: string, handleFn: (args?: any) => void) {\n if (this.eventHandleFn.get(eventName))\n this.eventHandleFn.get(eventName).push(handleFn)\n\n else\n this.eventHand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,SAAS"}
1
+ {"version":3,"names":["Color","EquirectangularReflectionMapping","InteractionManager","ModelLoader","ShaderMaterial","TextureLoader","Vector2","Vector3","lib","use","utils","Camera","initPostEffects","finirMaterialV1","handleUnit","toggleTag","globalEvents","SceneStyle","SceneTag","factoryGlobalObject","frag","vert","load","rgbeLoader","RGBELoader","emitter","resourcePath","resourcePath2","usePath","Factory3D","option","overview","real","Map","globalEventsAgent","setFactory","scene","cameraUtil","camera","controls","control","layers","set","loadGLTF","gltf","realTreeModel","add","interactionManager","renderer","domElement","storeManagement","useframe","update","loadModel","toneMappingExposure","visible","style","realModl","call","group","traverse","child","type","material","tech","techModel","vertexShader","fragmentShader","uniforms","texture1","value","texture2","uvScale","depthTest","depthWrite","thermaLimaging","pipeline","realGroundModel","setPath","texture","mapping","boxSkeyTexture","environment","background","params","tag","apply","forEach","eventKey","on","args","eventHandleFn","get","fn","cutoutCamera","inspection","minCamera","mainCamera","eventName","handleFn","push"],"sources":["../../src/factory/3d.ts"],"sourcesContent":["import type { DataTexture, Group, OrbitControls, SceneControl } from '@anov/3d-core'\nimport { BoxGeometry, Color, EquirectangularReflectionMapping, InteractionManager, Mesh, MeshBasicMaterial, ModelLoader, ShaderMaterial, TextureLoader, Vector2, Vector3, lib, use, utils } from '@anov/3d-core'\nimport { Camera, initPostEffects } from '@anov/3d-ability'\nimport { finirMaterialV1 } from './utils/finirMaterial'\nimport handleUnit, { toggleTag } from './unit'\nimport type WallManage from './unit/wall'\nimport type LineManage from './unit/line'\nimport type CylinderManage from './unit/cylinder'\nimport type PoiManage from './unit/poi'\nimport type CircleManage from './unit/circle'\nimport type AreaBoundingBoxManage from './unit/areaBoundingBox'\nimport type Inspection from './unit/inspection'\nimport { globalEvents } from './globalData'\nimport { SceneStyle, SceneTag } from './utils/constant'\nimport switchMaterial from './utils/switchMaterial'\nimport factoryGlobalObject from './globalControl'\nimport { debounce } from './utils'\n\nimport frag from './unit/glsl/heat/frag'\nimport vert from './unit/glsl/heat/ver'\n\ntype factory3dOption = {\n model: string\n environment: string\n}\n\nconst load = new ModelLoader()\nconst rgbeLoader = new lib.RGBELoader()\nconst { emitter } = utils\n\nconst resourcePath = './'\nconst resourcePath2 = 'http://172.16.223.163:9000/anov-prod/anov-3d/factory/example/'\n\nexport const usePath = resourcePath2\n\nclass Factory3D {\n position: Vector3 = new Vector3(0, 0, 0)\n scene: SceneControl\n control: OrbitControls\n cameraUtil: Camera\n\n public tag = SceneTag.overview\n public style: SceneStyle = SceneStyle.real\n private option: factory3dOption\n wall: WallManage\n line: LineManage\n cylinder: CylinderManage\n poi: PoiManage\n circle: CircleManage\n areaBoundingBox: AreaBoundingBoxManage\n inspection: Inspection\n\n usePath = usePath\n\n private pipeline: Group\n private realModl: Group\n private techModel: Group\n private realGroundModel: Group\n private realTreeModel: Group\n private thermaLimaging: Group\n private eventHandleFn: Map<string, ((args?: any) => void)[]> = new Map()\n private boxSkeyTexture: DataTexture\n\n interactionManager: InteractionManager\n\n constructor(option: factory3dOption) {\n this.option = option\n this.globalEventsAgent()\n factoryGlobalObject.setFactory(this)\n }\n\n /**\n * render factory 3d scene\n */\n renderScene(scene: SceneControl) {\n this.scene = scene\n\n this.cameraUtil = new Camera(scene.camera!, scene.controls!, scene)\n this.control = scene.controls!\n scene.camera.layers.set(0)\n\n load.loadGLTF(`${this.usePath}landScap3.glb`, false, true, './draco/', (gltf) => {\n this.realTreeModel = (gltf.scene) as Group\n\n // this.interactionManager.add(gltf.scene)\n\n // gltf.scene.addEventListener('click', (value) => {\n // this.position = value.point\n // })\n scene.add(this.realTreeModel)\n\n return gltf\n })\n\n const interactionManager = new InteractionManager(\n this.scene.renderer,\n this.scene.camera,\n this.scene.renderer.domElement, // Modified By LM this.scene.cssRenderer.cssRenderer.domElement,\n )\n\n this.interactionManager = interactionManager\n\n utils.storeManagement.set('interactionManager', interactionManager)\n\n use.useframe(() => {\n interactionManager.update()\n })\n\n this.loadModel()\n scene.renderer.toneMappingExposure = 0.4\n }\n\n private loadModel() {\n // real model\n load.loadGLTF(`${this.usePath}222.glb`, false, true, './draco/', (gltf) => {\n this.scene.add(gltf.scene)\n\n gltf.scene.visible = SceneStyle.real === this.style\n\n this.realModl = gltf.scene as Group\n\n // this.interactionManager.add(gltf.scene)\n\n // gltf.scene.addEventListener('click', (value) => {\n // this.position = value.point\n // })\n\n handleUnit.call(this)\n return gltf\n })\n\n // tech model\n load.loadGLTF(`${this.usePath}2222.glb`, false, true, './draco/', (gltf) => {\n const group = gltf.scene\n group.traverse((child) => {\n // @ts-ignore\n if (child.type === 'Mesh') {\n // @ts-ignore\n child.material = finirMaterialV1\n }\n })\n\n this.scene.add(group)\n\n group.visible = SceneStyle.tech === this.style\n this.techModel = group as Group\n\n return gltf\n })\n\n // thermaLimaging model\n load.loadGLTF(`${this.usePath}2222.glb`, false, true, './draco/', (gltf) => {\n const group = gltf.scene\n group.traverse((child) => {\n if (child.type === 'Mesh') {\n // @ts-ignore\n child.material = new ShaderMaterial({\n vertexShader: vert,\n fragmentShader: frag,\n uniforms: {\n texture1: { value: new TextureLoader().load('./test01.jpg') },\n texture2: { value: new TextureLoader().load('./test02.jpg') },\n uvScale: { value: new Vector2(1, 1) },\n },\n depthTest: false,\n depthWrite: false,\n })\n\n child.layers.set(2)\n }\n })\n\n this.scene.add(group)\n\n this.thermaLimaging = group as Group\n\n return gltf\n })\n\n load.loadGLTF(`${this.usePath}guandao.glb`, false, true, './draco/', (gltf) => {\n this.scene.add(gltf.scene)\n\n this.pipeline = gltf.scene as Group\n return gltf\n })\n\n // ground\n load.loadGLTF(`${this.usePath}landScap.glb`, false, true, './draco/', (gltf) => {\n this.scene.add(gltf.scene)\n\n // this.interactionManager.add(gltf.scene)\n\n // gltf.scene.addEventListener('click', (value) => {\n // this.position = value.point\n // })\n\n this.realGroundModel = gltf.scene as Group\n return gltf\n })\n\n rgbeLoader.setPath(`${this.usePath}`).load('demo.hdr', (texture) => {\n texture.mapping = EquirectangularReflectionMapping\n\n this.boxSkeyTexture = texture\n this.scene.scene.environment = texture\n this.scene.scene.background = new Color('#ccc')\n })\n }\n\n /**\n * toggle SceneStyle\n * @param params\n */\n toggleSceneStyle(params: SceneStyle) {\n if (this.style === params)\n return\n\n this.style = params\n\n if (this.style === SceneStyle.tech) {\n this.pipeline.visible = false\n this.techModel.visible = true\n this.realModl.visible = false\n this.realTreeModel.visible = false\n this.scene.scene.background = null\n this.realGroundModel && (this.realGroundModel.visible = false)\n\n this.scene.renderer.toneMappingExposure = 0.6\n }\n\n if (params === SceneStyle.real) {\n this.pipeline.visible = true\n this.techModel.visible = false\n this.realModl.visible = true\n this.realGroundModel && (this.realGroundModel.visible = true)\n this.realTreeModel && (this.realTreeModel.visible = true)\n this.scene.scene.background = new Color('#ccc')\n this.scene.scene.environment = this.boxSkeyTexture\n\n this.scene.renderer.toneMappingExposure = 0.4\n }\n }\n\n public toggleTag(tag: SceneTag) {\n if (this.tag === tag)\n return\n toggleTag[tag].apply(this, [this])\n }\n\n private globalEventsAgent() {\n globalEvents.forEach((eventKey) => {\n emitter.on(eventKey, (args) => {\n this.eventHandleFn.get(eventKey)?.forEach((fn) => {\n fn(args)\n })\n })\n })\n }\n\n /**\n * toggle view\n */\n toggleView() {\n if (this.scene.cutoutCamera === this.inspection.minCamera) {\n const cutoutCamera = this.inspection.minCamera\n this.scene.cutoutCamera = this.scene.camera\n this.scene.camera = cutoutCamera\n initPostEffects(this.scene.scene, this.scene.renderer, cutoutCamera)\n }\n else {\n const mainCamera = this.scene.cutoutCamera\n const cutoutCamera = this.inspection.minCamera\n\n this.scene.camera = mainCamera\n this.scene.cutoutCamera = cutoutCamera\n\n initPostEffects(this.scene.scene, this.scene.renderer, cutoutCamera, {\n type: 'sub',\n })\n }\n }\n\n addEventListener(eventName: string, handleFn: (args?: any) => void) {\n if (this.eventHandleFn.get(eventName))\n this.eventHandleFn.get(eventName).push(handleFn)\n\n else\n this.eventHandleFn.set(eventName, [handleFn])\n }\n}\n\nexport default Factory3D"],"mappings":";;;;;;;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AK,CAACA,KAAK,EAAE,IAAI,CAACA,KAAK,CAACY,QAAQ,EAAE8C,YAAY,CAAC;MACtE,CAAC,MACI;QACH,IAAMG,UAAU,GAAG,IAAI,CAAC7D,KAAK,CAAC0D,YAAY;QAC1C,IAAMA,aAAY,GAAG,IAAI,CAACC,UAAU,CAACC,SAAS;QAE9C,IAAI,CAAC5D,KAAK,CAACE,MAAM,GAAG2D,UAAU;QAC9B,IAAI,CAAC7D,KAAK,CAAC0D,YAAY,GAAGA,aAAY;QAEtClF,eAAe,CAAC,IAAI,CAACwB,KAAK,CAACA,KAAK,EAAE,IAAI,CAACA,KAAK,CAACY,QAAQ,EAAE8C,aAAY,EAAE;UACnEhC,IAAI,EAAE;QACR,CAAC,CAAC;MACJ;IACF;EAAC;IAAA;IAAA,OAED,0BAAiBoC,SAAiB,EAAEC,QAA8B,EAAE;MAClE,IAAI,IAAI,CAACR,aAAa,CAACC,GAAG,CAACM,SAAS,CAAC,EACnC,IAAI,CAACP,aAAa,CAACC,GAAG,CAACM,SAAS,CAAC,CAACE,IAAI,CAACD,QAAQ,CAAC,MAGhD,IAAI,CAACR,aAAa,CAACjD,GAAG,CAACwD,SAAS,EAAE,CAACC,QAAQ,CAAC,CAAC;IACjD;EAAC;EAAA;AAAA;AAGH,eAAetE,SAAS"}
@@ -14,6 +14,12 @@ export interface IPoi {
14
14
  position: Array<number>;
15
15
  content?: string;
16
16
  }
17
+ export interface IProbePoint {
18
+ id: string;
19
+ name: string;
20
+ warn: boolean;
21
+ position: Array<number>;
22
+ }
17
23
  export declare type RegionMap = {
18
24
  [k: string]: {
19
25
  id: string;
@@ -22,6 +28,8 @@ export declare type RegionMap = {
22
28
  maxHigh?: number;
23
29
  poi?: IPoi;
24
30
  people?: Array<IPeople>;
31
+ camera?: Object;
32
+ probePoint?: Array<IProbePoint>;
25
33
  };
26
34
  };
27
35
  export declare const regionMap: RegionMap;
@@ -61,7 +61,12 @@ export var regionMap = {
61
61
  dep: '设备运维',
62
62
  online: true,
63
63
  position: [-302.20000000, 0.62500079, -117.90000000]
64
- }]
64
+ }],
65
+ camera: {
66
+ id: '1',
67
+ name: '摄像头1',
68
+ position: [-314.0111307, 20.55, -146.54350582]
69
+ }
65
70
  },
66
71
  reduction: {
67
72
  id: '2',
@@ -114,6 +119,17 @@ export var regionMap = {
114
119
  dep: '设备运维',
115
120
  online: true,
116
121
  position: [-14.90000000, 0.62500079, -116.90000000]
122
+ }],
123
+ camera: {
124
+ id: '2',
125
+ name: '摄像头2',
126
+ position: [28.89784048, 20.55, -144.28157517]
127
+ },
128
+ probePoint: [{
129
+ id: '3',
130
+ name: '甲烷监测点3',
131
+ warn: false,
132
+ position: [48.89784048, 30.55000000, -144.28157517]
117
133
  }]
118
134
  },
119
135
  crudeOil: {
@@ -149,7 +165,12 @@ export var regionMap = {
149
165
  dep: '生产技术',
150
166
  online: true,
151
167
  position: [344.50000000, 0.62500079, -127.10000000]
152
- }]
168
+ }],
169
+ camera: {
170
+ id: '3',
171
+ name: '摄像头3',
172
+ position: [359.58372139, 20.55, -144.28157517]
173
+ }
153
174
  },
154
175
  catalyticCracking: {
155
176
  id: '4',
@@ -220,7 +241,12 @@ export var regionMap = {
220
241
  dep: '运输装卸',
221
242
  online: true,
222
243
  position: [-211.20000000, 0.62500079, 95.80000000]
223
- }]
244
+ }],
245
+ camera: {
246
+ id: '4',
247
+ name: '摄像头4',
248
+ position: [-322.57300372, 22.55, 31.81516361]
249
+ }
224
250
  },
225
251
  hydrocrackingUnit: {
226
252
  id: '5',
@@ -249,7 +275,12 @@ export var regionMap = {
249
275
  dep: '运输装卸',
250
276
  online: true,
251
277
  position: [-408.30000000, 0.62500079, -37.20000000]
252
- }]
278
+ }],
279
+ camera: {
280
+ id: '5',
281
+ name: '摄像头5',
282
+ position: [-307.04992341, 20.55, 168.90578924]
283
+ }
253
284
  },
254
285
  cokingUnit: {
255
286
  id: '6',
@@ -308,6 +339,17 @@ export var regionMap = {
308
339
  dep: '设备运维',
309
340
  online: true,
310
341
  position: [175.00000000, 0.62500079, 74.60000000]
342
+ }],
343
+ camera: {
344
+ id: '6',
345
+ name: '摄像头6',
346
+ position: [76.84192138, 20.55000332, 95.89826158]
347
+ },
348
+ probePoint: [{
349
+ id: '1',
350
+ name: '监测点异常1',
351
+ warn: true,
352
+ position: [55.84192138, 20.55000332, 85.89826158]
311
353
  }]
312
354
  },
313
355
  administrative: {
@@ -439,8 +481,19 @@ export var regionMap = {
439
481
  poi: {
440
482
  id: '7',
441
483
  position: [404.24348058, 0.55000000, 85.00566808],
442
- content: '提供对工厂办公人员的休息和休闲区域,包括食堂,休息室,员工宿舍,休闲楼等场地,且该区域需较远离生产区,保证员工休息质量。'
443
- }
484
+ content: '提供对工厂办公人员的休息和休闲区域,包括食堂,休息室,员工宿舍,休闲楼等场地,提供对工厂办公人员的休息和休闲区域,包括食堂,休息室,员工宿舍,休闲楼等场地,且该区域需较远离生产区,保证员工休息质量。'
485
+ },
486
+ camera: {
487
+ id: '7',
488
+ name: '摄像头7',
489
+ position: [404.24348058, 20.55, 85.00566808]
490
+ },
491
+ probePoint: [{
492
+ id: '2',
493
+ name: '甲烷监测点2',
494
+ warn: false,
495
+ position: [384.24348058, 20.55, 75.00566808]
496
+ }]
444
497
  }
445
498
  };
446
499
  export default regionMap;