@pacem/pacem-3d 1.0.0-dirac → 1.0.0-fermat

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @pacem/pacem-3d v1.0.0-dirac (https://js.pacem.it)
2
+ * @pacem/pacem-3d v1.0.0-fermat (https://js.pacem.it)
3
3
  * Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -6498,7 +6498,7 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
6498
6498
  this.draw = (pass, ...buffers) => {
6499
6499
  throw new Error('Deprecated.');
6500
6500
  };
6501
- this.frame = (pass, meshBuffer, cameraBuffer) => {
6501
+ this.frame = (pass, /* unused yet */ interactionBuffer, meshBuffer, cameraBuffer) => {
6502
6502
  // set
6503
6503
  pass.setPipeline(this._linePipeline);
6504
6504
  try {
@@ -6514,7 +6514,7 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
6514
6514
  console.error('Pacem.Drawing3D.FrameException', e);
6515
6515
  }
6516
6516
  };
6517
- this.raycast = (pass, meshBuffer, cameraBuffer) => {
6517
+ this.raycast = (pass, /* unused yet */ interactionBuffer, meshBuffer, cameraBuffer) => {
6518
6518
  // set
6519
6519
  pass.setPipeline(this._pickLinePipeline);
6520
6520
  try {
@@ -6572,7 +6572,15 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
6572
6572
  buffer: {
6573
6573
  type: 'uniform'
6574
6574
  }
6575
- }
6575
+ },
6576
+ // interaction
6577
+ /*{
6578
+ binding: UNIFORM_BINDING_INDEX_INTERACTION,
6579
+ visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT,
6580
+ buffer: {
6581
+ type: 'uniform'
6582
+ }
6583
+ }*/
6576
6584
  ], label: labelPrefix + 'line-view-bind-group-layout'
6577
6585
  });
6578
6586
  const lineEntries = [
@@ -6599,7 +6607,7 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
6599
6607
  const lineBindGroupLayout = device.createBindGroupLayout({
6600
6608
  entries: lineEntries, label: labelPrefix + 'line-positions-bind-group-layout'
6601
6609
  });
6602
- const vertexBindGroupLayouts = [worldBindGroupLayout, viewBindGroupLayout, lineBindGroupLayout];
6610
+ const vertexBindGroupLayouts = [viewBindGroupLayout, worldBindGroupLayout, lineBindGroupLayout];
6603
6611
  const raycastLayoutIndex = vertexBindGroupLayouts.length;
6604
6612
  const bindGroupLayouts = vertexBindGroupLayouts.slice();
6605
6613
  // #endregion
@@ -7825,6 +7833,7 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
7825
7833
  this._progress.x = this._progress.y = 0;
7826
7834
  }
7827
7835
  pacemCore.avoidHandler(evt);
7836
+ window.clearTimeout(this.#handle);
7828
7837
  window.addEventListener('pointerup', this._endHandler, false);
7829
7838
  window.addEventListener('pointermove', this._moveHandler, false);
7830
7839
  window.addEventListener('contextmenu', this._avoidHandler, false);
@@ -7833,7 +7842,7 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
7833
7842
  this._endHandler = (evt) => {
7834
7843
  pacemCore.avoidHandler(evt);
7835
7844
  // delay the listener removals a bit (~frame)
7836
- window.setTimeout(() => {
7845
+ this.#handle = window.setTimeout(() => {
7837
7846
  window.removeEventListener('pointerup', this._endHandler);
7838
7847
  window.removeEventListener('pointermove', this._moveHandler);
7839
7848
  window.removeEventListener('contextmenu', this._avoidHandler);
@@ -7911,6 +7920,7 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
7911
7920
  }
7912
7921
  #panning;
7913
7922
  #rotating;
7923
+ #handle;
7914
7924
  _getSafeAzimuth({ theta }) {
7915
7925
  return OrbitCameraBehavior._modAngle(theta);
7916
7926
  }