@onerjs/core 8.54.4 → 8.54.5

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 (177) hide show
  1. package/Engines/WebGPU/Extensions/engine.cubeTexture.pure.js +1 -1
  2. package/Engines/WebGPU/Extensions/engine.cubeTexture.pure.js.map +1 -1
  3. package/Engines/WebGPU/Extensions/engine.rawTexture.pure.js +2 -2
  4. package/Engines/WebGPU/Extensions/engine.rawTexture.pure.js.map +1 -1
  5. package/Engines/WebGPU/webgpuCacheRenderPipeline.d.ts +1 -0
  6. package/Engines/WebGPU/webgpuCacheRenderPipeline.js +18 -4
  7. package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
  8. package/Engines/WebGPU/webgpuCacheTextureView.d.ts +13 -0
  9. package/Engines/WebGPU/webgpuCacheTextureView.js +32 -0
  10. package/Engines/WebGPU/webgpuCacheTextureView.js.map +1 -0
  11. package/Engines/WebGPU/webgpuRenderTargetWrapper.d.ts +10 -0
  12. package/Engines/WebGPU/webgpuRenderTargetWrapper.js +10 -0
  13. package/Engines/WebGPU/webgpuRenderTargetWrapper.js.map +1 -1
  14. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.pure.js +57 -4
  15. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.pure.js.map +1 -1
  16. package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -1
  17. package/Engines/WebGPU/webgpuTextureManager.js +4 -2
  18. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  19. package/Engines/abstractEngine.pure.js +2 -2
  20. package/Engines/abstractEngine.pure.js.map +1 -1
  21. package/Engines/thinNativeEngine.pure.d.ts +5 -0
  22. package/Engines/thinNativeEngine.pure.js +29 -6
  23. package/Engines/thinNativeEngine.pure.js.map +1 -1
  24. package/Engines/webgpuEngine.pure.d.ts +1 -0
  25. package/Engines/webgpuEngine.pure.js +21 -8
  26. package/Engines/webgpuEngine.pure.js.map +1 -1
  27. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.d.ts +95 -1
  28. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js +169 -4
  29. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js.map +1 -1
  30. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.pure.d.ts +21 -6
  31. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.pure.js +28 -26
  32. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.pure.js.map +1 -1
  33. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.pure.d.ts +30 -2
  34. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.pure.js +111 -29
  35. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.pure.js.map +1 -1
  36. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.pure.d.ts +56 -2
  37. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.pure.js +99 -14
  38. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.pure.js.map +1 -1
  39. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js +10 -2
  40. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js.map +1 -1
  41. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js +21 -1
  42. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js.map +1 -1
  43. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.d.ts +18 -0
  44. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +29 -2
  45. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
  46. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.d.ts +15 -0
  47. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js +44 -7
  48. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js.map +1 -1
  49. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.d.ts +9 -0
  50. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js +9 -1
  51. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js.map +1 -1
  52. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +7 -0
  53. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +8 -1
  54. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
  55. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.d.ts +5 -0
  56. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.js +8 -0
  57. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.js.map +1 -0
  58. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.pure.d.ts +37 -0
  59. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.pure.js +44 -0
  60. package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.pure.js.map +1 -0
  61. package/FlowGraph/Blocks/Event/index.d.ts +1 -0
  62. package/FlowGraph/Blocks/Event/index.js +1 -0
  63. package/FlowGraph/Blocks/Event/index.js.map +1 -1
  64. package/FlowGraph/Blocks/Event/pure.d.ts +1 -0
  65. package/FlowGraph/Blocks/Event/pure.js +1 -0
  66. package/FlowGraph/Blocks/Event/pure.js.map +1 -1
  67. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.pure.d.ts +4 -1
  68. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.pure.js +67 -2
  69. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.pure.js.map +1 -1
  70. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +13 -0
  71. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +102 -7
  72. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
  73. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js +5 -1
  74. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js.map +1 -1
  75. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js +5 -1
  76. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js.map +1 -1
  77. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.d.ts +11 -2
  78. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js +21 -3
  79. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js.map +1 -1
  80. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.pure.js +25 -4
  81. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.pure.js.map +1 -1
  82. package/FlowGraph/Blocks/flowGraphBlockFactory.js +18 -0
  83. package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
  84. package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +9 -0
  85. package/FlowGraph/Blocks/flowGraphBlockNames.js +9 -0
  86. package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
  87. package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +17 -3
  88. package/FlowGraph/CustomTypes/flowGraphMatrix.js +27 -21
  89. package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
  90. package/FlowGraph/flowGraphContext.d.ts +23 -0
  91. package/FlowGraph/flowGraphContext.js +29 -0
  92. package/FlowGraph/flowGraphContext.js.map +1 -1
  93. package/FlowGraph/flowGraphCoordinator.d.ts +58 -1
  94. package/FlowGraph/flowGraphCoordinator.js +72 -0
  95. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  96. package/FlowGraph/flowGraphDelayRegistry.d.ts +31 -0
  97. package/FlowGraph/flowGraphDelayRegistry.js +50 -0
  98. package/FlowGraph/flowGraphDelayRegistry.js.map +1 -0
  99. package/FlowGraph/flowGraphHostResolver.d.ts +69 -0
  100. package/FlowGraph/flowGraphHostResolver.js +25 -0
  101. package/FlowGraph/flowGraphHostResolver.js.map +1 -0
  102. package/FlowGraph/flowGraphMath.d.ts +48 -1
  103. package/FlowGraph/flowGraphMath.js +169 -4
  104. package/FlowGraph/flowGraphMath.js.map +1 -1
  105. package/FlowGraph/flowGraphPathConverterComponent.d.ts +14 -3
  106. package/FlowGraph/flowGraphPathConverterComponent.js +110 -18
  107. package/FlowGraph/flowGraphPathConverterComponent.js.map +1 -1
  108. package/FlowGraph/flowGraphSignalConnection.pure.js +7 -1
  109. package/FlowGraph/flowGraphSignalConnection.pure.js.map +1 -1
  110. package/FlowGraph/index.d.ts +2 -0
  111. package/FlowGraph/index.js +2 -0
  112. package/FlowGraph/index.js.map +1 -1
  113. package/FlowGraph/pure.d.ts +2 -0
  114. package/FlowGraph/pure.js +2 -0
  115. package/FlowGraph/pure.js.map +1 -1
  116. package/Maths/math.vector.pure.d.ts +10 -0
  117. package/Maths/math.vector.pure.js +13 -0
  118. package/Maths/math.vector.pure.js.map +1 -1
  119. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +216 -1
  120. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +714 -67
  121. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
  122. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +81 -4
  123. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +466 -52
  124. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
  125. package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.d.ts +19 -0
  126. package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js +24 -0
  127. package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js.map +1 -1
  128. package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js +31 -6
  129. package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js.map +1 -1
  130. package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +5 -1
  131. package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js.map +1 -1
  132. package/Misc/greasedLineTools.js +1 -1
  133. package/Misc/greasedLineTools.js.map +1 -1
  134. package/Misc/tools.pure.js +14 -2
  135. package/Misc/tools.pure.js.map +1 -1
  136. package/Particles/gpuParticleSystem.pure.d.ts +66 -1
  137. package/Particles/gpuParticleSystem.pure.js +189 -49
  138. package/Particles/gpuParticleSystem.pure.js.map +1 -1
  139. package/Physics/v2/characterController.js +69 -17
  140. package/Physics/v2/characterController.js.map +1 -1
  141. package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +3 -9
  142. package/XR/features/Layers/WebXRWebGPUCompositionLayer.js +4 -11
  143. package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -1
  144. package/XR/features/WebXRAbstractFeature.d.ts +9 -0
  145. package/XR/features/WebXRAbstractFeature.js +16 -0
  146. package/XR/features/WebXRAbstractFeature.js.map +1 -1
  147. package/XR/features/WebXRDepthSensing.pure.d.ts +7 -0
  148. package/XR/features/WebXRDepthSensing.pure.js +350 -39
  149. package/XR/features/WebXRDepthSensing.pure.js.map +1 -1
  150. package/XR/features/WebXRImageTracking.pure.js.map +1 -1
  151. package/XR/features/WebXRLayers.pure.d.ts +6 -5
  152. package/XR/features/WebXRLayers.pure.js +65 -8
  153. package/XR/features/WebXRLayers.pure.js.map +1 -1
  154. package/XR/features/WebXRRawCameraAccess.pure.js +9 -2
  155. package/XR/features/WebXRRawCameraAccess.pure.js.map +1 -1
  156. package/XR/features/WebXRSpaceWarp.pure.d.ts +0 -1
  157. package/XR/features/WebXRSpaceWarp.pure.js +13 -4
  158. package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
  159. package/XR/features/WebXRWalkingLocomotion.pure.js.map +1 -1
  160. package/XR/webXRCamera.js +27 -0
  161. package/XR/webXRCamera.js.map +1 -1
  162. package/XR/webXRFeatureWarningRegistry.d.ts +14 -0
  163. package/XR/webXRFeatureWarningRegistry.js +19 -0
  164. package/XR/webXRFeatureWarningRegistry.js.map +1 -0
  165. package/XR/webXRFeaturesManager.d.ts +5 -0
  166. package/XR/webXRFeaturesManager.js +23 -4
  167. package/XR/webXRFeaturesManager.js.map +1 -1
  168. package/XR/webXRGraphicsBinding.d.ts +17 -10
  169. package/XR/webXRGraphicsBinding.js +8 -5
  170. package/XR/webXRGraphicsBinding.js.map +1 -1
  171. package/XR/webXRSessionManager.d.ts +3 -5
  172. package/XR/webXRSessionManager.js +1 -3
  173. package/XR/webXRSessionManager.js.map +1 -1
  174. package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +21 -5
  175. package/XR/webXRWebGPURenderTargetTextureProvider.js +38 -10
  176. package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -1
  177. package/package.json +1 -1
