@realsee/dnalogel 2.0.0-alpha.7 → 2.0.0-alpha.8
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/CHANGELOG.md +6 -0
- package/dist/dnalogel.cjs.js +2 -2
- package/dist/dnalogel.es.js +7 -7
- package/dist/dnalogel.umd.js +2 -2
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +78 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1413 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/ModelRoomLabelController.html +20 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
- package/docs/enums/ModelFloorplanErrorType.html +1 -0
- package/docs/index.html +43 -0
- package/docs/interfaces/LineJson.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
- package/docs/interfaces/ModelFloorplanParameterType.html +1 -0
- package/docs/interfaces/ModelFloorplanViewEvent.html +5 -0
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -0
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
- package/docs/interfaces/PointJson.html +1 -0
- package/docs/interfaces/RoomLabel.html +13 -0
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +1 -0
- package/docs/modules.html +26 -0
- package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
- package/libs/ModelViewPlugin/index.js +6 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +0 -1
- package/package.json +3 -3
package/dist/dnalogel.es.js
CHANGED
|
@@ -28,6 +28,7 @@ import { Line as Line$2 } from "@realsee/five/line";
|
|
|
28
28
|
import { Five, Subscribe } from "@realsee/five";
|
|
29
29
|
const ModelViewPlugin = (five) => {
|
|
30
30
|
let needsRender = true;
|
|
31
|
+
let renderer = null;
|
|
31
32
|
const scene = new THREE.Scene();
|
|
32
33
|
const camera = new THREE.PerspectiveCamera(60, 1, 0.1, 1e3);
|
|
33
34
|
let model = new THREE.Object3D();
|
|
@@ -45,7 +46,6 @@ const ModelViewPlugin = (five) => {
|
|
|
45
46
|
scene.add(light);
|
|
46
47
|
}
|
|
47
48
|
scene.add(model);
|
|
48
|
-
let renderer = null;
|
|
49
49
|
const initRendererIfNeeds = () => {
|
|
50
50
|
if (!five.renderer)
|
|
51
51
|
return;
|
|
@@ -58,7 +58,7 @@ const ModelViewPlugin = (five) => {
|
|
|
58
58
|
}
|
|
59
59
|
return renderer;
|
|
60
60
|
};
|
|
61
|
-
const
|
|
61
|
+
const handleModelWillLoad = () => {
|
|
62
62
|
model.traverse((object) => {
|
|
63
63
|
if (object instanceof THREE.Mesh) {
|
|
64
64
|
const materials = [].concat(object.material);
|
|
@@ -70,7 +70,7 @@ const ModelViewPlugin = (five) => {
|
|
|
70
70
|
scene.add(model);
|
|
71
71
|
update2();
|
|
72
72
|
};
|
|
73
|
-
const
|
|
73
|
+
const handleModelLoaded = () => {
|
|
74
74
|
function cloneMaterial(material) {
|
|
75
75
|
material = material.clone();
|
|
76
76
|
material.uniforms.modelAlpha.value = 1;
|
|
@@ -120,7 +120,7 @@ const ModelViewPlugin = (five) => {
|
|
|
120
120
|
camera.aspect = width / height;
|
|
121
121
|
camera.updateProjectionMatrix();
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
update2();
|
|
124
124
|
};
|
|
125
125
|
const cameraDistance = () => {
|
|
126
126
|
const bounding = five.model.bounding;
|
|
@@ -162,8 +162,8 @@ const ModelViewPlugin = (five) => {
|
|
|
162
162
|
renderer.dispose();
|
|
163
163
|
renderer = null;
|
|
164
164
|
};
|
|
165
|
-
five.on("modelLoaded",
|
|
166
|
-
five.on("modelWillLoad",
|
|
165
|
+
five.on("modelLoaded", handleModelLoaded);
|
|
166
|
+
five.on("modelWillLoad", handleModelWillLoad);
|
|
167
167
|
five.on("cameraDirectionUpdate", update2);
|
|
168
168
|
five.on("dispose", dispose);
|
|
169
169
|
five.on("renderFrame", render);
|
|
@@ -5695,7 +5695,6 @@ class ModelFloorplanPluginController {
|
|
|
5695
5695
|
this.five.model.loaded ? this.handleModelLoaded() : five.once("modelLoaded", this.handleModelLoaded);
|
|
5696
5696
|
five.once("dispose", this.dispose);
|
|
5697
5697
|
five.on("modeChange", this.handleModeChange);
|
|
5698
|
-
five.on("panGesture", this.handlePanGesture);
|
|
5699
5698
|
five.on("panoArrived", this.handlePanoArrived);
|
|
5700
5699
|
five.on("wantsChangeMode", this.handleWantsChangeMode);
|
|
5701
5700
|
five.on("wantsInteriaPan", this.handleWantsInteriaPan);
|
|
@@ -36287,6 +36286,7 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
|
|
|
36287
36286
|
if (!state.enabled)
|
|
36288
36287
|
return true;
|
|
36289
36288
|
state.enabled = false;
|
|
36289
|
+
hide();
|
|
36290
36290
|
five.off("modeChange", modeChangeHandler);
|
|
36291
36291
|
return true;
|
|
36292
36292
|
};
|