rhodonite 0.17.4 → 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 +31 -33
- package/dist/esm/index.js +352 -352
- package/dist/esmdev/index.d.ts +31 -33
- package/dist/esmdev/index.js +1617 -1134
- 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
|
*/
|
|
@@ -35823,6 +35823,7 @@ declare class Gltf2Exporter {
|
|
|
35823
35823
|
static __createMaterials(json: Gltf2Ex, entities: IMeshEntity[], option: Gltf2ExporterArguments): Promise<any[]>;
|
|
35824
35824
|
private static __processMeshPrimitives;
|
|
35825
35825
|
private static __createMaterialFromRhodonite;
|
|
35826
|
+
private static __extractScalarParameter;
|
|
35826
35827
|
private static __setupMaterialBasicProperties;
|
|
35827
35828
|
private static __setupMaterialTextures;
|
|
35828
35829
|
private static __processTextureParameters;
|
|
@@ -42359,6 +42360,8 @@ declare class WebXRSystem {
|
|
|
42359
42360
|
private __multiviewFramebufferHandle;
|
|
42360
42361
|
private __multiviewColorTextureHandle;
|
|
42361
42362
|
private __webglStereoUtil?;
|
|
42363
|
+
private __xrGpuBinding?;
|
|
42364
|
+
private __xrProjectionLayerWebGPU?;
|
|
42362
42365
|
/**
|
|
42363
42366
|
* Private constructor for singleton pattern.
|
|
42364
42367
|
* Initializes the viewer entity and left/right camera entities for stereo rendering.
|
|
@@ -42566,13 +42569,6 @@ declare class WebXRSystem {
|
|
|
42566
42569
|
* @returns The viewport vector (x, y, width, height) for the right eye.
|
|
42567
42570
|
*/
|
|
42568
42571
|
_getRightViewport(): Vector4;
|
|
42569
|
-
/**
|
|
42570
|
-
* Updates camera projection matrices and pushes values to the global data repository.
|
|
42571
|
-
* Called during the rendering pipeline to ensure cameras have current XR projection data.
|
|
42572
|
-
*
|
|
42573
|
-
* @internal
|
|
42574
|
-
*/
|
|
42575
|
-
_setValuesToGlobalDataRepository(): void;
|
|
42576
42572
|
/**
|
|
42577
42573
|
* Gets the world position of the specified VR camera.
|
|
42578
42574
|
* Combines XR pose data with user position offset and viewer transformations.
|
|
@@ -42648,6 +42644,7 @@ declare class WebXRSystem {
|
|
|
42648
42644
|
* @param callbackOnXrSessionStart - Callback to execute when setup is complete.
|
|
42649
42645
|
*/
|
|
42650
42646
|
private __setupWebGLLayer;
|
|
42647
|
+
private __setupWebGPULayer;
|
|
42651
42648
|
/**
|
|
42652
42649
|
* Updates the viewer pose from the current XR frame.
|
|
42653
42650
|
* Retrieves the current viewer pose and updates camera transformations.
|
|
@@ -42709,9 +42706,10 @@ interface CGAPIStrategy {
|
|
|
42709
42706
|
* @param primitiveUids - Array of unique identifiers for the primitives to be rendered
|
|
42710
42707
|
* @param renderPass - The render pass context containing rendering configuration
|
|
42711
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
|
|
42712
42710
|
* @returns True if the rendering operation was successful, false otherwise
|
|
42713
42711
|
*/
|
|
42714
|
-
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count): boolean;
|
|
42712
|
+
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count, displayIdx: Index): boolean;
|
|
42715
42713
|
}
|
|
42716
42714
|
|
|
42717
42715
|
/**
|
|
@@ -43040,6 +43038,7 @@ declare class WebGLStrategyDataTexture implements CGAPIStrategy, WebGLStrategy {
|
|
|
43040
43038
|
* @param primitiveUids - Array of primitive UIDs to render
|
|
43041
43039
|
* @param renderPass - The render pass configuration
|
|
43042
43040
|
* @param renderPassTickCount - Current tick count for the render pass
|
|
43041
|
+
* @param displayIdx - The index of the display to render to
|
|
43043
43042
|
* @returns true if any primitives were successfully rendered, false otherwise
|
|
43044
43043
|
*
|
|
43045
43044
|
* @remarks
|
|
@@ -43052,7 +43051,7 @@ declare class WebGLStrategyDataTexture implements CGAPIStrategy, WebGLStrategy {
|
|
|
43052
43051
|
* The method also handles buffer-less rendering mode for special cases
|
|
43053
43052
|
* and manages depth mask settings for different primitive types.
|
|
43054
43053
|
*/
|
|
43055
|
-
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count): boolean;
|
|
43054
|
+
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count, _displayIdx: Index): boolean;
|
|
43056
43055
|
/**
|
|
43057
43056
|
* Renders primitives without using vertex/index buffers.
|
|
43058
43057
|
* This specialized rendering mode is used for certain types of procedural
|
|
@@ -43234,9 +43233,10 @@ declare class WebGLStrategyUniform implements CGAPIStrategy, WebGLStrategy {
|
|
|
43234
43233
|
* @param primitiveUids - Array of primitive UIDs to render, sorted by rendering order
|
|
43235
43234
|
* @param renderPass - The render pass configuration containing rendering settings
|
|
43236
43235
|
* @param renderPassTickCount - Current tick count for the render pass
|
|
43236
|
+
* @param displayIdx - The index of the display to render to
|
|
43237
43237
|
* @returns True if any primitives were rendered, false otherwise
|
|
43238
43238
|
*/
|
|
43239
|
-
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count): boolean;
|
|
43239
|
+
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, renderPassTickCount: Count, _displayIdx: Index): boolean;
|
|
43240
43240
|
/**
|
|
43241
43241
|
* Renders primitives without using vertex/index buffers.
|
|
43242
43242
|
* Used for buffer-less rendering scenarios such as full-screen post-processing effects.
|
|
@@ -43990,6 +43990,9 @@ declare const SystemState: {
|
|
|
43990
43990
|
* @default 0
|
|
43991
43991
|
*/
|
|
43992
43992
|
totalSizeOfGPUShaderDataStorageExceptMorphData: number;
|
|
43993
|
+
xrPoseWebGPU: XRViewerPose | undefined;
|
|
43994
|
+
xrGpuBinding: any;
|
|
43995
|
+
xrProjectionLayerWebGPU: XRLayer | undefined;
|
|
43993
43996
|
};
|
|
43994
43997
|
|
|
43995
43998
|
/**
|
|
@@ -44023,6 +44026,7 @@ declare class WebGpuStrategyBasic implements CGAPIStrategy {
|
|
|
44023
44026
|
private __lastCameraControllerComponentsUpdateCount;
|
|
44024
44027
|
private __lastBlendShapeComponentsUpdateCountForWeights;
|
|
44025
44028
|
private __lastBlendShapeComponentsUpdateCountForBlendData;
|
|
44029
|
+
private static __webxrSystem;
|
|
44026
44030
|
private constructor();
|
|
44027
44031
|
/**
|
|
44028
44032
|
* Gets the singleton instance of WebGpuStrategyBasic.
|
|
@@ -44098,14 +44102,6 @@ declare class WebGpuStrategyBasic implements CGAPIStrategy {
|
|
|
44098
44102
|
* @param propertySetter - Function to generate property accessor methods
|
|
44099
44103
|
*/
|
|
44100
44104
|
setupShaderForMaterial(material: Material, primitive: Primitive, vertexShaderMethodDefinitions: string, propertySetter: getShaderPropertyFunc): void;
|
|
44101
|
-
/**
|
|
44102
|
-
* Renders a render pass using pre-built render bundles for improved performance.
|
|
44103
|
-
* Render bundles allow WebGPU to optimize command encoding by pre-recording draw commands.
|
|
44104
|
-
*
|
|
44105
|
-
* @param renderPass - The render pass to execute
|
|
44106
|
-
* @returns True if the render bundle was successfully executed
|
|
44107
|
-
*/
|
|
44108
|
-
renderWithRenderBundle(renderPass: RenderPass): boolean;
|
|
44109
44105
|
/**
|
|
44110
44106
|
* Performs pre-rendering operations required before drawing.
|
|
44111
44107
|
* Updates storage buffers when components have been modified and handles morph target updates.
|
|
@@ -44119,9 +44115,10 @@ declare class WebGpuStrategyBasic implements CGAPIStrategy {
|
|
|
44119
44115
|
* @param primitiveUids - Array of primitive UIDs to render, sorted by rendering order
|
|
44120
44116
|
* @param renderPass - The render pass configuration containing rendering settings
|
|
44121
44117
|
* @param renderPassTickCount - Current tick count for animation and timing purposes
|
|
44118
|
+
* @param displayIdx - The index of the display to render to
|
|
44122
44119
|
* @returns True if any primitives were successfully rendered
|
|
44123
44120
|
*/
|
|
44124
|
-
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, _renderPassTickCount:
|
|
44121
|
+
common_$render(primitiveUids: PrimitiveUID[], renderPass: RenderPass, _renderPassTickCount: Count, displayIdx: Index): boolean;
|
|
44125
44122
|
/**
|
|
44126
44123
|
* Renders primitives without using vertex/index buffers.
|
|
44127
44124
|
* This is used for special rendering modes like full-screen effects or procedural geometry.
|
|
@@ -44136,9 +44133,10 @@ declare class WebGpuStrategyBasic implements CGAPIStrategy {
|
|
|
44136
44133
|
* @param primitiveUid - Unique identifier of the primitive to render
|
|
44137
44134
|
* @param renderPass - Render pass containing rendering configuration
|
|
44138
44135
|
* @param zWrite - Whether to enable depth buffer writing
|
|
44136
|
+
* @param displayIdx - The index of the display to render to
|
|
44139
44137
|
* @returns True if the primitive was successfully rendered
|
|
44140
44138
|
*/
|
|
44141
|
-
renderInner(primitiveUid: PrimitiveUID, renderPass: RenderPass, zWrite: boolean): boolean;
|
|
44139
|
+
renderInner(primitiveUid: PrimitiveUID, renderPass: RenderPass, zWrite: boolean, displayIdx: Index): boolean;
|
|
44142
44140
|
/**
|
|
44143
44141
|
* Creates or updates the main storage buffer containing all GPU instance data.
|
|
44144
44142
|
* This buffer holds transform matrices, material properties, and other per-instance data
|