@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.
- package/Animations/animationGroup.d.ts +2 -1
- package/Animations/animationGroup.js +3 -2
- package/Animations/animationGroup.js.map +1 -1
- package/Engines/WebGPU/webgpuSnapshotRendering.js +7 -3
- package/Engines/WebGPU/webgpuSnapshotRendering.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Events/deviceInputEvents.d.ts +5 -0
- package/Events/deviceInputEvents.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.d.ts +65 -0
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js +74 -0
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/index.d.ts +1 -0
- package/FlowGraph/Blocks/Data/index.js +1 -0
- package/FlowGraph/Blocks/Data/index.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.d.ts +39 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js +42 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.d.ts +19 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js +25 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyboardEventBlock.d.ts +64 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyboardEventBlock.js +50 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyboardEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerDownEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerMoveEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerUpEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/index.d.ts +3 -0
- package/FlowGraph/Blocks/Event/index.js +3 -0
- package/FlowGraph/Blocks/Event/index.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +7 -0
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +3 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js +3 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +6 -0
- package/FlowGraph/flowGraph.js +10 -1
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +8 -0
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphCoordinator.d.ts +1 -1
- package/FlowGraph/flowGraphCoordinator.js.map +1 -1
- package/FlowGraph/flowGraphEventType.d.ts +2 -0
- package/FlowGraph/flowGraphEventType.js +2 -0
- package/FlowGraph/flowGraphEventType.js.map +1 -1
- package/FlowGraph/flowGraphParser.d.ts +15 -0
- package/FlowGraph/flowGraphParser.js +101 -14
- package/FlowGraph/flowGraphParser.js.map +1 -1
- package/FlowGraph/flowGraphSceneEventCoordinator.d.ts +14 -0
- package/FlowGraph/flowGraphSceneEventCoordinator.js +56 -0
- package/FlowGraph/flowGraphSceneEventCoordinator.js.map +1 -1
- package/FlowGraph/serialization.js +16 -18
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/utils.d.ts +7 -0
- package/FlowGraph/utils.js +8 -0
- package/FlowGraph/utils.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.js +1 -1
- package/Lights/Clustered/clusteredLightContainer.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +1 -0
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +6 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.d.ts +2 -0
- package/Materials/Node/Blocks/Dual/imageSourceBlock.js +14 -0
- package/Materials/Node/Blocks/Dual/imageSourceBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.d.ts +2 -0
- package/Materials/Node/Blocks/Dual/textureBlock.js +19 -4
- package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +11 -6
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.js +9 -0
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.js +1 -0
- package/Materials/PBR/openpbrMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +1 -0
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +2 -1
- package/Materials/materialHelper.functions.js +8 -3
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/standardMaterial.js +1 -0
- package/Materials/standardMaterial.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.js +30 -8
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.js.map +1 -1
- package/Misc/snapshotRenderingHelper.d.ts +4 -2
- package/Misc/snapshotRenderingHelper.js +33 -22
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Misc/tools.js +1 -1
- package/Misc/tools.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +6 -1
- package/Particles/thinParticleSystem.js +23 -6
- package/Particles/thinParticleSystem.js.map +1 -1
- 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
|
-
|
|
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
|