vim-web 0.6.0-dev.11 → 0.6.0-dev.12

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/vim-web.js CHANGED
@@ -47528,25 +47528,6 @@ const _CameraMovementSnap = class _CameraMovementSnap extends CameraMovement$1 {
47528
47528
  };
47529
47529
  __publicField(_CameraMovementSnap, "_ZERO", new Vector3());
47530
47530
  let CameraMovementSnap = _CameraMovementSnap;
47531
- function createOpaque() {
47532
- return new StandardMaterial(createBasicOpaque());
47533
- }
47534
- function createTransparent() {
47535
- return new StandardMaterial(createBasicTransparent());
47536
- }
47537
- function createBasicOpaque() {
47538
- return new MeshLambertMaterial({
47539
- color: 13421772,
47540
- flatShading: true,
47541
- side: DoubleSide
47542
- });
47543
- }
47544
- function createBasicTransparent() {
47545
- const mat = createBasicOpaque();
47546
- mat.transparent = true;
47547
- mat.opacity = 0.25;
47548
- return mat;
47549
- }
47550
47531
  class StandardMaterial {
47551
47532
  constructor(material) {
47552
47533
  __publicField(this, "three");
@@ -54555,9 +54536,7 @@ function applyMaterial(mesh, value) {
54555
54536
  mesh.visible = true;
54556
54537
  }
54557
54538
  const _Materials = class _Materials {
54558
- constructor(opaque, transparent, modelOpaque, modelTransparent, ghost2, mask, outline, merge) {
54559
- __publicField(this, "_opaque");
54560
- __publicField(this, "_transparent");
54539
+ constructor(modelOpaque, modelTransparent, ghost2, mask, outline, merge) {
54561
54540
  __publicField(this, "_modelOpaque");
54562
54541
  __publicField(this, "_modelTransparent");
54563
54542
  __publicField(this, "_ghost");
@@ -54566,14 +54545,9 @@ const _Materials = class _Materials {
54566
54545
  __publicField(this, "_outline");
54567
54546
  __publicField(this, "_merge");
54568
54547
  __publicField(this, "_clippingPlanes");
54569
- __publicField(this, "_sectionStrokeWidth", 0.01);
54570
- __publicField(this, "_sectionStrokeFalloff", 0.75);
54571
- __publicField(this, "_sectionStrokeColor", new Color(16185078));
54572
54548
  __publicField(this, "_onUpdate", new distExports$2.SignalDispatcher());
54573
54549
  // Shared color palette texture for all scene materials
54574
54550
  __publicField(this, "_colorPaletteTexture");
54575
- this._opaque = opaque ?? createOpaque();
54576
- this._transparent = transparent ?? createTransparent();
54577
54551
  const onUpdate = () => this._onUpdate.dispatch();
54578
54552
  this._modelOpaque = modelOpaque ?? createModelOpaque(onUpdate);
54579
54553
  this._modelTransparent = modelTransparent ?? createModelTransparent(onUpdate);
@@ -54625,12 +54599,8 @@ const _Materials = class _Materials {
54625
54599
  * Updates material settings based on the provided configuration.
54626
54600
  */
54627
54601
  applySettings(settings2) {
54628
- this.modelColor = settings2.standard.color;
54629
54602
  this._ghost.opacity = settings2.ghost.opacity;
54630
54603
  this._ghost.color = settings2.ghost.color;
54631
- this.sectionStrokeWidth = settings2.section.strokeWidth;
54632
- this.sectionStrokeFalloff = settings2.section.strokeFalloff;
54633
- this.sectionStrokeColor = settings2.section.strokeColor;
54634
54604
  this.outlineOpacity = settings2.outline.opacity;
54635
54605
  this.outlineColor = settings2.outline.color;
54636
54606
  this.outlineThickness = settings2.outline.thickness;
@@ -54639,15 +54609,6 @@ const _Materials = class _Materials {
54639
54609
  get onUpdate() {
54640
54610
  return this._onUpdate.asEvent();
54641
54611
  }
54642
- /** Base color tint applied to opaque and transparent model materials. */
54643
- get modelColor() {
54644
- return this._opaque.color;
54645
- }
54646
- set modelColor(color) {
54647
- this._opaque.color = color;
54648
- this._transparent.color = color;
54649
- this._onUpdate.dispatch();
54650
- }
54651
54612
  /** Opacity of the selection outline (0 = invisible, 1 = fully opaque). */
54652
54613
  get outlineOpacity() {
54653
54614
  return this._merge.opacity;
@@ -54677,45 +54638,10 @@ const _Materials = class _Materials {
54677
54638
  this._clippingPlanes = value;
54678
54639
  this._modelOpaque.clippingPlanes = value ?? null;
54679
54640
  this._modelTransparent.clippingPlanes = value ?? null;
54680
- this._opaque.clippingPlanes = value ?? null;
54681
- this._transparent.clippingPlanes = value ?? null;
54682
54641
  this._ghost.clippingPlanes = value ?? null;
54683
54642
  this._mask.clippingPlanes = value ?? null;
54684
54643
  this._onUpdate.dispatch();
54685
54644
  }
54686
- /** Width of the stroke rendered where the section box intersects the model. */
54687
- get sectionStrokeWidth() {
54688
- return this._sectionStrokeWidth;
54689
- }
54690
- set sectionStrokeWidth(value) {
54691
- if (this._sectionStrokeWidth === value) return;
54692
- this._sectionStrokeWidth = value;
54693
- this._opaque.sectionStrokeWidth = value;
54694
- this._transparent.sectionStrokeWidth = value;
54695
- this._onUpdate.dispatch();
54696
- }
54697
- /** Gradient falloff of the section box intersection stroke. */
54698
- get sectionStrokeFalloff() {
54699
- return this._sectionStrokeFalloff;
54700
- }
54701
- set sectionStrokeFalloff(value) {
54702
- if (this._sectionStrokeFalloff === value) return;
54703
- this._sectionStrokeFalloff = value;
54704
- this._opaque.sectionStrokeFalloff = value;
54705
- this._transparent.sectionStrokeFalloff = value;
54706
- this._onUpdate.dispatch();
54707
- }
54708
- /** Color of the section box intersection stroke. */
54709
- get sectionStrokeColor() {
54710
- return this._sectionStrokeColor;
54711
- }
54712
- set sectionStrokeColor(value) {
54713
- if (this._sectionStrokeColor === value) return;
54714
- this._sectionStrokeColor = value;
54715
- this._opaque.sectionStrokeColor = value;
54716
- this._transparent.sectionStrokeColor = value;
54717
- this._onUpdate.dispatch();
54718
- }
54719
54645
  /**
54720
54646
  * Creates the fixed quantized color palette texture if it doesn't exist.
54721
54647
  * The palette is deterministic (25³ = 15,625 quantized colors in 128×128 texture)
@@ -54725,6 +54651,8 @@ const _Materials = class _Materials {
54725
54651
  if (this._colorPaletteTexture) return;
54726
54652
  const textureData = buildPaletteTexture();
54727
54653
  this._colorPaletteTexture = new DataTexture(
54654
+ // Cast: TS 5.7 narrows Uint8Array.buffer to ArrayBufferLike (includes SharedArrayBuffer),
54655
+ // but Three.js expects BufferSource (ArrayBuffer only). Safe — Uint8Array always backs ArrayBuffer.
54728
54656
  textureData,
54729
54657
  128,
54730
54658
  128,
@@ -54734,8 +54662,6 @@ const _Materials = class _Materials {
54734
54662
  this._colorPaletteTexture.needsUpdate = true;
54735
54663
  this._colorPaletteTexture.minFilter = NearestFilter;
54736
54664
  this._colorPaletteTexture.magFilter = NearestFilter;
54737
- this._opaque.setColorPaletteTexture(this._colorPaletteTexture);
54738
- this._transparent.setColorPaletteTexture(this._colorPaletteTexture);
54739
54665
  this._modelOpaque.setColorPaletteTexture(this._colorPaletteTexture);
54740
54666
  this._modelTransparent.setColorPaletteTexture(this._colorPaletteTexture);
54741
54667
  this._onUpdate.dispatch();
@@ -54746,8 +54672,6 @@ const _Materials = class _Materials {
54746
54672
  this._colorPaletteTexture.dispose();
54747
54673
  this._colorPaletteTexture = void 0;
54748
54674
  }
54749
- this._opaque.dispose();
54750
- this._transparent.dispose();
54751
54675
  this._modelOpaque.dispose();
54752
54676
  this._modelTransparent.dispose();
54753
54677
  this._ghost.dispose();
@@ -55481,19 +55405,10 @@ function getDefaultViewerSettings() {
55481
55405
  },
55482
55406
  background: { color: new Color(16777215) },
55483
55407
  materials: {
55484
- useFastMaterials: false,
55485
- standard: {
55486
- color: new Color(13421772)
55487
- },
55488
55408
  ghost: {
55489
55409
  color: new Color(921102),
55490
55410
  opacity: 7 / 255
55491
55411
  },
55492
- section: {
55493
- strokeWidth: 0.01,
55494
- strokeFalloff: 0.75,
55495
- strokeColor: new Color(16185078)
55496
- },
55497
55412
  outline: {
55498
55413
  opacity: 0.85,
55499
55414
  color: new Color(65535),