@onerjs/core 8.50.9 → 8.51.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.
- package/Cameras/Inputs/freeCameraTouchInput.js +5 -3
- package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraVirtualJoystickInput.js +11 -7
- package/Cameras/Inputs/freeCameraVirtualJoystickInput.js.map +1 -1
- package/Cameras/arcRotateCamera.js +2 -1
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Cameras/camera.js +1 -0
- package/Cameras/camera.js.map +1 -1
- package/Cameras/followCamera.js +1 -1
- package/Cameras/followCamera.js.map +1 -1
- package/Compute/computeEffect.js +2 -2
- package/Compute/computeEffect.js.map +1 -1
- package/Culling/ray.core.js +46 -2
- package/Culling/ray.core.js.map +1 -1
- package/Debug/debugLayer.js +1 -1
- package/Debug/debugLayer.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraph.js +11 -3
- package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
- package/Layers/layer.js +5 -1
- package/Layers/layer.js.map +1 -1
- package/LensFlares/lensFlareSystem.js +1 -0
- package/LensFlares/lensFlareSystem.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.js +19 -1
- package/Lights/Clustered/clusteredLightContainer.js.map +1 -1
- package/Lights/light.d.ts +5 -0
- package/Lights/light.js +18 -2
- package/Lights/light.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.d.ts +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js +6 -3
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +2 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +10 -3
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.d.ts +2 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js +10 -4
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js.map +1 -1
- package/Materials/Node/nodeMaterial.js +10 -2
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.d.ts +31 -0
- package/Materials/PBR/openpbrMaterial.js +50 -2
- package/Materials/PBR/openpbrMaterial.js.map +1 -1
- package/Materials/Textures/envCubeTexture.js +33 -15
- package/Materials/Textures/envCubeTexture.js.map +1 -1
- package/Materials/effect.functions.js +4 -4
- package/Materials/effect.functions.js.map +1 -1
- package/Materials/standardMaterial.js +4 -2
- package/Materials/standardMaterial.js.map +1 -1
- package/Meshes/Node/Blocks/bevelBlock.d.ts +52 -0
- package/Meshes/Node/Blocks/bevelBlock.js +1327 -0
- package/Meshes/Node/Blocks/bevelBlock.js.map +1 -0
- package/Meshes/Node/index.d.ts +1 -0
- package/Meshes/Node/index.js +1 -0
- package/Meshes/Node/index.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +10 -2
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/abstractMesh.js +1 -0
- package/Meshes/abstractMesh.js.map +1 -1
- package/Misc/snapshotRenderingHelper.d.ts +22 -1
- package/Misc/snapshotRenderingHelper.js +101 -0
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Misc/tools.js +1 -1
- package/Misc/tools.js.map +1 -1
- package/Particles/Node/Blocks/Update/updateFlowMapBlock.js +17 -10
- package/Particles/Node/Blocks/Update/updateFlowMapBlock.js.map +1 -1
- package/Particles/Node/Blocks/Update/updateNoiseBlock.js +14 -0
- package/Particles/Node/Blocks/Update/updateNoiseBlock.js.map +1 -1
- package/Particles/Node/Blocks/particleSourceTextureBlock.js +114 -12
- package/Particles/Node/Blocks/particleSourceTextureBlock.js.map +1 -1
- package/Particles/Node/nodeParticleBuildState.d.ts +11 -0
- package/Particles/Node/nodeParticleBuildState.js +15 -0
- package/Particles/Node/nodeParticleBuildState.js.map +1 -1
- package/Particles/Node/nodeParticleSystemSet.js +33 -24
- package/Particles/Node/nodeParticleSystemSet.js.map +1 -1
- package/Particles/gpuParticleSystem.js +1 -0
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +13 -0
- package/Particles/thinParticleSystem.js +42 -6
- package/Particles/thinParticleSystem.js.map +1 -1
- package/PostProcesses/postProcessManager.d.ts +2 -0
- package/PostProcesses/postProcessManager.js +14 -8
- package/PostProcesses/postProcessManager.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +12 -9
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
- package/Rendering/iblCdfGeneratorSceneComponent.d.ts +6 -0
- package/Rendering/iblCdfGeneratorSceneComponent.js +16 -0
- package/Rendering/iblCdfGeneratorSceneComponent.js.map +1 -1
- package/Rendering/prePassRenderer.d.ts +4 -1
- package/Rendering/prePassRenderer.js +31 -9
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js +20 -7
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrDirectLighting.js +2 -2
- package/Shaders/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +8 -2
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrFragmentDeclaration.js +4 -1
- package/Shaders/ShadersInclude/openpbrFragmentDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrNormalMapFragment.js +2 -0
- package/Shaders/ShadersInclude/openpbrNormalMapFragment.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrVolumeFunctions.js +1 -1
- package/Shaders/ShadersInclude/openpbrVolumeFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBRDFFunctions.js +2 -1
- package/Shaders/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
- package/Shaders/openpbr.fragment.js +1 -1
- package/Shaders/openpbr.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js +20 -7
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js +2 -2
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +9 -3
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragment.js +2 -0
- package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragmentMainFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragmentMainFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrVolumeFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrVolumeFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js +5 -4
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/shadowsVertex.js +4 -0
- package/ShadersWGSL/ShadersInclude/shadowsVertex.js.map +1 -1
- package/ShadersWGSL/openpbr.fragment.js +1 -1
- package/ShadersWGSL/openpbr.fragment.js.map +1 -1
- package/Sprites/spriteManager.js +1 -0
- package/Sprites/spriteManager.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +16 -0
- package/scene.js +13 -0
- package/scene.js.map +1 -1
|
@@ -115,6 +115,19 @@ export declare class ThinParticleSystem extends BaseParticleSystem implements ID
|
|
|
115
115
|
private _alive;
|
|
116
116
|
private _useInstancing;
|
|
117
117
|
private _vertexArrayObject;
|
|
118
|
+
private _useFixedCapacityForSnapshot;
|
|
119
|
+
private _fixedCapacityHighWaterMark;
|
|
120
|
+
/**
|
|
121
|
+
* Gets or sets a boolean indicating that the particle system should always render at full capacity.
|
|
122
|
+
* When enabled, the draw call always emits `getCapacity()` quads/instances and inactive slots are zero-filled in the
|
|
123
|
+
* vertex buffer (collapsing them to degenerate triangles that produce no fragments).
|
|
124
|
+
* This makes the particle system compatible with FAST snapshot rendering, where the recorded draw call parameters
|
|
125
|
+
* are baked into the GPU bundle. Activate via `SnapshotRenderingHelper.fixParticleSystem(ps)`.
|
|
126
|
+
* Note: vertex shader cost scales with capacity rather than the live particle count, so size capacity realistically.
|
|
127
|
+
* This property is runtime-only and is not persisted by `serialize()` / `Parse()`.
|
|
128
|
+
*/
|
|
129
|
+
get useFixedCapacityForSnapshot(): boolean;
|
|
130
|
+
set useFixedCapacityForSnapshot(value: boolean);
|
|
118
131
|
/**
|
|
119
132
|
* Gets a boolean indicating that the particle system was disposed
|
|
120
133
|
*/
|
|
@@ -72,6 +72,21 @@ export class ThinParticleSystem extends BaseParticleSystem {
|
|
|
72
72
|
}
|
|
73
73
|
this._onDisposeObserver = this.onDisposeObservable.add(callback);
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Gets or sets a boolean indicating that the particle system should always render at full capacity.
|
|
77
|
+
* When enabled, the draw call always emits `getCapacity()` quads/instances and inactive slots are zero-filled in the
|
|
78
|
+
* vertex buffer (collapsing them to degenerate triangles that produce no fragments).
|
|
79
|
+
* This makes the particle system compatible with FAST snapshot rendering, where the recorded draw call parameters
|
|
80
|
+
* are baked into the GPU bundle. Activate via `SnapshotRenderingHelper.fixParticleSystem(ps)`.
|
|
81
|
+
* Note: vertex shader cost scales with capacity rather than the live particle count, so size capacity realistically.
|
|
82
|
+
* This property is runtime-only and is not persisted by `serialize()` / `Parse()`.
|
|
83
|
+
*/
|
|
84
|
+
get useFixedCapacityForSnapshot() {
|
|
85
|
+
return this._useFixedCapacityForSnapshot;
|
|
86
|
+
}
|
|
87
|
+
set useFixedCapacityForSnapshot(value) {
|
|
88
|
+
this._useFixedCapacityForSnapshot = value;
|
|
89
|
+
}
|
|
75
90
|
/**
|
|
76
91
|
* Gets a boolean indicating that the particle system was disposed
|
|
77
92
|
*/
|
|
@@ -331,6 +346,8 @@ export class ThinParticleSystem extends BaseParticleSystem {
|
|
|
331
346
|
this._scaledGravity = Vector3.Zero();
|
|
332
347
|
this._currentRenderId = -1;
|
|
333
348
|
this._useInstancing = false;
|
|
349
|
+
this._useFixedCapacityForSnapshot = false;
|
|
350
|
+
this._fixedCapacityHighWaterMark = 0;
|
|
334
351
|
this._started = false;
|
|
335
352
|
this._stopped = false;
|
|
336
353
|
/** @internal */
|
|
@@ -400,6 +417,7 @@ export class ThinParticleSystem extends BaseParticleSystem {
|
|
|
400
417
|
this._scene = sceneOrEngine || EngineStore.LastCreatedScene;
|
|
401
418
|
this._engine = this._scene.getEngine();
|
|
402
419
|
this.uniqueId = this._scene.getUniqueId();
|
|
420
|
+
this.layerMask = this._scene.defaultRenderableLayerMask;
|
|
403
421
|
this._scene.addParticleSystem(this);
|
|
404
422
|
}
|
|
405
423
|
else {
|
|
@@ -1610,7 +1628,25 @@ export class ThinParticleSystem extends BaseParticleSystem {
|
|
|
1610
1628
|
offset += this._useInstancing ? 1 : 4;
|
|
1611
1629
|
}
|
|
1612
1630
|
if (this._vertexBuffer) {
|
|
1613
|
-
|
|
1631
|
+
if (this._useFixedCapacityForSnapshot) {
|
|
1632
|
+
// The vertex buffer is uploaded at full capacity so the FAST-snapshot bundle's draw call stays valid.
|
|
1633
|
+
// 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
|
+
const stride = this._vertexBufferSize * (this._useInstancing ? 1 : 4);
|
|
1638
|
+
const currentCount = this._particles.length;
|
|
1639
|
+
if (currentCount < this._fixedCapacityHighWaterMark) {
|
|
1640
|
+
this._vertexData.fill(0, currentCount * stride, this._fixedCapacityHighWaterMark * stride);
|
|
1641
|
+
}
|
|
1642
|
+
if (currentCount > this._fixedCapacityHighWaterMark) {
|
|
1643
|
+
this._fixedCapacityHighWaterMark = currentCount;
|
|
1644
|
+
}
|
|
1645
|
+
this._vertexBuffer.updateDirectly(this._vertexData, 0, this._capacity);
|
|
1646
|
+
}
|
|
1647
|
+
else {
|
|
1648
|
+
this._vertexBuffer.updateDirectly(this._vertexData, 0, this._particles.length);
|
|
1649
|
+
}
|
|
1614
1650
|
}
|
|
1615
1651
|
}
|
|
1616
1652
|
if (this.manualEmitCount === 0 && this.disposeOnStop) {
|
|
@@ -1767,18 +1803,18 @@ export class ThinParticleSystem extends BaseParticleSystem {
|
|
|
1767
1803
|
}
|
|
1768
1804
|
if (this._useInstancing) {
|
|
1769
1805
|
if (this._scene?.forceWireframe) {
|
|
1770
|
-
engine.drawElementsType(6, 0, 10, this._particles.length);
|
|
1806
|
+
engine.drawElementsType(6, 0, 10, this._useFixedCapacityForSnapshot ? this._capacity : this._particles.length);
|
|
1771
1807
|
}
|
|
1772
1808
|
else {
|
|
1773
|
-
engine.drawArraysType(7, 0, 4, this._particles.length);
|
|
1809
|
+
engine.drawArraysType(7, 0, 4, this._useFixedCapacityForSnapshot ? this._capacity : this._particles.length);
|
|
1774
1810
|
}
|
|
1775
1811
|
}
|
|
1776
1812
|
else {
|
|
1777
1813
|
if (this._scene?.forceWireframe) {
|
|
1778
|
-
engine.drawElementsType(1, 0, this._particles.length * 10);
|
|
1814
|
+
engine.drawElementsType(1, 0, (this._useFixedCapacityForSnapshot ? this._capacity : this._particles.length) * 10);
|
|
1779
1815
|
}
|
|
1780
1816
|
else {
|
|
1781
|
-
engine.drawElementsType(0, 0, this._particles.length * 6);
|
|
1817
|
+
engine.drawElementsType(0, 0, (this._useFixedCapacityForSnapshot ? this._capacity : this._particles.length) * 6);
|
|
1782
1818
|
}
|
|
1783
1819
|
}
|
|
1784
1820
|
return this._particles.length;
|
|
@@ -1789,7 +1825,7 @@ export class ThinParticleSystem extends BaseParticleSystem {
|
|
|
1789
1825
|
*/
|
|
1790
1826
|
render() {
|
|
1791
1827
|
// Check
|
|
1792
|
-
if (!this.isReady() || !this._particles.length) {
|
|
1828
|
+
if (!this.isReady() || (!this._particles.length && !this._useFixedCapacityForSnapshot)) {
|
|
1793
1829
|
return 0;
|
|
1794
1830
|
}
|
|
1795
1831
|
const engine = this._engine;
|