@onerjs/core 8.51.2 → 8.51.4

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 (95) hide show
  1. package/Animations/animationGroup.d.ts +2 -1
  2. package/Animations/animationGroup.js +3 -2
  3. package/Animations/animationGroup.js.map +1 -1
  4. package/Engines/WebGPU/webgpuSnapshotRendering.js +7 -3
  5. package/Engines/WebGPU/webgpuSnapshotRendering.js.map +1 -1
  6. package/Engines/abstractEngine.js +2 -2
  7. package/Engines/abstractEngine.js.map +1 -1
  8. package/Events/deviceInputEvents.d.ts +5 -0
  9. package/Events/deviceInputEvents.js.map +1 -1
  10. package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.d.ts +65 -0
  11. package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js +74 -0
  12. package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js.map +1 -0
  13. package/FlowGraph/Blocks/Data/index.d.ts +1 -0
  14. package/FlowGraph/Blocks/Data/index.js +1 -0
  15. package/FlowGraph/Blocks/Data/index.js.map +1 -1
  16. package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.d.ts +39 -0
  17. package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js +42 -0
  18. package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js.map +1 -0
  19. package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.d.ts +19 -0
  20. package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js +25 -0
  21. package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js.map +1 -0
  22. package/FlowGraph/Blocks/Event/flowGraphKeyboardEventBlock.d.ts +64 -0
  23. package/FlowGraph/Blocks/Event/flowGraphKeyboardEventBlock.js +50 -0
  24. package/FlowGraph/Blocks/Event/flowGraphKeyboardEventBlock.js.map +1 -0
  25. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
  26. package/FlowGraph/Blocks/Event/flowGraphPointerDownEventBlock.js.map +1 -1
  27. package/FlowGraph/Blocks/Event/flowGraphPointerMoveEventBlock.js.map +1 -1
  28. package/FlowGraph/Blocks/Event/flowGraphPointerUpEventBlock.js.map +1 -1
  29. package/FlowGraph/Blocks/Event/index.d.ts +3 -0
  30. package/FlowGraph/Blocks/Event/index.js +3 -0
  31. package/FlowGraph/Blocks/Event/index.js.map +1 -1
  32. package/FlowGraph/Blocks/flowGraphBlockFactory.js +7 -0
  33. package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
  34. package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +3 -0
  35. package/FlowGraph/Blocks/flowGraphBlockNames.js +3 -0
  36. package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
  37. package/FlowGraph/flowGraph.d.ts +6 -0
  38. package/FlowGraph/flowGraph.js +10 -1
  39. package/FlowGraph/flowGraph.js.map +1 -1
  40. package/FlowGraph/flowGraphContext.d.ts +8 -0
  41. package/FlowGraph/flowGraphContext.js.map +1 -1
  42. package/FlowGraph/flowGraphCoordinator.d.ts +1 -1
  43. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  44. package/FlowGraph/flowGraphEventType.d.ts +2 -0
  45. package/FlowGraph/flowGraphEventType.js +2 -0
  46. package/FlowGraph/flowGraphEventType.js.map +1 -1
  47. package/FlowGraph/flowGraphParser.d.ts +15 -0
  48. package/FlowGraph/flowGraphParser.js +101 -14
  49. package/FlowGraph/flowGraphParser.js.map +1 -1
  50. package/FlowGraph/flowGraphSceneEventCoordinator.d.ts +14 -0
  51. package/FlowGraph/flowGraphSceneEventCoordinator.js +56 -0
  52. package/FlowGraph/flowGraphSceneEventCoordinator.js.map +1 -1
  53. package/FlowGraph/serialization.js +16 -18
  54. package/FlowGraph/serialization.js.map +1 -1
  55. package/FlowGraph/utils.d.ts +7 -0
  56. package/FlowGraph/utils.js +8 -0
  57. package/FlowGraph/utils.js.map +1 -1
  58. package/Lights/Clustered/clusteredLightContainer.js +1 -1
  59. package/Lights/Clustered/clusteredLightContainer.js.map +1 -1
  60. package/Materials/Background/backgroundMaterial.js +1 -0
  61. package/Materials/Background/backgroundMaterial.js.map +1 -1
  62. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +6 -0
  63. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  64. package/Materials/Node/Blocks/Dual/imageSourceBlock.d.ts +2 -0
  65. package/Materials/Node/Blocks/Dual/imageSourceBlock.js +14 -0
  66. package/Materials/Node/Blocks/Dual/imageSourceBlock.js.map +1 -1
  67. package/Materials/Node/Blocks/Dual/lightBlock.js +1 -1
  68. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  69. package/Materials/Node/Blocks/Dual/textureBlock.d.ts +2 -0
  70. package/Materials/Node/Blocks/Dual/textureBlock.js +19 -4
  71. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  72. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +11 -6
  73. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  74. package/Materials/Node/nodeMaterial.js +9 -0
  75. package/Materials/Node/nodeMaterial.js.map +1 -1
  76. package/Materials/PBR/openpbrMaterial.js +1 -0
  77. package/Materials/PBR/openpbrMaterial.js.map +1 -1
  78. package/Materials/PBR/pbrBaseMaterial.js +1 -0
  79. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  80. package/Materials/materialHelper.functions.d.ts +2 -1
  81. package/Materials/materialHelper.functions.js +8 -3
  82. package/Materials/materialHelper.functions.js.map +1 -1
  83. package/Materials/standardMaterial.js +1 -0
  84. package/Materials/standardMaterial.js.map +1 -1
  85. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.js +30 -8
  86. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.js.map +1 -1
  87. package/Misc/snapshotRenderingHelper.d.ts +4 -2
  88. package/Misc/snapshotRenderingHelper.js +33 -22
  89. package/Misc/snapshotRenderingHelper.js.map +1 -1
  90. package/Misc/tools.js +1 -1
  91. package/Misc/tools.js.map +1 -1
  92. package/Particles/thinParticleSystem.d.ts +6 -1
  93. package/Particles/thinParticleSystem.js +23 -6
  94. package/Particles/thinParticleSystem.js.map +1 -1
  95. package/package.json +1 -1
