rhodonite 0.17.5 → 0.17.6
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/VERSION-FILE +1 -1
- package/dist/esm/index.d.ts +30 -33
- package/dist/esm/index.js +182 -182
- package/dist/esmdev/index.d.ts +30 -33
- package/dist/esmdev/index.js +1380 -1113
- package/package.json +5 -5
package/VERSION-FILE
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
v0.17.
|
|
1
|
+
v0.17.6-0-g902035ae9-dirty
|
|
2
2
|
main
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -22157,6 +22157,7 @@ declare class WebGpuResourceRepository extends CGAPIResourceRepository implement
|
|
|
22157
22157
|
private __commandEncoder?;
|
|
22158
22158
|
private __renderBundles;
|
|
22159
22159
|
private __renderBundleEncoder?;
|
|
22160
|
+
private __renderBundleEncoderKey?;
|
|
22160
22161
|
private __systemDepthTexture?;
|
|
22161
22162
|
private __systemDepthTextureView?;
|
|
22162
22163
|
private __uniformMorphOffsetsBuffer?;
|
|
@@ -22177,6 +22178,7 @@ declare class WebGpuResourceRepository extends CGAPIResourceRepository implement
|
|
|
22177
22178
|
private __dstTextureViewsForGeneratingMipmaps;
|
|
22178
22179
|
private __bindGroupsForGeneratingMipmaps;
|
|
22179
22180
|
private static __drawParametersUint32Array;
|
|
22181
|
+
private static __webxrSystem;
|
|
22180
22182
|
private constructor();
|
|
22181
22183
|
/**
|
|
22182
22184
|
* Clears all cached resources including render pipelines, bind groups, and render bundles.
|
|
@@ -22439,7 +22441,7 @@ declare class WebGpuResourceRepository extends CGAPIResourceRepository implement
|
|
|
22439
22441
|
*
|
|
22440
22442
|
* @param renderPass - The render pass containing clear settings and target framebuffer
|
|
22441
22443
|
*/
|
|
22442
|
-
clearFrameBuffer(renderPass: RenderPass): void;
|
|
22444
|
+
clearFrameBuffer(renderPass: RenderPass, displayIdx: number): void;
|
|
22443
22445
|
/**
|
|
22444
22446
|
* Executes a draw call for rendering a primitive with the specified material and render pass.
|
|
22445
22447
|
* This is the core rendering method that sets up the render pipeline, bind groups,
|
|
@@ -22451,14 +22453,15 @@ declare class WebGpuResourceRepository extends CGAPIResourceRepository implement
|
|
|
22451
22453
|
* @param cameraId - Identifier for the camera used for rendering
|
|
22452
22454
|
* @param zWrite - Whether to enable depth writing during rendering
|
|
22453
22455
|
*/
|
|
22454
|
-
draw(primitive: Primitive, material: Material, renderPass: RenderPass, cameraId: number, zWrite: boolean): void;
|
|
22456
|
+
draw(primitive: Primitive, material: Material, renderPass: RenderPass, cameraId: number, zWrite: boolean, displayIdx: number): void;
|
|
22455
22457
|
/**
|
|
22456
22458
|
* Creates a render bundle encoder for efficient rendering.
|
|
22457
22459
|
* Render bundles allow pre-recording of rendering commands for better performance.
|
|
22458
22460
|
*
|
|
22459
22461
|
* @param renderPass - The render pass that will use this render bundle encoder
|
|
22460
22462
|
*/
|
|
22461
|
-
private
|
|
22463
|
+
private __getRenderBundleDescriptor;
|
|
22464
|
+
createRenderBundleEncoder(renderPass: RenderPass, displayIdx: number): void;
|
|
22462
22465
|
/**
|
|
22463
22466
|
* Creates a render pass encoder for immediate rendering commands.
|
|
22464
22467
|
* This encoder is used for recording rendering commands that will be executed immediately.
|
|
@@ -22467,8 +22470,8 @@ declare class WebGpuResourceRepository extends CGAPIResourceRepository implement
|
|
|
22467
22470
|
*/
|
|
22468
22471
|
private createRenderPassEncoder;
|
|
22469
22472
|
private __toClearRenderBundles;
|
|
22470
|
-
|
|
22471
|
-
finishRenderBundleEncoder(renderPass: RenderPass): void;
|
|
22473
|
+
renderWithRenderBundle(renderPass: RenderPass, displayIdx: number): boolean;
|
|
22474
|
+
finishRenderBundleEncoder(renderPass: RenderPass, displayIdx: number): void;
|
|
22472
22475
|
getOrCreateRenderPipeline(renderPipelineId: string, bindGroupId: string, primitive: Primitive, material: Material, renderPass: RenderPass, zWrite: boolean, _diffuseCubeMap?: CubeTexture | RenderTargetTextureCube, _specularCubeMap?: CubeTexture | RenderTargetTextureCube, _sheenCubeMap?: CubeTexture | RenderTargetTextureCube): [GPURenderPipeline, boolean];
|
|
22473
22476
|
/**
|
|
22474
22477
|
* Submits all recorded commands to the GPU queue and resets the command encoder.
|
|
@@ -22876,7 +22879,7 @@ interface ICGAPIResourceRepository {
|
|
|
22876
22879
|
*
|
|
22877
22880
|
* @param renderPass - The render pass containing clear configuration
|
|
22878
22881
|
*/
|
|
22879
|
-
clearFrameBuffer(renderPass: RenderPass): void;
|
|
22882
|
+
clearFrameBuffer(renderPass: RenderPass, displayIdx?: number): void;
|
|
22880
22883
|
/**
|
|
22881
22884
|
* Creates a texture from image bitmap data with specified parameters.
|
|
22882
22885
|
* This method handles various image sources and converts them to GPU textures.
|
|
@@ -24168,7 +24171,7 @@ declare class WebGLResourceRepository extends CGAPIResourceRepository implements
|
|
|
24168
24171
|
createTransformFeedback(): number;
|
|
24169
24172
|
deleteTransformFeedback(transformFeedbackUid: WebGLResourceHandle): void;
|
|
24170
24173
|
setViewport(viewport?: Vector4): void;
|
|
24171
|
-
clearFrameBuffer(renderPass: RenderPass): void;
|
|
24174
|
+
clearFrameBuffer(renderPass: RenderPass, _?: number): void;
|
|
24172
24175
|
deleteVertexDataResources(vertexHandles: VertexHandles): void;
|
|
24173
24176
|
deleteVertexArray(vaoHandle: WebGLResourceHandle): void;
|
|
24174
24177
|
deleteVertexBuffer(vboUid: WebGLResourceHandle): void;
|
|
@@ -25147,15 +25150,16 @@ declare class MeshRendererComponent extends Component {
|
|
|
25147
25150
|
* Common rendering method that executes the actual rendering of primitives.
|
|
25148
25151
|
* Delegates to the appropriate rendering strategy (WebGL or WebGPU).
|
|
25149
25152
|
* @param renderPass - The render pass context
|
|
25150
|
-
* @param processStage - The current process stage
|
|
25151
25153
|
* @param renderPassTickCount - The tick count for this render pass
|
|
25152
25154
|
* @param primitiveUids - Array of primitive UIDs to render
|
|
25155
|
+
* @param displayIdx - The index of the display to render to
|
|
25153
25156
|
* @returns True if rendering was successful, false otherwise
|
|
25154
25157
|
*/
|
|
25155
|
-
static common_$render({ renderPass, renderPassTickCount, primitiveUids, }: {
|
|
25158
|
+
static common_$render({ renderPass, renderPassTickCount, primitiveUids, displayIdx, }: {
|
|
25156
25159
|
renderPass: RenderPass;
|
|
25157
25160
|
renderPassTickCount: Count;
|
|
25158
25161
|
primitiveUids: PrimitiveUID[];
|
|
25162
|
+
displayIdx: Index;
|
|
25159
25163
|
}): boolean;
|
|
25160
25164
|
/**
|
|
25161
25165
|
* Instance-specific render method for this mesh renderer component.
|
|
@@ -34627,10 +34631,6 @@ declare class CameraComponent extends Component {
|
|
|
34627
34631
|
* @returns The bias view-projection matrix adjusted for the current graphics API
|
|
34628
34632
|
*/
|
|
34629
34633
|
get biasViewProjectionMatrix(): MutableMatrix44;
|
|
34630
|
-
/**
|
|
34631
|
-
* Sets only the matrix values to the global data repository.
|
|
34632
|
-
*/
|
|
34633
|
-
setValuesToGlobalDataRepositoryOnlyMatrices(): void;
|
|
34634
34634
|
/**
|
|
34635
34635
|
* Sets camera values (matrices and position) to the global data repository.
|
|
34636
34636
|
*/
|
|
@@ -42360,6 +42360,8 @@ declare class WebXRSystem {
|
|
|
42360
42360
|
private __multiviewFramebufferHandle;
|
|
42361
42361
|
private __multiviewColorTextureHandle;
|
|
42362
42362
|
private __webglStereoUtil?;
|
|
42363
|
+
private __xrGpuBinding?;
|
|
42364
|
+
private __xrProjectionLayerWebGPU?;
|
|
42363
42365
|
/**
|
|
42364
42366
|
* Private constructor for singleton pattern.
|
|
42365
42367
|
* Initializes the viewer entity and left/right camera entities for stereo rendering.
|
|
@@ -42567,13 +42569,6 @@ declare class WebXRSystem {
|
|
|
42567
42569
|
* @returns The viewport vector (x, y, width, height) for the right eye.
|
|
42568
42570
|
*/
|
|
42569
42571
|
_getRightViewport(): Vector4;
|
|
42570
|
-
/**
|
|
42571
|
-
* Updates camera projection matrices and pushes values to the global data repository.
|
|
42572
|
-
* Called during the rendering pipeline to ensure cameras have current XR projection data.
|
|
42573
|
-
*
|
|
42574
|
-
* @internal
|
|
42575
|
-
*/
|
|
42576
|
-
_setValuesToGlobalDataRepository(): void;
|
|
42577
42572
|
/**
|
|
42578
42573
|
* Gets the world position of the specified VR camera.
|
|
42579
42574
|
* Combines XR pose data with user position offset and viewer transformations.
|
|
@@ -42649,6 +42644,7 @@ declare class WebXRSystem {
|
|
|
42649
42644
|
* @param callbackOnXrSessionStart - Callback to execute when setup is complete.
|
|
42650
42645
|
*/
|
|
42651
42646
|
private __setupWebGLLayer;
|
|
42647
|
+
private __setupWebGPULayer;
|
|
42652
42648
|
/**
|
|
42653
42649
|
* Updates the viewer pose from the current XR frame.
|
|
42654
42650
|
* Retrieves the current viewer pose and updates camera transformations.
|
|
@@ -42710,9 +42706,10 @@ interface CGAPIStrategy {
|
|
|
42710
42706
|
* @param primitiveUids - Array of unique identifiers for the primitives to be rendered
|
|
42711
42707
|
* @param renderPass - The render pass context containing rendering configuration
|
|
42712
42708
|
* @param renderPassTickCount - The current tick count for the render pass, used for timing and animation
|
|
42709
|
+
* @param displayIdx - The index of the display to render to
|
|
42713
42710
|
* @returns True if the rendering operation was successful, false otherwise
|
|
42714
42711
|
*/
|
|
42715
|
-
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count): boolean;
|
|
42712
|
+
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count, displayIdx: Index): boolean;
|
|
42716
42713
|
}
|
|
42717
42714
|
|
|
42718
42715
|
/**
|
|
@@ -43041,6 +43038,7 @@ declare class WebGLStrategyDataTexture implements CGAPIStrategy, WebGLStrategy {
|
|
|
43041
43038
|
* @param primitiveUids - Array of primitive UIDs to render
|
|
43042
43039
|
* @param renderPass - The render pass configuration
|
|
43043
43040
|
* @param renderPassTickCount - Current tick count for the render pass
|
|
43041
|
+
* @param displayIdx - The index of the display to render to
|
|
43044
43042
|
* @returns true if any primitives were successfully rendered, false otherwise
|
|
43045
43043
|
*
|
|
43046
43044
|
* @remarks
|
|
@@ -43053,7 +43051,7 @@ declare class WebGLStrategyDataTexture implements CGAPIStrategy, WebGLStrategy {
|
|
|
43053
43051
|
* The method also handles buffer-less rendering mode for special cases
|
|
43054
43052
|
* and manages depth mask settings for different primitive types.
|
|
43055
43053
|
*/
|
|
43056
|
-
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count): boolean;
|
|
43054
|
+
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count, _displayIdx: Index): boolean;
|
|
43057
43055
|
/**
|
|
43058
43056
|
* Renders primitives without using vertex/index buffers.
|
|
43059
43057
|
* This specialized rendering mode is used for certain types of procedural
|
|
@@ -43235,9 +43233,10 @@ declare class WebGLStrategyUniform implements CGAPIStrategy, WebGLStrategy {
|
|
|
43235
43233
|
* @param primitiveUids - Array of primitive UIDs to render, sorted by rendering order
|
|
43236
43234
|
* @param renderPass - The render pass configuration containing rendering settings
|
|
43237
43235
|
* @param renderPassTickCount - Current tick count for the render pass
|
|
43236
|
+
* @param displayIdx - The index of the display to render to
|
|
43238
43237
|
* @returns True if any primitives were rendered, false otherwise
|
|
43239
43238
|
*/
|
|
43240
|
-
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count): boolean;
|
|
43239
|
+
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count, _displayIdx: Index): boolean;
|
|
43241
43240
|
/**
|
|
43242
43241
|
* Renders primitives without using vertex/index buffers.
|
|
43243
43242
|
* Used for buffer-less rendering scenarios such as full-screen post-processing effects.
|
|
@@ -43991,6 +43990,9 @@ declare const SystemState: {
|
|
|
43991
43990
|
* @default 0
|
|
43992
43991
|
*/
|
|
43993
43992
|
totalSizeOfGPUShaderDataStorageExceptMorphData: number;
|
|
43993
|
+
xrPoseWebGPU: XRViewerPose | undefined;
|
|
43994
|
+
xrGpuBinding: any;
|
|
43995
|
+
xrProjectionLayerWebGPU: XRLayer | undefined;
|
|
43994
43996
|
};
|
|
43995
43997
|
|
|
43996
43998
|
/**
|
|
@@ -44024,6 +44026,7 @@ declare class WebGpuStrategyBasic implements CGAPIStrategy {
|
|
|
44024
44026
|
private __lastCameraControllerComponentsUpdateCount;
|
|
44025
44027
|
private __lastBlendShapeComponentsUpdateCountForWeights;
|
|
44026
44028
|
private __lastBlendShapeComponentsUpdateCountForBlendData;
|
|
44029
|
+
private static __webxrSystem;
|
|
44027
44030
|
private constructor();
|
|
44028
44031
|
/**
|
|
44029
44032
|
* Gets the singleton instance of WebGpuStrategyBasic.
|
|
@@ -44099,14 +44102,6 @@ declare class WebGpuStrategyBasic implements CGAPIStrategy {
|
|
|
44099
44102
|
* @param propertySetter - Function to generate property accessor methods
|
|
44100
44103
|
*/
|
|
44101
44104
|
setupShaderForMaterial(material: Material, primitive: Primitive, vertexShaderMethodDefinitions: string, propertySetter: getShaderPropertyFunc): void;
|
|
44102
|
-
/**
|
|
44103
|
-
* Renders a render pass using pre-built render bundles for improved performance.
|
|
44104
|
-
* Render bundles allow WebGPU to optimize command encoding by pre-recording draw commands.
|
|
44105
|
-
*
|
|
44106
|
-
* @param renderPass - The render pass to execute
|
|
44107
|
-
* @returns True if the render bundle was successfully executed
|
|
44108
|
-
*/
|
|
44109
|
-
renderWithRenderBundle(renderPass: RenderPass): boolean;
|
|
44110
44105
|
/**
|
|
44111
44106
|
* Performs pre-rendering operations required before drawing.
|
|
44112
44107
|
* Updates storage buffers when components have been modified and handles morph target updates.
|
|
@@ -44120,9 +44115,10 @@ declare class WebGpuStrategyBasic implements CGAPIStrategy {
|
|
|
44120
44115
|
* @param primitiveUids - Array of primitive UIDs to render, sorted by rendering order
|
|
44121
44116
|
* @param renderPass - The render pass configuration containing rendering settings
|
|
44122
44117
|
* @param renderPassTickCount - Current tick count for animation and timing purposes
|
|
44118
|
+
* @param displayIdx - The index of the display to render to
|
|
44123
44119
|
* @returns True if any primitives were successfully rendered
|
|
44124
44120
|
*/
|
|
44125
|
-
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, _renderPassTickCount:
|
|
44121
|
+
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, _renderPassTickCount: Count, displayIdx: Index): boolean;
|
|
44126
44122
|
/**
|
|
44127
44123
|
* Renders primitives without using vertex/index buffers.
|
|
44128
44124
|
* This is used for special rendering modes like full-screen effects or procedural geometry.
|
|
@@ -44137,9 +44133,10 @@ declare class WebGpuStrategyBasic implements CGAPIStrategy {
|
|
|
44137
44133
|
* @param primitiveUid - Unique identifier of the primitive to render
|
|
44138
44134
|
* @param renderPass - Render pass containing rendering configuration
|
|
44139
44135
|
* @param zWrite - Whether to enable depth buffer writing
|
|
44136
|
+
* @param displayIdx - The index of the display to render to
|
|
44140
44137
|
* @returns True if the primitive was successfully rendered
|
|
44141
44138
|
*/
|
|
44142
|
-
renderInner(primitiveUid: PrimitiveUID, renderPass: RenderPass, zWrite: boolean): boolean;
|
|
44139
|
+
renderInner(primitiveUid: PrimitiveUID, renderPass: RenderPass, zWrite: boolean, displayIdx: Index): boolean;
|
|
44143
44140
|
/**
|
|
44144
44141
|
* Creates or updates the main storage buffer containing all GPU instance data.
|
|
44145
44142
|
* This buffer holds transform matrices, material properties, and other per-instance data
|