@anov/3d 0.0.4-alpha24 → 0.0.4-alpha26
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/dist/applicationApi.js +1 -1
- package/dist/applicationApi.js.map +1 -1
- package/dist/factory/3d.d.ts +51 -0
- package/dist/factory/3d.js +203 -0
- package/dist/factory/3d.js.map +1 -0
- package/dist/factory/globalData.d.ts +1 -0
- package/dist/factory/globalData.js +2 -0
- package/dist/factory/globalData.js.map +1 -0
- package/dist/factory/regionData.d.ts +28 -0
- package/dist/factory/regionData.js +447 -0
- package/dist/factory/regionData.js.map +1 -0
- package/dist/factory/unit/areaBoundingBox.d.ts +7 -0
- package/dist/factory/unit/areaBoundingBox.js +28 -0
- package/dist/factory/unit/areaBoundingBox.js.map +1 -0
- package/dist/factory/unit/circle.d.ts +15 -0
- package/dist/factory/unit/circle.js +88 -0
- package/dist/factory/unit/circle.js.map +1 -0
- package/dist/factory/unit/cylinder.d.ts +18 -0
- package/dist/factory/unit/cylinder.js +160 -0
- package/dist/factory/unit/cylinder.js.map +1 -0
- package/dist/factory/unit/glsl/wall/fragmentShader.glsl +30 -0
- package/dist/factory/unit/glsl/wall/vertexShader.glsl +6 -0
- package/dist/factory/unit/index.d.ts +2 -0
- package/dist/factory/unit/index.js +61 -0
- package/dist/factory/unit/index.js.map +1 -0
- package/dist/factory/unit/line.d.ts +13 -0
- package/dist/factory/unit/line.js +96 -0
- package/dist/factory/unit/line.js.map +1 -0
- package/dist/factory/unit/poi copy.d.ts +15 -0
- package/dist/factory/unit/poi copy.js +144 -0
- package/dist/factory/unit/poi copy.js.map +1 -0
- package/dist/factory/unit/poi.d.ts +15 -0
- package/dist/factory/unit/poi.js +140 -0
- package/dist/factory/unit/poi.js.map +1 -0
- package/dist/factory/unit/point.d.ts +10 -0
- package/dist/factory/unit/point.js +71 -0
- package/dist/factory/unit/point.js.map +1 -0
- package/dist/factory/unit/wall.d.ts +14 -0
- package/dist/factory/unit/wall.js +113 -0
- package/dist/factory/unit/wall.js.map +1 -0
- package/dist/factory/utils/areaBoundingBox.d.ts +14 -0
- package/dist/factory/utils/areaBoundingBox.js +39 -0
- package/dist/factory/utils/areaBoundingBox.js.map +1 -0
- package/dist/factory/utils/base64.d.ts +1 -0
- package/dist/factory/utils/base64.js +2 -0
- package/dist/factory/utils/base64.js.map +1 -0
- package/dist/factory/utils/finirMaterial.d.ts +3 -0
- package/dist/factory/utils/finirMaterial.js +39 -0
- package/dist/factory/utils/finirMaterial.js.map +1 -0
- package/dist/factory/utils/fontMesh.d.ts +10 -0
- package/dist/factory/utils/fontMesh.js +48 -0
- package/dist/factory/utils/fontMesh.js.map +1 -0
- package/dist/factory/utils/index.d.ts +2 -0
- package/dist/factory/utils/index.js +24 -0
- package/dist/factory/utils/index.js.map +1 -0
- package/dist/factory/utils/switchMaterial.d.ts +17 -0
- package/dist/factory/utils/switchMaterial.js +108 -0
- package/dist/factory/utils/switchMaterial.js.map +1 -0
- package/dist/module/environment/index.d.ts +4 -1
- package/dist/module/environment/index.js +7 -2
- package/dist/module/environment/index.js.map +1 -1
- package/dist/module/environment/time/index.d.ts +3 -1
- package/dist/module/environment/time/index.js.map +1 -1
- package/dist/module/model/index.js +6 -0
- package/dist/module/model/index.js.map +1 -1
- package/dist/module/scene/index.d.ts +7 -3
- package/dist/module/scene/index.js +66 -36
- package/dist/module/scene/index.js.map +1 -1
- package/dist/sdkEntry.d.ts +5 -2
- package/dist/sdkEntry.js +85 -65
- package/dist/sdkEntry.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Mesh","MeshBasicMaterial","SphereGeometry","Vector3","utils","EPoiType","Poi","regionMap","CircleManage","gobal","Map","scene","interactionManager","storeManagement","get","belongTo","geometry","material","color","circle","data","getData","forEach","people","mesh","clone","position","fromArray","add","bindEvent","circleMesh","set","id","removeFromParent","clear","visible","poi","skewing","addEventListener","peoplePoi","Base","create","name","copy","regionKey","Object","keys","find","key"],"sources":["../../../src/factory/unit/circle.ts"],"sourcesContent":["import { Mesh, MeshBasicMaterial, SphereGeometry, Vector3, utils } from '@anov/3d-core'\nimport type { InteractionManager, Object3D, Scene } from '@anov/3d-core'\nimport { EPoiType, Poi } from '@anov/3d-ability'\nimport type Factory3D from '../3d'\nimport { regionMap } from '../regionData'\n\nclass CircleManage {\n private scene: Scene\n readonly circleMesh: Map<string, Object3D> = new Map()\n private interactionManager\n private peoplePoi: Object3D\n\n constructor(gobal: Factory3D) {\n this.scene = gobal.scene.scene\n this.interactionManager = utils.storeManagement.get<InteractionManager>('interactionManager')\n }\n\n generateCircle(belongTo: string) {\n const geometry = new SphereGeometry(2, 32, 16)\n const material = new MeshBasicMaterial({ color: 0xFED602 })\n const circle = new Mesh(geometry, material)\n\n const data = this.getData(belongTo)\n data.forEach((people) => {\n const mesh = circle.clone()\n mesh.position.fromArray(people.position)\n this.scene.add(mesh)\n this.bindEvent(mesh, people)\n this.circleMesh.set(people.id, mesh)\n })\n }\n\n remove() {\n this.circleMesh.forEach((mesh) => {\n mesh.removeFromParent()\n })\n this.circleMesh.clear()\n }\n\n setVisible(visible = true) {\n // 控制CYCLE的隐藏、显示\n this.circleMesh.forEach((poi) => {\n poi.visible = visible\n })\n }\n\n private bindEvent(mesh: Mesh, data) {\n this.interactionManager.add(mesh)\n const skewing = new Vector3(0, 1.5, -1.5) // 偏移量\n mesh.addEventListener('mouseover', () => {\n if (this.peoplePoi)\n return\n\n const poi = new Poi(EPoiType.Base)\n this.peoplePoi = poi.create(data.name)\n\n this.peoplePoi.position.copy(mesh.position.clone().add(skewing))\n this.scene.add(this.peoplePoi)\n })\n mesh.addEventListener('mouseout', () => {\n if (this.peoplePoi) {\n this.peoplePoi.removeFromParent()\n this.peoplePoi = null\n }\n })\n }\n\n private getData(belongTo) {\n const regionKey = Object.keys(regionMap).find((key: any) => {\n return regionMap[key].id === belongTo\n })\n\n return regionMap[regionKey] && regionMap[regionKey].people\n }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;IAAA;IAAA,OAED,iBAAgBxB,QAAQ,EAAE;MACxB,IAAM6B,SAAS,GAAGC,MAAM,CAACC,IAAI,CAACvC,SAAS,CAAC,CAACwC,IAAI,CAAC,UAACC,GAAQ,EAAK;QAC1D,OAAOzC,SAAS,CAACyC,GAAG,CAAC,CAAChB,EAAE,KAAKjB,QAAQ;MACvC,CAAC,CAAC;MAEF,OAAOR,SAAS,CAACqC,SAAS,CAAC,IAAIrC,SAAS,CAACqC,SAAS,CAAC,CAACrB,MAAM;IAC5D;EAAC;EAAA;AAAA;AAGH,eAAef,YAAY"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Object3D } from '@anov/3d-core';
|
|
2
|
+
import type Factory3D from '../3d';
|
|
3
|
+
declare type CylinderManageOption = {
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare class CylinderManage {
|
|
7
|
+
private scene;
|
|
8
|
+
readonly cylinderMesh: Map<string, Object3D>;
|
|
9
|
+
private option;
|
|
10
|
+
private gobal;
|
|
11
|
+
private currentoperate;
|
|
12
|
+
constructor(gobal: Factory3D, options?: CylinderManageOption);
|
|
13
|
+
generateCylinder(): void;
|
|
14
|
+
private cameraListenerHandle;
|
|
15
|
+
private cameraAddListener;
|
|
16
|
+
private cameraRemoveListener;
|
|
17
|
+
}
|
|
18
|
+
export default CylinderManage;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 { BoxGeometry, Color, Group, Mesh, ShaderMaterial, Vector3, globalObjectManage, use, utils } from '@anov/3d-core';
|
|
9
|
+
import createFontMesh from "../utils/fontMesh";
|
|
10
|
+
import { SceneStyle } from "../3d";
|
|
11
|
+
import regionMap from "../regionData";
|
|
12
|
+
import { collisionDetection } from "../utils/areaBoundingBox";
|
|
13
|
+
import { lookAtOnYAxis } from "../utils";
|
|
14
|
+
var emitter = utils.emitter;
|
|
15
|
+
var cylinderData = [{
|
|
16
|
+
label: '8人',
|
|
17
|
+
id: '1',
|
|
18
|
+
belongTo: regionMap.reform.id,
|
|
19
|
+
color: new Color('#FED602').getHex(),
|
|
20
|
+
points: regionMap.reform.poi.position,
|
|
21
|
+
height: 80
|
|
22
|
+
}, {
|
|
23
|
+
label: '7人',
|
|
24
|
+
id: '2',
|
|
25
|
+
belongTo: regionMap.reduction.id,
|
|
26
|
+
color: new Color('#FED602').getHex(),
|
|
27
|
+
points: regionMap.reduction.poi.position,
|
|
28
|
+
height: 70
|
|
29
|
+
}, {
|
|
30
|
+
label: '4人',
|
|
31
|
+
id: '3',
|
|
32
|
+
belongTo: regionMap.crudeOil.id,
|
|
33
|
+
color: new Color('#FED602').getHex(),
|
|
34
|
+
points: regionMap.crudeOil.poi.position,
|
|
35
|
+
height: 40
|
|
36
|
+
}, {
|
|
37
|
+
label: '10人',
|
|
38
|
+
id: '4',
|
|
39
|
+
belongTo: regionMap.catalyticCracking.id,
|
|
40
|
+
color: new Color('#FED602').getHex(),
|
|
41
|
+
points: regionMap.catalyticCracking.poi.position,
|
|
42
|
+
height: 100
|
|
43
|
+
}, {
|
|
44
|
+
label: '3人',
|
|
45
|
+
id: '5',
|
|
46
|
+
belongTo: regionMap.hydrocrackingUnit.id,
|
|
47
|
+
color: new Color('#FED602').getHex(),
|
|
48
|
+
points: regionMap.hydrocrackingUnit.poi.position,
|
|
49
|
+
height: 30
|
|
50
|
+
}, {
|
|
51
|
+
label: '8人',
|
|
52
|
+
id: '6',
|
|
53
|
+
belongTo: regionMap.cokingUnit.id,
|
|
54
|
+
color: new Color('#FED602').getHex(),
|
|
55
|
+
points: regionMap.cokingUnit.poi.position,
|
|
56
|
+
height: 80
|
|
57
|
+
}, {
|
|
58
|
+
label: '20人',
|
|
59
|
+
id: '7',
|
|
60
|
+
belongTo: regionMap.administrative.id,
|
|
61
|
+
color: new Color('#FED602').getHex(),
|
|
62
|
+
points: regionMap.administrative.poi.position,
|
|
63
|
+
height: 150
|
|
64
|
+
}];
|
|
65
|
+
var CylinderManage = /*#__PURE__*/function () {
|
|
66
|
+
function CylinderManage(gobal, options) {
|
|
67
|
+
var _this = this;
|
|
68
|
+
_classCallCheck(this, CylinderManage);
|
|
69
|
+
_defineProperty(this, "scene", void 0);
|
|
70
|
+
_defineProperty(this, "cylinderMesh", new Map());
|
|
71
|
+
_defineProperty(this, "option", void 0);
|
|
72
|
+
_defineProperty(this, "gobal", void 0);
|
|
73
|
+
_defineProperty(this, "currentoperate", void 0);
|
|
74
|
+
_defineProperty(this, "cameraListenerHandle", function () {
|
|
75
|
+
var currentCameraPosition = _this.gobal.control.object.position;
|
|
76
|
+
var box = _this.gobal.areaBoundingBox.boundingBoxMap.get(_this.currentoperate);
|
|
77
|
+
var iscollision = collisionDetection(box, currentCameraPosition);
|
|
78
|
+
if (!iscollision) {
|
|
79
|
+
emitter.emit('peoplemanagement-camera-out', {
|
|
80
|
+
belongTo: _this.currentoperate
|
|
81
|
+
});
|
|
82
|
+
_this.cameraRemoveListener();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
this.scene = gobal.scene.scene;
|
|
86
|
+
this.gobal = gobal;
|
|
87
|
+
this.option = options || {};
|
|
88
|
+
}
|
|
89
|
+
_createClass(CylinderManage, [{
|
|
90
|
+
key: "generateCylinder",
|
|
91
|
+
value: function generateCylinder() {
|
|
92
|
+
var _this2 = this;
|
|
93
|
+
cylinderData.forEach(function (item) {
|
|
94
|
+
var _this2$option$visible, _this2$option;
|
|
95
|
+
var geometry = new BoxGeometry(10, item.height, 10);
|
|
96
|
+
var material = new ShaderMaterial({
|
|
97
|
+
transparent: true,
|
|
98
|
+
depthWrite: false,
|
|
99
|
+
depthTest: false,
|
|
100
|
+
uniforms: {
|
|
101
|
+
uHeight: {
|
|
102
|
+
value: item.height
|
|
103
|
+
},
|
|
104
|
+
uColor: {
|
|
105
|
+
value: new Color(item.color)
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
vertexShader: "\n uniform float uHeight;\n varying float vOpacity;\n void main() {\n vOpacity = (position.y + uHeight/2.0) / uHeight;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }\n ",
|
|
109
|
+
fragmentShader: "\n uniform vec3 uColor;\n varying float vOpacity;\n void main() {\n gl_FragColor = vec4(uColor,0.3+vOpacity/10.0*7.0);\n }\n "
|
|
110
|
+
});
|
|
111
|
+
var cylinder = new Mesh(geometry, material);
|
|
112
|
+
var group = new Group();
|
|
113
|
+
group.visible = (_this2$option$visible = (_this2$option = _this2.option) === null || _this2$option === void 0 ? void 0 : _this2$option.visible) !== null && _this2$option$visible !== void 0 ? _this2$option$visible : true;
|
|
114
|
+
cylinder.position.copy(new Vector3().fromArray([item.points[0], item.points[1] + item.height / 2, item.points[2]]));
|
|
115
|
+
var interactionManager = utils.storeManagement.get('interactionManager');
|
|
116
|
+
interactionManager.add(cylinder);
|
|
117
|
+
cylinder.addEventListener('click', function () {
|
|
118
|
+
if (_this2.gobal.style === SceneStyle.real) return;
|
|
119
|
+
if (group.visible === false) return;
|
|
120
|
+
_this2.gobal.cameraUtil.set({
|
|
121
|
+
position: [item.points[0], item.points[1] + item.height / 2, item.points[2] + 100],
|
|
122
|
+
target: [item.points[0], item.points[1] + item.height / 2, item.points[2]]
|
|
123
|
+
}).then(function () {
|
|
124
|
+
emitter.emit('peoplemanagement-camera-enter', item);
|
|
125
|
+
var currentGroup = _this2.cylinderMesh.get(item.belongTo);
|
|
126
|
+
currentGroup.visible = false;
|
|
127
|
+
_this2.currentoperate = item.belongTo;
|
|
128
|
+
_this2.cameraAddListener();
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
_this2.cylinderMesh.set(item.belongTo, group);
|
|
132
|
+
group.add(cylinder);
|
|
133
|
+
var font = createFontMesh(item.label, {
|
|
134
|
+
position: new Vector3().fromArray([item.points[0], item.points[1] + item.height + 10, item.points[2]])
|
|
135
|
+
});
|
|
136
|
+
font.then(function (mesh) {
|
|
137
|
+
mesh.geometry.center();
|
|
138
|
+
group.add(mesh);
|
|
139
|
+
use.useframe(function () {
|
|
140
|
+
lookAtOnYAxis(mesh, globalObjectManage.camera.position);
|
|
141
|
+
});
|
|
142
|
+
_this2.scene.add(group);
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}, {
|
|
147
|
+
key: "cameraAddListener",
|
|
148
|
+
value: function cameraAddListener() {
|
|
149
|
+
this.gobal.control.addEventListener('change', this.cameraListenerHandle);
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "cameraRemoveListener",
|
|
153
|
+
value: function cameraRemoveListener() {
|
|
154
|
+
this.gobal.control.removeEventListener('change', this.cameraListenerHandle);
|
|
155
|
+
}
|
|
156
|
+
}]);
|
|
157
|
+
return CylinderManage;
|
|
158
|
+
}();
|
|
159
|
+
export default CylinderManage;
|
|
160
|
+
//# sourceMappingURL=cylinder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BoxGeometry","Color","Group","Mesh","ShaderMaterial","Vector3","globalObjectManage","use","utils","createFontMesh","SceneStyle","regionMap","collisionDetection","lookAtOnYAxis","emitter","cylinderData","label","id","belongTo","reform","color","getHex","points","poi","position","height","reduction","crudeOil","catalyticCracking","hydrocrackingUnit","cokingUnit","administrative","CylinderManage","gobal","options","Map","currentCameraPosition","control","object","box","areaBoundingBox","boundingBoxMap","get","currentoperate","iscollision","emit","cameraRemoveListener","scene","option","forEach","item","geometry","material","transparent","depthWrite","depthTest","uniforms","uHeight","value","uColor","vertexShader","fragmentShader","cylinder","group","visible","copy","fromArray","interactionManager","storeManagement","add","addEventListener","style","real","cameraUtil","set","target","then","currentGroup","cylinderMesh","cameraAddListener","font","mesh","center","useframe","camera","cameraListenerHandle","removeEventListener"],"sources":["../../../src/factory/unit/cylinder.ts"],"sourcesContent":["import type { InteractionManager, Object3D, Scene } from '@anov/3d-core'\nimport { BoxGeometry, Color, Group, Mesh, ShaderMaterial, Vector3, globalObjectManage, use, utils } from '@anov/3d-core'\nimport createFontMesh from '../utils/fontMesh'\nimport type Factory3D from '../3d'\nimport { SceneStyle } from '../3d'\nimport regionMap from '../regionData'\nimport { collisionDetection } from '../utils/areaBoundingBox'\n\nimport { lookAtOnYAxis } from '../utils'\n\nconst { emitter } = utils\n\nconst cylinderData = [\n {\n label: '8人',\n id: '1',\n belongTo: regionMap.reform.id,\n color: new Color('#FED602').getHex(),\n points: regionMap.reform.poi.position,\n height: 80,\n },\n {\n label: '7人',\n id: '2',\n belongTo: regionMap.reduction.id,\n color: new Color('#FED602').getHex(),\n points: regionMap.reduction.poi.position,\n height: 70,\n },\n {\n label: '4人',\n id: '3',\n belongTo: regionMap.crudeOil.id,\n color: new Color('#FED602').getHex(),\n points: regionMap.crudeOil.poi.position,\n height: 40,\n },\n {\n label: '10人',\n id: '4',\n belongTo: regionMap.catalyticCracking.id,\n color: new Color('#FED602').getHex(),\n points: regionMap.catalyticCracking.poi.position,\n height: 100,\n },\n {\n label: '3人',\n id: '5',\n belongTo: regionMap.hydrocrackingUnit.id,\n color: new Color('#FED602').getHex(),\n points: regionMap.hydrocrackingUnit.poi.position,\n height: 30,\n },\n {\n label: '8人',\n id: '6',\n belongTo: regionMap.cokingUnit.id,\n color: new Color('#FED602').getHex(),\n points: regionMap.cokingUnit.poi.position,\n height: 80,\n },\n {\n label: '20人',\n id: '7',\n belongTo: regionMap.administrative.id,\n color: new Color('#FED602').getHex(),\n points: regionMap.administrative.poi.position,\n height: 150,\n },\n]\n\ntype CylinderManageOption = {\n visible?: boolean\n}\n\nclass CylinderManage {\n private scene: Scene\n readonly cylinderMesh: Map<string, Object3D> = new Map()\n private option: CylinderManageOption\n private gobal: Factory3D\n private currentoperate: string\n\n constructor(gobal: Factory3D, options?: CylinderManageOption) {\n this.scene = gobal.scene.scene\n this.gobal = gobal\n this.option = options || {}\n }\n\n generateCylinder() {\n cylinderData.forEach((item) => {\n const geometry = new BoxGeometry(10, item.height, 10)\n const material = new ShaderMaterial({\n transparent: true,\n depthWrite: false,\n depthTest: false,\n uniforms: {\n uHeight: {\n value: item.height,\n },\n uColor: {\n value: new Color(item.color),\n },\n },\n vertexShader: `\n uniform float uHeight;\n varying float vOpacity;\n void main() {\n vOpacity = (position.y + uHeight/2.0) / uHeight;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }\n `,\n fragmentShader: `\n uniform vec3 uColor;\n varying float vOpacity;\n void main() {\n gl_FragColor = vec4(uColor,0.3+vOpacity/10.0*7.0);\n }\n `,\n })\n const cylinder = new Mesh(geometry, material)\n const group = new Group()\n\n group.visible = this.option?.visible ?? true\n cylinder.position.copy(new Vector3().fromArray([item.points[0], item.points[1] + item.height / 2, item.points[2]]))\n\n const interactionManager = utils.storeManagement.get<InteractionManager>('interactionManager')\n interactionManager.add(cylinder)\n\n cylinder.addEventListener('click', () => {\n if (this.gobal.style === SceneStyle.real)\n return\n\n if (group.visible === false)\n return\n\n this.gobal.cameraUtil.set({\n position: [item.points[0], item.points[1] + item.height / 2, item.points[2] + 100],\n target: [item.points[0], item.points[1] + item.height / 2, item.points[2]],\n }).then(() => {\n emitter.emit('peoplemanagement-camera-enter', item)\n const currentGroup = this.cylinderMesh.get(item.belongTo) as Group\n currentGroup.visible = false\n\n this.currentoperate = item.belongTo\n this.cameraAddListener()\n })\n })\n\n this.cylinderMesh.set(item.belongTo, group)\n group.add(cylinder)\n\n const font = createFontMesh(item.label, {\n position: new Vector3().fromArray([item.points[0], item.points[1] + item.height + 10, item.points[2]]),\n })\n\n font.then((mesh) => {\n mesh.geometry.center()\n\n group.add(mesh)\n\n use.useframe(() => {\n lookAtOnYAxis(mesh, globalObjectManage.camera.position)\n })\n this.scene.add(group)\n })\n })\n }\n\n private cameraListenerHandle = () => {\n const currentCameraPosition = this.gobal.control.object.position\n const box = this.gobal.areaBoundingBox.boundingBoxMap.get(this.currentoperate)\n const iscollision = collisionDetection(box, currentCameraPosition)\n\n if (!iscollision) {\n emitter.emit('peoplemanagement-camera-out', {\n belongTo: this.currentoperate,\n })\n\n this.cameraRemoveListener()\n }\n }\n\n private cameraAddListener() {\n this.gobal.control.addEventListener('change', this.cameraListenerHandle)\n }\n\n private cameraRemoveListener() {\n this.gobal.control.removeEventListener('change', this.cameraListenerHandle)\n }\n}\n\nexport default CylinderManage"],"mappings":";;;;;;;AACA,SAASA,WAAW,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,cAAc,EAAEC,OAAO,EAAEC,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,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAACD,oBAAoB,CAAC;IAC7E;EAAC;EAAA;AAAA;AAGH,eAAerD,cAAc"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
uniform float iTime;
|
|
2
|
+
uniform float size;////循环
|
|
3
|
+
uniform float width;///宽度
|
|
4
|
+
uniform float speed;///速度
|
|
5
|
+
uniform float alpha;///透明度
|
|
6
|
+
uniform vec3 color1;///颜色1
|
|
7
|
+
uniform vec3 color2;///颜色2
|
|
8
|
+
varying vec2 vUv;
|
|
9
|
+
|
|
10
|
+
vec3 colorfix(vec3 color) {
|
|
11
|
+
return vec3(color.r, color.g, color.b);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
|
15
|
+
vec2 uv = vUv;
|
|
16
|
+
vec2 wallUV = uv;
|
|
17
|
+
wallUV.y *= size;
|
|
18
|
+
|
|
19
|
+
float fwallUV = floor(fract(wallUV.y - iTime * speed) + width);
|
|
20
|
+
float dis = 1. - max((uv.y * 8. - 7.), 1. - (uv.y * 8.));
|
|
21
|
+
float dis2 = 1. - (uv.y * 4. - 3.);
|
|
22
|
+
vec3 col = color1 * dis2 + color2 * (1. - dis2);
|
|
23
|
+
fragColor = vec4(col, fwallUV * alpha * dis);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
void main() {
|
|
27
|
+
vec2 fragCoord = gl_FragCoord.xy;
|
|
28
|
+
mainImage(gl_FragColor, fragCoord);
|
|
29
|
+
}
|
|
30
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { utils } from '@anov/3d-core';
|
|
2
|
+
import WallManage from "./wall";
|
|
3
|
+
import CylinderManage from "./cylinder";
|
|
4
|
+
import PoiManage from "./poi";
|
|
5
|
+
import CircleManage from "./circle";
|
|
6
|
+
import AreaBoundingBoxManage from "./areaBoundingBox";
|
|
7
|
+
var emitter = utils.emitter;
|
|
8
|
+
var handleUnit = function handleUnit() {
|
|
9
|
+
var _this = this;
|
|
10
|
+
// 围栏
|
|
11
|
+
var wall = new WallManage(this, {
|
|
12
|
+
visible: false
|
|
13
|
+
});
|
|
14
|
+
wall.generateWall();
|
|
15
|
+
this.wall = wall;
|
|
16
|
+
|
|
17
|
+
// 围线
|
|
18
|
+
// const line = new LineManage(this, {
|
|
19
|
+
// visible: false,
|
|
20
|
+
// })
|
|
21
|
+
// line.generateLine()
|
|
22
|
+
// this.line = line
|
|
23
|
+
|
|
24
|
+
// 圆柱
|
|
25
|
+
var cylinder = new CylinderManage(this, {
|
|
26
|
+
visible: false
|
|
27
|
+
});
|
|
28
|
+
cylinder.generateCylinder();
|
|
29
|
+
this.cylinder = cylinder;
|
|
30
|
+
|
|
31
|
+
// POI
|
|
32
|
+
var poi = new PoiManage(this);
|
|
33
|
+
poi.generatePoi();
|
|
34
|
+
this.poi = poi;
|
|
35
|
+
|
|
36
|
+
// people
|
|
37
|
+
var circle = new CircleManage(this);
|
|
38
|
+
this.circle = circle;
|
|
39
|
+
emitter.on('peoplemanagement-camera-enter', function (data) {
|
|
40
|
+
var _this$circle;
|
|
41
|
+
(_this$circle = _this.circle) === null || _this$circle === void 0 ? void 0 : _this$circle.generateCircle(data === null || data === void 0 ? void 0 : data.belongTo);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// boundingBox
|
|
45
|
+
var areaBoundingBox = new AreaBoundingBoxManage();
|
|
46
|
+
areaBoundingBox.generateBoundingBox();
|
|
47
|
+
this.areaBoundingBox = areaBoundingBox;
|
|
48
|
+
|
|
49
|
+
// point
|
|
50
|
+
// const points = new PointManage(this)
|
|
51
|
+
// points.generatePoint()
|
|
52
|
+
|
|
53
|
+
// some global events handle
|
|
54
|
+
this.addEventListener('peoplemanagement-camera-out', function (args) {
|
|
55
|
+
var belongTo = args.belongTo;
|
|
56
|
+
cylinder.cylinderMesh.get(belongTo).visible = true;
|
|
57
|
+
_this.circle.remove();
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
export default handleUnit;
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["utils","WallManage","CylinderManage","PoiManage","CircleManage","AreaBoundingBoxManage","emitter","handleUnit","wall","visible","generateWall","cylinder","generateCylinder","poi","generatePoi","circle","on","data","generateCircle","belongTo","areaBoundingBox","generateBoundingBox","addEventListener","args","cylinderMesh","get","remove"],"sources":["../../../src/factory/unit/index.ts"],"sourcesContent":["import { utils } from '@anov/3d-core'\nimport WallManage from './wall'\nimport LineManage from './line'\nimport CylinderManage from './cylinder'\nimport PoiManage from './poi'\nimport CircleManage from './circle'\nimport AreaBoundingBoxManage from './areaBoundingBox'\nimport PointManage from './point'\n\nconst { emitter } = utils\n\nconst handleUnit = function () {\n // 围栏\n const wall = new WallManage(this, { visible: false })\n wall.generateWall()\n this.wall = wall\n\n // 围线\n // const line = new LineManage(this, {\n // visible: false,\n // })\n // line.generateLine()\n // this.line = line\n\n // 圆柱\n const cylinder = new CylinderManage(this, {\n visible: false,\n })\n cylinder.generateCylinder()\n\n this.cylinder = cylinder\n\n // POI\n const poi = new PoiManage(this)\n poi.generatePoi()\n this.poi = poi\n\n // people\n const circle = new CircleManage(this)\n this.circle = circle\n\n emitter.on('peoplemanagement-camera-enter', (data: any) => {\n this.circle?.generateCircle(data?.belongTo)\n })\n\n // boundingBox\n const areaBoundingBox = new AreaBoundingBoxManage()\n areaBoundingBox.generateBoundingBox()\n this.areaBoundingBox = areaBoundingBox\n\n // point\n // const points = new PointManage(this)\n // points.generatePoint()\n\n // some global events handle\n this.addEventListener('peoplemanagement-camera-out', (args) => {\n const { belongTo } = args\n cylinder.cylinderMesh.get(belongTo).visible = true\n this.circle.remove()\n })\n}\n\nexport default handleUnit\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,eAAe;AACrC,OAAOC,UAAU;AAEjB,OAAOC,cAAc;AACrB,OAAOC,SAAS;AAChB,OAAOC,YAAY;A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QAAQ,CAAC,CAACV,OAAO,GAAG,IAAI;IAClD,KAAI,CAACM,MAAM,CAACW,MAAM,EAAE;EACtB,CAAC,CAAC;AACJ,CAAC;AAED,eAAenB,UAAU"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Object3D } from '@anov/3d-core';
|
|
2
|
+
import type Factory3D from '../3d';
|
|
3
|
+
declare type LineManageOption = {
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare class LineManage {
|
|
7
|
+
private scene;
|
|
8
|
+
readonly lineMesh: Map<string, Object3D>;
|
|
9
|
+
private option;
|
|
10
|
+
constructor(gobal: Factory3D, options?: LineManageOption);
|
|
11
|
+
generateLine(): void;
|
|
12
|
+
}
|
|
13
|
+
export default LineManage;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
+
import { Color, lib } from '@anov/3d-core';
|
|
15
|
+
import regionMap from "../regionData";
|
|
16
|
+
var Line2 = lib.Line2,
|
|
17
|
+
LineGeometry = lib.LineGeometry,
|
|
18
|
+
LineMaterial = lib.LineMaterial;
|
|
19
|
+
var linePosition = [{
|
|
20
|
+
label: regionMap.reform.title,
|
|
21
|
+
id: '1',
|
|
22
|
+
color: new Color('red').getHex(),
|
|
23
|
+
belongTo: regionMap.reform.id,
|
|
24
|
+
points: [].concat(_toConsumableArray(regionMap.reform.area), [regionMap.reform.area[0]])
|
|
25
|
+
}, {
|
|
26
|
+
label: regionMap.reduction.title,
|
|
27
|
+
id: '2',
|
|
28
|
+
color: new Color('red').getHex(),
|
|
29
|
+
belongTo: regionMap.reduction.id,
|
|
30
|
+
points: [].concat(_toConsumableArray(regionMap.reduction.area), [regionMap.reduction.area[0]])
|
|
31
|
+
}, {
|
|
32
|
+
label: regionMap.crudeOil.title,
|
|
33
|
+
id: '3',
|
|
34
|
+
color: new Color('red').getHex(),
|
|
35
|
+
belongTo: regionMap.crudeOil.id,
|
|
36
|
+
points: [].concat(_toConsumableArray(regionMap.crudeOil.area), [regionMap.crudeOil.area[0]])
|
|
37
|
+
}, {
|
|
38
|
+
label: regionMap.catalyticCracking.title,
|
|
39
|
+
id: '4',
|
|
40
|
+
color: new Color('red').getHex(),
|
|
41
|
+
belongTo: regionMap.catalyticCracking.id,
|
|
42
|
+
points: [].concat(_toConsumableArray(regionMap.catalyticCracking.area), [regionMap.catalyticCracking.area[0]])
|
|
43
|
+
}, {
|
|
44
|
+
label: regionMap.hydrocrackingUnit.title,
|
|
45
|
+
id: '5',
|
|
46
|
+
color: new Color('red').getHex(),
|
|
47
|
+
belongTo: regionMap.hydrocrackingUnit.id,
|
|
48
|
+
points: [].concat(_toConsumableArray(regionMap.hydrocrackingUnit.area), [regionMap.hydrocrackingUnit.area[0]])
|
|
49
|
+
}, {
|
|
50
|
+
label: regionMap.cokingUnit.title,
|
|
51
|
+
id: '6',
|
|
52
|
+
color: new Color('yellow').getHex(),
|
|
53
|
+
belongTo: regionMap.cokingUnit.id,
|
|
54
|
+
points: [].concat(_toConsumableArray(regionMap.cokingUnit.area), [regionMap.cokingUnit.area[0]])
|
|
55
|
+
}, {
|
|
56
|
+
label: regionMap.administrative.title,
|
|
57
|
+
id: '7',
|
|
58
|
+
color: new Color('red').getHex(),
|
|
59
|
+
belongTo: regionMap.administrative.id,
|
|
60
|
+
points: [].concat(_toConsumableArray(regionMap.administrative.area), [regionMap.administrative.area[0]])
|
|
61
|
+
}];
|
|
62
|
+
var LineManage = /*#__PURE__*/function () {
|
|
63
|
+
function LineManage(gobal, options) {
|
|
64
|
+
_classCallCheck(this, LineManage);
|
|
65
|
+
_defineProperty(this, "scene", void 0);
|
|
66
|
+
_defineProperty(this, "lineMesh", new Map());
|
|
67
|
+
_defineProperty(this, "option", void 0);
|
|
68
|
+
this.scene = gobal.scene.scene;
|
|
69
|
+
this.option = options || {};
|
|
70
|
+
}
|
|
71
|
+
_createClass(LineManage, [{
|
|
72
|
+
key: "generateLine",
|
|
73
|
+
value: function generateLine() {
|
|
74
|
+
var _this = this;
|
|
75
|
+
linePosition.forEach(function (item) {
|
|
76
|
+
var _this$option$visible, _this$option;
|
|
77
|
+
var geometry = new LineGeometry();
|
|
78
|
+
var points = [];
|
|
79
|
+
item.points.forEach(function (point) {
|
|
80
|
+
points.push(point[0], point[1], point[2]);
|
|
81
|
+
});
|
|
82
|
+
geometry.setPositions(points);
|
|
83
|
+
var line = new Line2(geometry, new LineMaterial({
|
|
84
|
+
color: item.color,
|
|
85
|
+
linewidth: 0.005
|
|
86
|
+
}));
|
|
87
|
+
line.visible = (_this$option$visible = (_this$option = _this.option) === null || _this$option === void 0 ? void 0 : _this$option.visible) !== null && _this$option$visible !== void 0 ? _this$option$visible : true;
|
|
88
|
+
_this.scene.add(line);
|
|
89
|
+
_this.lineMesh.set(item.id, line);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}]);
|
|
93
|
+
return LineManage;
|
|
94
|
+
}();
|
|
95
|
+
export default LineManage;
|
|
96
|
+
//# sourceMappingURL=line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Color","lib","regionMap","Line2","LineGeometry","LineMaterial","linePosition","label","reform","title","id","color","getHex","belongTo","points","area","reduction","crudeOil","catalyticCracking","hydrocrackingUnit","cokingUnit","administrative","LineManage","gobal","options","Map","scene","option","forEach","item","geometry","point","push","setPositions","line","linewidth","visible","add","lineMesh","set"],"sources":["../../../src/factory/unit/line.ts"],"sourcesContent":["import type { Object3D, Scene } from '@anov/3d-core'\nimport { Color, lib } from '@anov/3d-core'\nimport type Factory3D from '../3d'\nimport regionMap from '../regionData'\n\nconst { Line2, LineGeometry, LineMaterial } = lib\nconst linePosition = [\n {\n label: regionMap.reform.title,\n id: '1',\n color: new Color('red').getHex(),\n belongTo: regionMap.reform.id,\n points: [...regionMap.reform.area, regionMap.reform.area[0]],\n },\n {\n label: regionMap.reduction.title,\n id: '2',\n color: new Color('red').getHex(),\n belongTo: regionMap.reduction.id,\n points: [...regionMap.reduction.area, regionMap.reduction.area[0]],\n },\n {\n label: regionMap.crudeOil.title,\n id: '3',\n color: new Color('red').getHex(),\n belongTo: regionMap.crudeOil.id,\n points: [...regionMap.crudeOil.area, regionMap.crudeOil.area[0]],\n },\n {\n label: regionMap.catalyticCracking.title,\n id: '4',\n color: new Color('red').getHex(),\n belongTo: regionMap.catalyticCracking.id,\n points: [...regionMap.catalyticCracking.area, regionMap.catalyticCracking.area[0]],\n },\n {\n label: regionMap.hydrocrackingUnit.title,\n id: '5',\n color: new Color('red').getHex(),\n belongTo: regionMap.hydrocrackingUnit.id,\n points: [...regionMap.hydrocrackingUnit.area, regionMap.hydrocrackingUnit.area[0]],\n },\n {\n label: regionMap.cokingUnit.title,\n id: '6',\n color: new Color('yellow').getHex(),\n belongTo: regionMap.cokingUnit.id,\n points: [...regionMap.cokingUnit.area, regionMap.cokingUnit.area[0]],\n },\n {\n label: regionMap.administrative.title,\n id: '7',\n color: new Color('red').getHex(),\n belongTo: regionMap.administrative.id,\n points: [...regionMap.administrative.area, regionMap.administrative.area[0]],\n },\n]\n\ntype LineManageOption = {\n visible?: boolean\n}\n\nclass LineManage {\n private scene: Scene\n readonly lineMesh: Map<string, Object3D> = new Map()\n private option: LineManageOption\n\n constructor(gobal: Factory3D, options?: LineManageOption) {\n this.scene = gobal.scene.scene\n this.option = options || {}\n }\n\n generateLine() {\n linePosition.forEach((item) => {\n const geometry = new LineGeometry()\n const points = []\n item.points.forEach((point) => {\n points.push(point[0], point[1], point[2])\n })\n\n geometry.setPositions(points)\n\n const line = new Line2(geometry,\n new LineMaterial({\n color: item.color,\n linewidth: 0.005,\n }))\n\n line.visible = this.option?.visible ?? true\n this.scene.add(line)\n this.lineMesh.set(item.id, line)\n })\n }\n}\n\nexport default LineManage"],"mappings":";;;;;;;;;;;;;AACA,SAASA,KAAK,EAAEC,GAAG,QAAQ,eAAe;AAE1C,OAAOC,SAAS;AAEhB,IAAQC,KAAK,GAAiCF,GAAG,CAAzCE,KAAK;EAAEC,YAAY,GAAmBH,GAAG,CAAlCG,YAAY;EAAEC,YAAY,GAAKJ,GAAG,CAApBI,YAAY;AACzC,IAAMC,YAAY,GAAG,CACnB;EACEC,KAAK,EAAEL,SAAS,CAACM,MAAM,CAACC,KAAK;EAC7BC,EAAE,EAAE,GAAG;EACPC,KAAK,EAAE,IAAIX,KAAK,CAAC,KAAK,CAAC,CAACY,MAAM,EAAE;EAChCC,QAAQ,EAAEX,SAAS,CAACM,MAAM,CAACE,EAAE;EAC7BI,MAAM,+BAAMZ,SAAS,CAACM,MAAM,CAACO,IAAI,IAAEb,SAAS,CAACM,MAAM,CAACO,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC,EACD;EACER,KAAK,EAAEL,SAAS,CAACc,SAAS,CAACP,KAAK;EAChCC,EAAE,EAAE,GAAG;EACPC,KAAK,EAAE,IAAIX,KAAK,CAAC,KAAK,CAAC,CAACY,MAAM,EAAE;EAChCC,QAAQ,EAAEX,SAAS,CAACc,SAAS,CAACN,EAAE;EAChCI,MAAM,+BAAMZ,SAAS,CAACc,SAAS,CAACD,IAAI,IAAEb,SAAS,CAACc,SAAS,CAACD,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC,EACD;EACER,KAAK,EAAEL,SAAS,CAACe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O,2CAAG,KAAI,CAACT,MAAM,iDAAX,aAAaS,OAAO,uEAAI,IAAI;QAC3C,KAAI,CAACV,KAAK,CAACW,GAAG,CAACH,IAAI,CAAC;QACpB,KAAI,CAACI,QAAQ,CAACC,GAAG,CAACV,IAAI,CAACnB,EAAE,EAAEwB,IAAI,CAAC;MAClC,CAAC,CAAC;IACJ;EAAC;EAAA;AAAA;AAGH,eAAeZ,UAAU"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Object3D } from '@anov/3d-core';
|
|
2
|
+
declare class PoiManage {
|
|
3
|
+
private gobal;
|
|
4
|
+
private scene;
|
|
5
|
+
private dialogPoi;
|
|
6
|
+
readonly poiMesh: Map<string, Object3D>;
|
|
7
|
+
private wallManage;
|
|
8
|
+
private interactionManager;
|
|
9
|
+
constructor(gobal: any);
|
|
10
|
+
generatePoi(): void;
|
|
11
|
+
setVisible(visible?: boolean): void;
|
|
12
|
+
reset(): void;
|
|
13
|
+
private addDialogPanel;
|
|
14
|
+
}
|
|
15
|
+
export default PoiManage;
|