@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.
Files changed (41) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/dnalogel.cjs.js +2 -2
  3. package/dist/dnalogel.es.js +7 -7
  4. package/dist/dnalogel.umd.js +2 -2
  5. package/docs/.nojekyll +1 -0
  6. package/docs/assets/highlight.css +78 -0
  7. package/docs/assets/icons.css +1043 -0
  8. package/docs/assets/icons.png +0 -0
  9. package/docs/assets/icons@2x.png +0 -0
  10. package/docs/assets/main.js +52 -0
  11. package/docs/assets/search.js +1 -0
  12. package/docs/assets/style.css +1413 -0
  13. package/docs/assets/widgets.png +0 -0
  14. package/docs/assets/widgets@2x.png +0 -0
  15. package/docs/classes/ModelRoomLabelController.html +20 -0
  16. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
  17. package/docs/enums/ModelFloorplanErrorType.html +1 -0
  18. package/docs/index.html +43 -0
  19. package/docs/interfaces/LineJson.html +1 -0
  20. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
  21. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
  22. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
  23. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
  24. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
  25. package/docs/interfaces/ModelFloorplanParameterType.html +1 -0
  26. package/docs/interfaces/ModelFloorplanViewEvent.html +5 -0
  27. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
  28. package/docs/interfaces/PanoCompassPluginData.html +1 -0
  29. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
  30. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
  31. package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
  32. package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
  33. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
  34. package/docs/interfaces/PointJson.html +1 -0
  35. package/docs/interfaces/RoomLabel.html +13 -0
  36. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +1 -0
  37. package/docs/modules.html +26 -0
  38. package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
  39. package/libs/ModelViewPlugin/index.js +6 -6
  40. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +0 -1
  41. package/package.json +3 -3
@@ -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 modelWillLoad = () => {
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 modelLoaded = () => {
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
- needsRender = true;
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", modelLoaded);
166
- five.on("modelWillLoad", 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
  };