@inweb/viewer-three 26.2.1 → 26.3.0

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.
@@ -6,7 +6,7 @@ import { Markup } from "@inweb/markup";
6
6
 
7
7
  export * from "@inweb/markup";
8
8
 
9
- import { Line, Vector3, BufferGeometry, Float32BufferAttribute, LineBasicMaterial, Mesh, MeshBasicMaterial, DoubleSide, EventDispatcher, MOUSE, TOUCH, Spherical, Quaternion, Vector2, Plane, Object3D, Matrix4, Vector4, Raycaster, Controls, Clock, Box3, Sphere, MathUtils, Color, PMREMGenerator, AmbientLight, DirectionalLight, OrthographicCamera, CylinderGeometry, Sprite, CanvasTexture, SRGBColorSpace, SpriteMaterial, LoadingManager, LoaderUtils, Scene, PerspectiveCamera, WebGLRenderer, LinearToneMapping } from "three";
9
+ import { Line, Vector3, BufferGeometry, Float32BufferAttribute, LineBasicMaterial, Mesh, MeshBasicMaterial, DoubleSide, EventDispatcher, MOUSE, TOUCH, Spherical, Quaternion, Vector2, Plane, Object3D, Matrix4, Vector4, Raycaster, Controls, Clock, Box3, Sphere, MathUtils, Color, PMREMGenerator, OrthographicCamera, CylinderGeometry, Sprite, CanvasTexture, SRGBColorSpace, SpriteMaterial, LoadingManager, LoaderUtils, Scene, PerspectiveCamera, WebGLRenderer, LinearToneMapping } from "three";
10
10
 
11
11
  import { TransformControls } from "three/examples/jsm/controls/TransformControls.js";
12
12
 
@@ -2029,23 +2029,6 @@ class ExtentsComponent {
2029
2029
  }
2030
2030
  }
2031
2031
 
2032
- class LightComponent {
2033
- constructor(viewer) {
2034
- this.viewer = viewer;
2035
- this.ambientLight = new AmbientLight(16777215, 0);
2036
- this.viewer.camera.add(this.ambientLight);
2037
- this.directionalLight = new DirectionalLight(16777215, 1);
2038
- this.directionalLight.position.set(.5, 0, .866);
2039
- this.viewer.camera.add(this.directionalLight);
2040
- }
2041
- dispose() {
2042
- this.ambientLight.removeFromParent();
2043
- this.ambientLight = undefined;
2044
- this.directionalLight.removeFromParent();
2045
- this.directionalLight = undefined;
2046
- }
2047
- }
2048
-
2049
2032
  class RenderLoopComponent {
2050
2033
  constructor(viewer) {
2051
2034
  this.animate = (time = 0) => {
@@ -2182,7 +2165,6 @@ class WCSHelperComponent {
2182
2165
  };
2183
2166
  this.viewerRender = () => {
2184
2167
  if (!this.viewer.options.showWCS) return;
2185
- if (this.viewer.extents.isEmpty()) return;
2186
2168
  this.wcsHelper.render(this.viewer.renderer);
2187
2169
  };
2188
2170
  this.wcsHelper = new WCSHelper(viewer.camera);
@@ -2203,12 +2185,10 @@ const components = componentsRegistry("threejs");
2203
2185
 
2204
2186
  components.registerComponent("ExtentsComponent", (viewer => new ExtentsComponent(viewer)));
2205
2187
 
2206
- components.registerComponent("LightComponent", (viewer => new LightComponent(viewer)));
2188
+ components.registerComponent("CameraComponent", (viewer => new CameraComponent(viewer)));
2207
2189
 
2208
2190
  components.registerComponent("BackgroundComponent", (viewer => new BackgroundComponent(viewer)));
2209
2191
 
2210
- components.registerComponent("CameraComponent", (viewer => new CameraComponent(viewer)));
2211
-
2212
2192
  components.registerComponent("ResizeCanvasComponent", (viewer => new ResizeCanvasComponent(viewer)));
2213
2193
 
2214
2194
  components.registerComponent("RenderLoopComponent", (viewer => new RenderLoopComponent(viewer)));