@inweb/viewer-three 26.2.0 → 26.2.2

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) => {
@@ -2203,12 +2186,10 @@ const components = componentsRegistry("threejs");
2203
2186
 
2204
2187
  components.registerComponent("ExtentsComponent", (viewer => new ExtentsComponent(viewer)));
2205
2188
 
2206
- components.registerComponent("LightComponent", (viewer => new LightComponent(viewer)));
2189
+ components.registerComponent("CameraComponent", (viewer => new CameraComponent(viewer)));
2207
2190
 
2208
2191
  components.registerComponent("BackgroundComponent", (viewer => new BackgroundComponent(viewer)));
2209
2192
 
2210
- components.registerComponent("CameraComponent", (viewer => new CameraComponent(viewer)));
2211
-
2212
2193
  components.registerComponent("ResizeCanvasComponent", (viewer => new ResizeCanvasComponent(viewer)));
2213
2194
 
2214
2195
  components.registerComponent("RenderLoopComponent", (viewer => new RenderLoopComponent(viewer)));