@@ -346,6 +346,7 @@ export class ThinParticleSystem extends BaseParticleSystem {
346
346
  this._scaledGravity = Vector3.Zero();
347
347
  this._currentRenderId = -1;
348
348
  this._useInstancing = false;
349
+ /** @internal */
349
350
  this._useFixedCapacityForSnapshot = false;
350
351
  this._fixedCapacityHighWaterMark = 0;
351
352
  this._started = false;
@@ -1631,17 +1632,12 @@ export class ThinParticleSystem extends BaseParticleSystem {
1631
1632
  if (this._useFixedCapacityForSnapshot) {
1632
1633
  // The vertex buffer is uploaded at full capacity so the FAST-snapshot bundle's draw call stays valid.
1633
1634
  // Inactive slots must be zeroed so they collapse to degenerate (size=0) quads that emit no fragments.
1634
- // Float32Array starts zeroed and `_appendParticleVertices` overwrites only the active range, so we
1635
- // only need to clear slots that were active in a previous frame and aren't anymore — i.e. the range
1636
- // [currentCount, highWaterMark). When the active count grows we just bump the high-water mark.
1637
1635
  const stride = this._vertexBufferSize * (this._useInstancing ? 1 : 4);
1638
1636
  const currentCount = this._particles.length;
1639
1637
  if (currentCount < this._fixedCapacityHighWaterMark) {
1640
1638
  this._vertexData.fill(0, currentCount * stride, this._fixedCapacityHighWaterMark * stride);
1641
1639
  }
1642
- if (currentCount > this._fixedCapacityHighWaterMark) {
1643
- this._fixedCapacityHighWaterMark = currentCount;
1644
- }
1640
+ this._fixedCapacityHighWaterMark = currentCount;
1645
1641
  this._vertexBuffer.updateDirectly(this._vertexData, 0, this._capacity);
1646
1642
  }
1647
1643
  else {
@@ -1653,6 +1649,27 @@ export class ThinParticleSystem extends BaseParticleSystem {
1653
1649
  this.stop();
1654
1650
  }
1655
1651
  }
1652
+ /** @internal */
1653
+ _initFixedCapacitySnapshotData() {
1654
+ if (this._useFixedCapacityForSnapshot) {
1655
+ return false;
1656
+ }
1657
+ this._useFixedCapacityForSnapshot = true;
1658
+ this._vertexData.fill(0);
1659
+ this._fixedCapacityHighWaterMark = 0;
1660
+ this._vertexBuffer?.updateDirectly(this._vertexData, 0, this._capacity);
1661
+ return true;
1662
+ }
1663
+ /** @internal */
1664
+ _clearFixedCapacitySnapshotData() {
1665
+ if (!this._useFixedCapacityForSnapshot || !this._vertexBuffer || this._fixedCapacityHighWaterMark === 0) {
1666
+ return;
1667
+ }
1668
+ const stride = this._vertexBufferSize * (this._useInstancing ? 1 : 4);
1669
+ this._vertexData.fill(0, 0, this._fixedCapacityHighWaterMark * stride);
1670
+ this._fixedCapacityHighWaterMark = 0;
1671
+ this._vertexBuffer.updateDirectly(this._vertexData, 0, this._capacity);
1672
+ }
1656
1673
  /**
1657
1674
  * Internal only. Calculates the current emit rate based on the gradients if any.
1658
1675
  * @returns The emit rate