@@ -86,6 +86,11 @@ export declare class ThinNativeEngine extends ThinEngine {
86
86
  * @internal
87
87
  */
88
88
  protected _initializeNativeEngine(adaptToDeviceRatio: boolean): void;
89
+ /**
90
+ * Brackets a scene's render with a command scope, so the commands it encodes are submitted together.
91
+ * @param scene the scene whose render should be wrapped
92
+ */
93
+ private _wrapSceneRenderWithCommandScope;
89
94
  setHardwareScalingLevel(level: number): void;
90
95
  dispose(): void;
91
96
  /**
@@ -324,14 +324,37 @@ export class ThinNativeEngine extends ThinEngine {
324
324
  // Shader processor
325
325
  this._shaderProcessor = new NativeShaderProcessor();
326
326
  this.onNewSceneAddedObservable.add((scene) => {
327
- const originalRender = scene.render;
328
- scene.render = (...args) => {
329
- this._commandBufferEncoder.beginCommandScope();
330
- originalRender.apply(scene, args);
331
- this._commandBufferEncoder.endCommandScope();
332
- };
327
+ this._wrapSceneRenderWithCommandScope(scene);
333
328
  });
334
329
  }
330
+ /**
331
+ * Brackets a scene's render with a command scope, so the commands it encodes are submitted together.
332
+ * @param scene the scene whose render should be wrapped
333
+ */
334
+ _wrapSceneRenderWithCommandScope(scene) {
335
+ const originalRender = scene.render;
336
+ scene.render = (...args) => {
337
+ this._commandBufferEncoder.beginCommandScope();
338
+ try {
339
+ originalRender.apply(scene, args);
340
+ }
341
+ catch (renderException) {
342
+ // The scope must be closed even when the render throws. Otherwise it stays
343
+ // open forever and every later frame fails with "Command scope already
344
+ // active.", so one recoverable error permanently breaks the engine instead
345
+ // of affecting just this frame.
346
+ try {
347
+ this._commandBufferEncoder.endCommandScope();
348
+ }
349
+ catch (endException) {
350
+ // Never let this replace the root cause; report it separately instead.
351
+ Logger.Error(`Failed to end the command scope while unwinding a render error: ${endException}`);
352
+ }
353
+ throw renderException;
354
+ }
355
+ this._commandBufferEncoder.endCommandScope();
356
+ };
357
+ }
335
358
  setHardwareScalingLevel(level) {
336
359
  super.setHardwareScalingLevel(level);
337
360
  this._engine.setHardwareScalingLevel(level);