rhodonite 0.20.2 → 0.21.0

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 (63) hide show
  1. package/README.md +10 -2
  2. package/VERSION-FILE +1 -1
  3. package/dist/esm/foundation/components/Physics/PhysicsComponent.d.ts +1 -1
  4. package/dist/esm/foundation/core/Component.d.ts +1 -8
  5. package/dist/esm/foundation/core/Config.d.ts +0 -3
  6. package/dist/esm/foundation/core/GlobalDataRepository.d.ts +12 -8
  7. package/dist/esm/foundation/core/MemoryManager.d.ts +12 -0
  8. package/dist/esm/foundation/definitions/ProcessApproach.d.ts +1 -6
  9. package/dist/esm/foundation/definitions/ShaderSemantics.d.ts +0 -1
  10. package/dist/esm/foundation/materials/contents/CustomMaterialContent.d.ts +1 -1
  11. package/dist/esm/foundation/materials/core/AbstractMaterialContent.d.ts +1 -23
  12. package/dist/esm/foundation/materials/core/Material.d.ts +10 -14
  13. package/dist/esm/foundation/materials/core/MaterialRepository.d.ts +5 -0
  14. package/dist/esm/foundation/physics/PhysicsProperty.d.ts +9 -2
  15. package/dist/esm/foundation/physics/index.d.ts +0 -1
  16. package/dist/esm/foundation/system/Engine.d.ts +2 -2
  17. package/dist/esm/foundation/system/EngineState.d.ts +1 -1
  18. package/dist/esm/index.js +465 -588
  19. package/dist/esm/webgl/MultiDraw.d.ts +1 -1
  20. package/dist/esm/webgl/WebGLResourceRepository.d.ts +1 -2
  21. package/dist/{esmdev/webgl/WebGLStrategyDataTexture.d.ts → esm/webgl/WebGLStrategyWebGL2.d.ts} +4 -4
  22. package/dist/esm/webgl/debug/BufferLayoutDecoder.d.ts +83 -0
  23. package/dist/esm/webgl/debug/ShaderParameterDebugger.d.ts +47 -0
  24. package/dist/esm/webgl/debug/index.d.ts +3 -0
  25. package/dist/esm/webgl/debug/types.d.ts +114 -0
  26. package/dist/esm/webgl/index.d.ts +2 -2
  27. package/dist/esm/webgl/main.d.ts +2 -4
  28. package/dist/esm/webgl/shaders/StandardShaderPart.d.ts +1 -1
  29. package/dist/esm/webgl/types/CommonTypes.d.ts +0 -1
  30. package/dist/esmdev/foundation/components/Physics/PhysicsComponent.d.ts +1 -1
  31. package/dist/esmdev/foundation/core/Component.d.ts +1 -8
  32. package/dist/esmdev/foundation/core/Config.d.ts +0 -3
  33. package/dist/esmdev/foundation/core/GlobalDataRepository.d.ts +12 -8
  34. package/dist/esmdev/foundation/core/MemoryManager.d.ts +12 -0
  35. package/dist/esmdev/foundation/definitions/ProcessApproach.d.ts +1 -6
  36. package/dist/esmdev/foundation/definitions/ShaderSemantics.d.ts +0 -1
  37. package/dist/esmdev/foundation/materials/contents/CustomMaterialContent.d.ts +1 -1
  38. package/dist/esmdev/foundation/materials/core/AbstractMaterialContent.d.ts +1 -23
  39. package/dist/esmdev/foundation/materials/core/Material.d.ts +10 -14
  40. package/dist/esmdev/foundation/materials/core/MaterialRepository.d.ts +5 -0
  41. package/dist/esmdev/foundation/physics/PhysicsProperty.d.ts +9 -2
  42. package/dist/esmdev/foundation/physics/index.d.ts +0 -1
  43. package/dist/esmdev/foundation/system/Engine.d.ts +2 -2
  44. package/dist/esmdev/foundation/system/EngineState.d.ts +1 -1
  45. package/dist/esmdev/index.js +1293 -2043
  46. package/dist/esmdev/webgl/MultiDraw.d.ts +1 -1
  47. package/dist/esmdev/webgl/WebGLResourceRepository.d.ts +1 -2
  48. package/dist/{esm/webgl/WebGLStrategyDataTexture.d.ts → esmdev/webgl/WebGLStrategyWebGL2.d.ts} +4 -4
  49. package/dist/esmdev/webgl/debug/BufferLayoutDecoder.d.ts +83 -0
  50. package/dist/esmdev/webgl/debug/ShaderParameterDebugger.d.ts +47 -0
  51. package/dist/esmdev/webgl/debug/index.d.ts +3 -0
  52. package/dist/esmdev/webgl/debug/types.d.ts +114 -0
  53. package/dist/esmdev/webgl/index.d.ts +2 -2
  54. package/dist/esmdev/webgl/main.d.ts +2 -4
  55. package/dist/esmdev/webgl/shaders/StandardShaderPart.d.ts +1 -1
  56. package/dist/esmdev/webgl/types/CommonTypes.d.ts +0 -1
  57. package/package.json +2 -1
  58. package/dist/esm/foundation/physics/Oimo/OimoPhysicsStrategy.d.ts +0 -124
  59. package/dist/esm/foundation/physics/Oimo/index.d.ts +0 -1
  60. package/dist/esm/webgl/WebGLStrategyUniform.d.ts +0 -193
  61. package/dist/esmdev/foundation/physics/Oimo/OimoPhysicsStrategy.d.ts +0 -124
  62. package/dist/esmdev/foundation/physics/Oimo/index.d.ts +0 -1
  63. package/dist/esmdev/webgl/WebGLStrategyUniform.d.ts +0 -193
@@ -120,7 +120,7 @@ export declare function makeMultiDrawRenderStateKey(primitive: Primitive, materi
120
120
  * `Material.stateVersion`, so a cache hit costs a WeakMap lookup plus field compares.
121
121
  */
122
122
  export declare function getMultiDrawStateKeyId(primitive: Primitive, material: Material, meshRendererFingerPrintId: number): number | null;
123
- /** Draw arguments filled by WebGLStrategyDataTexture when a draw is deferred into a batch. */
123
+ /** Draw arguments filled by WebGLStrategyWebGL2 when a draw is deferred into a batch. */
124
124
  export type DeferredMultiDraw = {
125
125
  primitive: Primitive;
126
126
  mesh: Mesh;
@@ -372,10 +372,9 @@ export declare class WebGLResourceRepository extends CGAPIResourceRepository imp
372
372
  * @param config - Configuration for the shader program
373
373
  * @param shaderProgramUid - The handle of the shader program
374
374
  * @param infoArray - Array of shader semantics information
375
- * @param isUniformOnlyMode - Whether to set up only uniform locations
376
375
  * @returns The WebGL program object with configured uniform locations
377
376
  */
378
- setupUniformLocations(config: Config, shaderProgramUid: WebGLResourceHandle, infoArray: ShaderSemanticsInfo[], isUniformOnlyMode: boolean): WebGLProgram;
377
+ setupUniformLocations(config: Config, shaderProgramUid: WebGLResourceHandle, infoArray: ShaderSemanticsInfo[]): WebGLProgram;
379
378
  /**
380
379
  * Sets up basic uniform locations required for data texture operations.
381
380
  *
@@ -19,7 +19,7 @@ import type { ShaderSources, WebGLStrategy } from './WebGLStrategy';
19
19
  * a complete rendering pipeline for WebGL with data texture optimization.
20
20
  * The strategy is particularly useful for rendering many instances with unique properties.
21
21
  */
22
- export declare class WebGLStrategyDataTexture implements CGAPIStrategy, WebGLStrategy {
22
+ export declare class WebGLStrategyWebGL2 implements CGAPIStrategy, WebGLStrategy {
23
23
  private __engine;
24
24
  private __dataTextureUid;
25
25
  private __dataUBOUid;
@@ -335,16 +335,16 @@ export declare class WebGLStrategyDataTexture implements CGAPIStrategy, WebGLStr
335
335
  */
336
336
  dettachVertexData(glw: WebGLContextWrapper): void;
337
337
  /**
338
- * Gets the singleton instance of WebGLStrategyDataTexture.
338
+ * Gets the singleton instance of WebGLStrategyWebGL2.
339
339
  * Creates the instance if it doesn't exist and initializes the WebXR system reference.
340
340
  *
341
- * @returns The singleton instance of WebGLStrategyDataTexture
341
+ * @returns The singleton instance of WebGLStrategyWebGL2
342
342
  *
343
343
  * @remarks
344
344
  * This method ensures only one instance of the strategy exists throughout the application
345
345
  * and properly initializes the WebXR system for VR/AR rendering capabilities.
346
346
  */
347
- static init(engine: Engine): WebGLStrategyDataTexture;
347
+ static init(engine: Engine): WebGLStrategyWebGL2;
348
348
  /**
349
349
  * Sets the current component SIDs for each display index in VR/non-VR rendering.
350
350
  * This method configures camera component SIDs based on the rendering mode
@@ -0,0 +1,83 @@
1
+ import { type CompositionTypeEnum } from '../../foundation/definitions/CompositionType';
2
+ import type { ShaderSemanticsInfo } from '../../foundation/definitions/ShaderSemanticsInfo';
3
+ import type { Count, IndexOf16Bytes } from '../../types/CommonTypes';
4
+ import type { BufferLocationInfo, RawVec4 } from './types';
5
+ /**
6
+ * Source of the data texture layout. `readVec4` and `readScalar` read the CPU-side
7
+ * GPUInstanceData buffers, which are the same bytes that are uploaded to the texture.
8
+ */
9
+ export type BufferLayoutSource = {
10
+ width: number;
11
+ readVec4: (vec4Index: number) => RawVec4 | null;
12
+ readScalar: (scalarIndex: number) => number | null;
13
+ };
14
+ type FetchPlan = {
15
+ fetchFunction: string;
16
+ unit: 'vec4' | 'scalar' | 'scalar-weird';
17
+ count: number;
18
+ warning?: string;
19
+ };
20
+ /**
21
+ * Mirrors the `fetch*` helpers in `prerequisites.glsl` for each composition type.
22
+ */
23
+ export declare function getFetchPlan(compositionType: CompositionTypeEnum): FetchPlan;
24
+ /**
25
+ * Decodes the location(s) of a material semantic for a given material SID.
26
+ *
27
+ * Mirrors `WebGLStrategyWebGL2.__getShaderPropertyOfMaterial`:
28
+ * - `bufferViewIndex = floor(materialSID / materialCountPerBufferView)`
29
+ * - `indexInBufferView = materialSID % materialCountPerBufferView`
30
+ * - non-array: `vec4Index = offsets[bv] + vec4Size * indexInBufferView`
31
+ * - array: `offsets[bv] + vec4Size * arrayLength * indexInBufferView + vec4Size * elementIndex`
32
+ */
33
+ export declare function decodeMaterialProperty(args: {
34
+ info: ShaderSemanticsInfo;
35
+ offsets: IndexOf16Bytes[];
36
+ materialSID: number;
37
+ materialCountPerBufferView: number;
38
+ layout: BufferLayoutSource;
39
+ maxArrayElements?: number;
40
+ }): BufferLocationInfo;
41
+ /**
42
+ * Decodes a global property. Global properties use instanceId 0, and array elements
43
+ * use a plain `vec4Size` / `scalarSize` stride (no arrayLength multiplier).
44
+ */
45
+ export declare function decodeGlobalProperty(args: {
46
+ info: ShaderSemanticsInfo;
47
+ offset: IndexOf16Bytes;
48
+ layout: BufferLayoutSource;
49
+ maxArrayElements?: number;
50
+ }): BufferLocationInfo;
51
+ export type ComponentMemberLayoutInfo = {
52
+ compositionType: CompositionTypeEnum;
53
+ arrayLength?: Count;
54
+ isVariableLength?: boolean;
55
+ };
56
+ /**
57
+ * Decodes a component member. Mirrors `processForNonArrayType` / `processForArrayType`
58
+ * in `WebGLStrategyWebGL2`.
59
+ */
60
+ export declare function decodeComponentMember(args: {
61
+ memberInfo: ComponentMemberLayoutInfo;
62
+ offsets: IndexOf16Bytes[];
63
+ componentSID: number;
64
+ componentCountPerBufferView: number;
65
+ layout: BufferLayoutSource;
66
+ maxArrayElements?: number;
67
+ }): BufferLocationInfo;
68
+ /**
69
+ * Decodes a variable-length component member (e.g. SkeletalComponent.boneData).
70
+ * The per-instance location is stored in `${memberName}Location` as
71
+ * `location = x * 65536 + y`, with the element count in `z`.
72
+ */
73
+ export declare function decodeVariableLengthComponentMember(args: {
74
+ memberInfo: ComponentMemberLayoutInfo;
75
+ offsets: IndexOf16Bytes[];
76
+ locationMemberOffsets: IndexOf16Bytes[];
77
+ componentSID: number;
78
+ componentCountPerBufferView: number;
79
+ layout: BufferLayoutSource;
80
+ radix?: number;
81
+ maxArrayElements?: number;
82
+ }): BufferLocationInfo;
83
+ export {};
@@ -0,0 +1,47 @@
1
+ import { Component } from '../../foundation/core/Component';
2
+ import type { IEntity } from '../../foundation/core/Entity';
3
+ import type { Primitive } from '../../foundation/geometry/Primitive';
4
+ import type { Material } from '../../foundation/materials/core/Material';
5
+ import type { Engine } from '../../foundation/system/Engine';
6
+ import type { CGAPIResourceHandle } from '../../types/CommonTypes';
7
+ import type { AllParameterReport, ComponentParameterReport, EntityParameterReport, GlobalParameterReport, MaterialParameterReport, RawVec4, RealUniformInfo, ShaderParameterEntry } from './types';
8
+ /**
9
+ * Converts math classes, typed arrays and texture tuples to plain JSON values.
10
+ */
11
+ export declare function serializeValue(value: unknown): unknown;
12
+ /**
13
+ * Inspector for the values Rhodonite uploads to WebGL2 or WebGPU shaders.
14
+ *
15
+ * It reports both the CPU-side value of a shader semantic and the location/value the
16
+ * shader reads from the WebGL2 data texture or the WebGPU storage buffer, plus the
17
+ * real uniform value when the WebGL2 shader uses one (for
18
+ * `needUniformInDataTextureMode` and sampler uniforms).
19
+ *
20
+ * The decoder reads the CPU-side GPUInstanceData buffers, which are the same bytes
21
+ * that are uploaded to the GPU. It does not read back GPU memory.
22
+ */
23
+ export declare class ShaderParameterDebugger {
24
+ static reportMaterial(engine: Engine, material: Material, primitive?: Primitive): MaterialParameterReport;
25
+ static reportGlobals(engine: Engine, shaderProgramUid?: CGAPIResourceHandle): GlobalParameterReport;
26
+ static reportComponent(engine: Engine, component: Component): ComponentParameterReport;
27
+ static reportEntity(engine: Engine, entity: IEntity): EntityParameterReport;
28
+ static reportAll(engine: Engine): AllParameterReport;
29
+ static readRealUniforms(engine: Engine, shaderProgramUid: CGAPIResourceHandle): Map<string, RealUniformInfo> | null;
30
+ static decode(engine: Engine, vec4Index: number): {
31
+ vec4Index: number;
32
+ byteOffset: number;
33
+ row: number;
34
+ col: number;
35
+ vec4: RawVec4 | null;
36
+ } | null;
37
+ static formatEntries(entries: ShaderParameterEntry[]): Array<Record<string, unknown>>;
38
+ static format(report: MaterialParameterReport | GlobalParameterReport | ComponentParameterReport): unknown;
39
+ static dumpMaterial(engine: Engine, material: Material, primitive?: Primitive): MaterialParameterReport;
40
+ static dumpPrimitive(engine: Engine, primitive: Primitive): MaterialParameterReport;
41
+ static dumpGlobals(engine: Engine, shaderProgramUid?: CGAPIResourceHandle): GlobalParameterReport;
42
+ static dumpEntity(engine: Engine, entity: IEntity): EntityParameterReport;
43
+ static dumpAll(engine: Engine): AllParameterReport;
44
+ static installConsoleHelpers(engine: Engine, target?: any): void;
45
+ private static __getShaderProgramUid;
46
+ private static __isProgramMaterialMismatch;
47
+ }
@@ -0,0 +1,3 @@
1
+ export * from './BufferLayoutDecoder';
2
+ export * from './ShaderParameterDebugger';
3
+ export * from './types';
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Types for the shader parameter debugger.
3
+ *
4
+ * The debugger reports, for each shader semantic, both the CPU-side value and the
5
+ * location/value the shader will read from the WebGL2 data texture or the WebGPU
6
+ * storage buffer.
7
+ */
8
+ export type ShaderParameterBackend = 'WebGL2' | 'WebGPU' | 'None';
9
+ export type ShaderParameterSource = 'dataTexture' | 'storageBuffer' | 'uniform' | 'texture' | 'soloDatum';
10
+ /** One raw vec4 value (a texel in WebGL2, a storage-buffer vec4 in WebGPU). */
11
+ export type RawVec4 = [number, number, number, number];
12
+ /**
13
+ * Location of a value inside the GPU data buffer.
14
+ *
15
+ * `vec4Index` is the global vec4 index the shader computes (or the base vec4 index for
16
+ * scalar-unaligned fetches). `byteOffset` is `vec4Index * 16`. `row` and `col` are the
17
+ * data-texture coordinates in WebGL2 and are `-1` in WebGPU, which has no texture rows.
18
+ */
19
+ export type BufferLocation = {
20
+ bufferViewIndex: number;
21
+ vec4Index: number;
22
+ byteOffset: number;
23
+ row: number;
24
+ col: number;
25
+ fetchFunction: string;
26
+ vec4s: RawVec4[];
27
+ scalarIndex?: number;
28
+ arrayElement?: number;
29
+ warnings: string[];
30
+ };
31
+ export type BufferLocationInfo = {
32
+ bufferViewOffsets: number[];
33
+ bufferViewIndex: number;
34
+ indexInBufferView: number;
35
+ arrayLengthForShader: number;
36
+ locations: BufferLocation[];
37
+ };
38
+ export type RealUniformInfo = {
39
+ locationFound: boolean;
40
+ value: unknown;
41
+ };
42
+ export type TextureBindingInfo = {
43
+ /** WebGL2 sampler unit. Null in WebGPU. */
44
+ unit: number | null;
45
+ /** WebGL2 sampler unit / WebGPU bind-group binding. */
46
+ binding: number | null;
47
+ textureUid: number | null;
48
+ samplerUid: number | null;
49
+ };
50
+ export type ShaderParameterEntry = {
51
+ semantic: string;
52
+ stage: string;
53
+ compositionType: string;
54
+ componentType: string;
55
+ arrayLength?: number;
56
+ isTexture: boolean;
57
+ isInternalSetting: boolean;
58
+ needUniformInDataTextureMode: boolean;
59
+ soloDatum: boolean;
60
+ source: ShaderParameterSource;
61
+ /** Serializable preview of the CPU-side value. */
62
+ valuePreview: unknown;
63
+ buffer?: BufferLocationInfo;
64
+ realUniform?: RealUniformInfo;
65
+ texture?: TextureBindingInfo;
66
+ };
67
+ export type MaterialParameterReport = {
68
+ available: boolean;
69
+ reason?: string;
70
+ backend: ShaderParameterBackend;
71
+ processApproach: string;
72
+ materialTypeName: string;
73
+ materialUID: number;
74
+ materialSID: number;
75
+ materialCountPerBufferView: number;
76
+ bufferViewIndex: number;
77
+ shaderProgramUid: number;
78
+ /** Data-texture width in WebGL2. Zero in WebGPU. */
79
+ bufferWidth: number;
80
+ /**
81
+ * True when the shader program was last used with another material. Uniform values
82
+ * are per program (last-set state), so `realUniform.value` may belong to that material.
83
+ */
84
+ sharedProgramMaterialMismatch: boolean;
85
+ entries: ShaderParameterEntry[];
86
+ };
87
+ export type GlobalParameterReport = {
88
+ available: boolean;
89
+ reason?: string;
90
+ backend: ShaderParameterBackend;
91
+ processApproach: string;
92
+ /** Data-texture width in WebGL2. Zero in WebGPU. */
93
+ bufferWidth: number;
94
+ shaderProgramUid: number;
95
+ entries: ShaderParameterEntry[];
96
+ };
97
+ export type ComponentParameterReport = {
98
+ available: boolean;
99
+ reason?: string;
100
+ backend: ShaderParameterBackend;
101
+ componentClassName: string;
102
+ componentSID: number;
103
+ componentCountPerBufferView: number;
104
+ entries: ShaderParameterEntry[];
105
+ };
106
+ export type EntityParameterReport = {
107
+ entityUID: number;
108
+ materials: MaterialParameterReport[];
109
+ components: ComponentParameterReport[];
110
+ };
111
+ export type AllParameterReport = {
112
+ globals: GlobalParameterReport;
113
+ materials: MaterialParameterReport[];
114
+ };
@@ -1,3 +1,4 @@
1
+ export * from './debug/index';
1
2
  export * from './getRenderingStrategy';
2
3
  export * from './shaders/index';
3
4
  export * from './textureLoader/index';
@@ -8,5 +9,4 @@ export * from './WebGLExtension';
8
9
  export * from './WebGLResourceRepository';
9
10
  export * from './WebGLStrategy';
10
11
  export * from './WebGLStrategyCommonMethod';
11
- export * from './WebGLStrategyDataTexture';
12
- export * from './WebGLStrategyUniform';
12
+ export * from './WebGLStrategyWebGL2';
@@ -3,15 +3,13 @@ import { StandardShaderPart } from './shaders/StandardShaderPart';
3
3
  import { WebGLContextWrapper } from './WebGLContextWrapper';
4
4
  import { type VertexHandles as vertexHandles, WebGLResourceRepository } from './WebGLResourceRepository';
5
5
  import type { WebGLStrategy as webGLStrategy } from './WebGLStrategy';
6
- import { WebGLStrategyDataTexture } from './WebGLStrategyDataTexture';
7
- import { WebGLStrategyUniform } from './WebGLStrategyUniform';
6
+ import { WebGLStrategyWebGL2 } from './WebGLStrategyWebGL2';
8
7
  declare const WebGL: Readonly<{
9
8
  getRenderingStrategy: typeof getRenderingStrategy;
10
9
  StandardShaderPart: typeof StandardShaderPart;
11
10
  WebGLContextWrapper: typeof WebGLContextWrapper;
12
11
  WebGLResourceRepository: typeof WebGLResourceRepository;
13
- WebGLStrategyUniform: typeof WebGLStrategyUniform;
14
- WebGLStrategyDataTexture: typeof WebGLStrategyDataTexture;
12
+ WebGLStrategyWebGL2: typeof WebGLStrategyWebGL2;
15
13
  }>;
16
14
  export default WebGL;
17
15
  export type RnWebGL = typeof WebGL;
@@ -1,6 +1,6 @@
1
1
  import { type ComponentTypeEnum } from '../../foundation/definitions/ComponentType';
2
2
  import type { CompositionTypeEnum } from '../../foundation/definitions/CompositionType';
3
- import { type VertexAttributeEnum } from '../../foundation/definitions/VertexAttribute';
3
+ import type { VertexAttributeEnum } from '../../foundation/definitions/VertexAttribute';
4
4
  import { AbstractShaderNode } from '../../foundation/materials/core/AbstractShaderNode';
5
5
  import type { Socket, SocketDefaultValue } from '../../foundation/materials/core/Socket';
6
6
  import type { Engine } from '../../foundation/system/Engine';
@@ -22,7 +22,6 @@ export type RenderingArgWebGL = {
22
22
  sheenCube?: CubeTexture | RenderTargetTextureCube;
23
23
  isVr: boolean;
24
24
  displayIdx: Index;
25
- setUniform: boolean;
26
25
  };
27
26
  export type RenderingArgWebGpu = {
28
27
  cameraComponentSid: Index;
@@ -73,7 +73,7 @@ export declare class PhysicsComponent extends Component {
73
73
  /**
74
74
  * Common logic method that updates the global physics simulation.
75
75
  * This is called once per frame for all physics components and handles
76
- * the overall physics world update using the Oimo physics engine.
76
+ * the overall physics world update through the Rapier physics backend.
77
77
  */
78
78
  static common_$logic({ engine }: {
79
79
  engine: Engine;
@@ -29,11 +29,6 @@ export type MemberInfo = {
29
29
  componentType: ComponentTypeEnum;
30
30
  initValues: number[] | VectorN;
31
31
  convertToBool?: boolean;
32
- /**
33
- * Multiplier applied to the uniform array length in uniform mode
34
- * (the array length becomes Config.maxSkeletalBoneNumberForUniformMode * this value).
35
- */
36
- uniformArrayLengthMultiplier?: number;
37
32
  /**
38
33
  * Whether this array member has a per-instance length (see `Component.registerMember`).
39
34
  */
@@ -249,10 +244,9 @@ export declare class Component extends RnObject {
249
244
  * @param componentType - The primitive data type (e.g., Float32, Int32)
250
245
  * @param initValues - Initial values for the member field
251
246
  * @param convertToBool - Whether to convert the member value to a boolean
252
- * @param uniformArrayLengthMultiplier - Multiplier of the uniform array length in uniform mode
253
247
  * @param isVariableLength - Whether the array member has a per-instance length
254
248
  */
255
- static registerMember(this: typeof Component, { bufferUse, memberName, dataClassType, shaderType, compositionType, componentType, initValues, arrayLength, componentSID, convertToBool, uniformArrayLengthMultiplier, isVariableLength, }: {
249
+ static registerMember(this: typeof Component, { bufferUse, memberName, dataClassType, shaderType, compositionType, componentType, initValues, arrayLength, componentSID, convertToBool, isVariableLength, }: {
256
250
  bufferUse: BufferUseEnum;
257
251
  memberName: string;
258
252
  dataClassType: DataClassType;
@@ -263,7 +257,6 @@ export declare class Component extends RnObject {
263
257
  arrayLength?: Count | undefined;
264
258
  componentSID?: ComponentSID;
265
259
  convertToBool?: boolean;
266
- uniformArrayLengthMultiplier?: number;
267
260
  isVariableLength?: boolean;
268
261
  }): void;
269
262
  /**
@@ -11,7 +11,6 @@ type ConfigInitDescription = {
11
11
  maxLightNumber?: number;
12
12
  materialCountPerBufferView?: number;
13
13
  boneDataType?: BoneDataTypeEnum;
14
- maxSkeletalBoneNumberForUniformMode?: number;
15
14
  isUboEnabled?: boolean;
16
15
  eventTargetDom?: HTMLElement;
17
16
  cacheWebGpuRenderBundles?: boolean;
@@ -50,8 +49,6 @@ export declare class Config {
50
49
  * and other SkeletalComponents default to Vec4x2.
51
50
  */
52
51
  boneDataType: BoneDataTypeEnum | undefined;
53
- /** The maximum number of bones of each skeleton that Rhodonite can handle for Uniform Mode */
54
- maxSkeletalBoneNumberForUniformMode: number;
55
52
  /** Whether the UBO is enabled */
56
53
  isUboEnabled: boolean;
57
54
  /** The event target DOM for mouse operation */
@@ -1,6 +1,7 @@
1
1
  import type { ProcessApproachEnum } from '../../foundation/definitions/ProcessApproach';
2
- import type { CGAPIResourceHandle, Index, IndexOf16Bytes } from '../../types/CommonTypes';
2
+ import type { CGAPIResourceHandle, Count, Index, IndexOf16Bytes } from '../../types/CommonTypes';
3
3
  import type { getShaderPropertyFuncOfGlobalDataRepository, ShaderSemanticsName } from '../definitions/ShaderSemantics';
4
+ import { type ShaderSemanticsInfo } from '../definitions/ShaderSemanticsInfo';
4
5
  import type { Engine } from '../system/Engine';
5
6
  /**
6
7
  * The repository class that manages global data used throughout the rendering pipeline.
@@ -63,13 +64,16 @@ export declare class GlobalDataRepository {
63
64
  */
64
65
  getValue(shaderSemantic: ShaderSemanticsName, countIndex: Index): any;
65
66
  /**
66
- * Sets up uniform locations for all global properties when using uniform mode.
67
- * This is used internally by the WebGL resource repository for shader program setup.
68
- *
69
- * @param shaderProgramUid - The unique identifier of the shader program
70
- * @internal
67
+ * Returns every registered global property with its current value and layout offset.
68
+ * This is intended for debugging tools; it does not allocate or modify anything.
71
69
  */
72
- _setUniformLocationsForUniformModeOnly(shaderProgramUid: CGAPIResourceHandle): void;
70
+ getPropertyTable(): Array<{
71
+ semantic: ShaderSemanticsName;
72
+ info: ShaderSemanticsInfo;
73
+ value: any;
74
+ vec4Index: IndexOf16Bytes;
75
+ maxCount: Count;
76
+ }>;
73
77
  /**
74
78
  * Sets up uniform locations for properties that need uniform access in data texture mode.
75
79
  * Only sets up uniforms for properties marked with needUniformInDataTextureMode flag.
@@ -77,7 +81,7 @@ export declare class GlobalDataRepository {
77
81
  * @param shaderProgramUid - The unique identifier of the shader program
78
82
  * @internal
79
83
  */
80
- _setUniformLocationsForDataTextureModeOnly(shaderProgramUid: CGAPIResourceHandle): void;
84
+ _setUniformLocationsForWebGL2ModeOnly(shaderProgramUid: CGAPIResourceHandle): void;
81
85
  /**
82
86
  * Gets the memory location offset of a global property in 16-byte aligned units.
83
87
  * This is used for data texture mode to determine where properties are stored in memory.
@@ -87,6 +87,18 @@ export declare class MemoryManager {
87
87
  * @returns The byte offset of the existing buffers in bytes
88
88
  */
89
89
  getByteOffsetOfExistingBuffers(bufferUse: BufferUseEnum, indexOfTheBufferLayer: Index): Byte;
90
+ /**
91
+ * Reads float values from the concatenated layers of a buffer usage.
92
+ *
93
+ * This is intended for debugging tools. The returned array is a copy when the range
94
+ * spans buffer layers, and a view into the layer otherwise.
95
+ *
96
+ * @param bufferUse - The buffer usage to read
97
+ * @param byteOffset - Byte offset from the start of the first layer
98
+ * @param count - Number of float values to read
99
+ * @returns The read values, or null when the range is outside the allocated buffers
100
+ */
101
+ readFloat32Array(bufferUse: BufferUseEnum, byteOffset: Byte, count: Count): Float32Array | null;
90
102
  /**
91
103
  * Prints memory usage statistics for all managed buffers to the console.
92
104
  * Shows used bytes, total bytes, and usage percentage for each buffer type.
@@ -8,17 +8,12 @@ export declare class ProcessApproachClass extends EnumClass implements EnumIO {
8
8
  }
9
9
  export type ProcessApproachEnum = ProcessApproachClass;
10
10
  declare function from(index: number): ProcessApproachEnum | undefined;
11
- declare const isDataTextureApproach: (processApproach: ProcessApproachEnum) => boolean;
12
- declare const isUniformApproach: (processApproach: ProcessApproachEnum) => boolean;
13
11
  declare const isWebGpuApproach: (processApproach: ProcessApproachEnum) => boolean;
14
12
  declare const isWebGL2Approach: (processApproach: ProcessApproachEnum) => boolean;
15
13
  export declare const ProcessApproach: Readonly<{
16
- isDataTextureApproach: typeof isDataTextureApproach;
17
- isUniformApproach: typeof isUniformApproach;
18
14
  isWebGpuApproach: typeof isWebGpuApproach;
19
15
  None: ProcessApproachClass;
20
- Uniform: ProcessApproachClass;
21
- DataTexture: ProcessApproachClass;
16
+ WebGL2: ProcessApproachClass;
22
17
  WebGPU: ProcessApproachClass;
23
18
  from: typeof from;
24
19
  isWebGL2Approach: typeof isWebGL2Approach;
@@ -71,7 +71,6 @@ export declare const ShaderSemantics: Readonly<{
71
71
  ShadingModel: ShaderSemanticsEnum;
72
72
  SkinningMode: ShaderSemanticsEnum;
73
73
  GeneralTexture: ShaderSemanticsEnum;
74
- VertexAttributesExistenceArray: ShaderSemanticsEnum;
75
74
  BoneQuaternion: ShaderSemanticsEnum;
76
75
  BoneTranslateScale: ShaderSemanticsEnum;
77
76
  BoneTranslatePackedQuat: ShaderSemanticsEnum;
@@ -12,7 +12,7 @@ import type { Material } from '../core/Material';
12
12
  export declare class CustomMaterialContent extends AbstractMaterialContent {
13
13
  private __diffuseIblCubeMapSampler;
14
14
  private __specularIblCubeMapSampler;
15
- /** Material and values of the last IBL parameter write (WebGL DataTexture mode). */
15
+ /** Material and values of the last IBL parameter write (WebGL2 mode). */
16
16
  private __lastIblMaterial?;
17
17
  private __lastIblMaterialStateVersion;
18
18
  private __lastIblValues;
@@ -2,10 +2,7 @@ import { type ShaderityObject } from 'shaderity';
2
2
  import type { RenderingArgWebGL } from '../../../webgl/types/CommonTypes';
3
3
  import type { BlendShapeComponent } from '../../components/BlendShape/BlendShapeComponent';
4
4
  import type { CameraComponent } from '../../components/Camera/CameraComponent';
5
- import type { LightComponent } from '../../components/Light/LightComponent';
6
5
  import type { MeshComponent } from '../../components/Mesh/MeshComponent';
7
- import type { SkeletalComponent } from '../../components/Skeletal/SkeletalComponent';
8
- import type { Config } from '../../core/Config';
9
6
  import { RnObject } from '../../core/RnObject';
10
7
  import type { ShaderSemanticsInfo } from '../../definitions/ShaderSemanticsInfo';
11
8
  import { type ShaderTypeEnum } from '../../definitions/ShaderType';
@@ -39,10 +36,6 @@ export declare abstract class AbstractMaterialContent extends RnObject {
39
36
  private __isMorphing;
40
37
  private __isSkinning;
41
38
  private __isLighting;
42
- private static __lightPositions;
43
- private static __lightDirections;
44
- private static __lightIntensities;
45
- private static __lightProperties;
46
39
  private static __materialContentCount;
47
40
  private __materialContentUid;
48
41
  /** Shader caches managed per-Engine. Key is Engine.objectUID */
@@ -172,7 +165,7 @@ export declare abstract class AbstractMaterialContent extends RnObject {
172
165
  * @param material - The material instance
173
166
  * @param CameraComponentClass - The camera component class
174
167
  */
175
- protected setupBasicInfo(engine: Engine, args: RenderingArgWebGL, shaderProgram: WebGLProgram, firstTime: boolean, material: Material, CameraComponentClass: typeof CameraComponent): void;
168
+ protected setupBasicInfo(_engine: Engine, args: RenderingArgWebGL, shaderProgram: WebGLProgram, _firstTime: boolean, _material: Material, _CameraComponentClass: typeof CameraComponent): void;
176
169
  /**
177
170
  * Sets the world transformation matrix uniform in the shader.
178
171
  * @param shaderProgram - The WebGL shader program
@@ -213,21 +206,6 @@ export declare abstract class AbstractMaterialContent extends RnObject {
213
206
  * @param displayIdx - The display index for VR rendering
214
207
  */
215
208
  setProjection(shaderProgram: WebGLProgram, cameraComponent: CameraComponent, isVr: boolean, displayIdx: number): void;
216
- /**
217
- * Sets skeletal animation uniforms in the shader.
218
- * @param shaderProgram - The WebGL shader program
219
- * @param setUniform - Whether to set uniform values
220
- * @param skeletalComponent - The skeletal component containing bone data
221
- */
222
- protected setSkinning(config: Config, shaderProgram: WebGLProgram, setUniform: boolean, skeletalComponent?: SkeletalComponent): void;
223
- /**
224
- * Sets lighting information uniforms in the shader.
225
- * @param shaderProgram - The WebGL shader program
226
- * @param lightComponents - Array of light components
227
- * @param material - The material instance
228
- * @param setUniform - Whether to set uniform values
229
- */
230
- protected setLightsInfo(config: Config, shaderProgram: WebGLProgram, lightComponents: LightComponent[], _material: Material, setUniform: boolean): void;
231
209
  /**
232
210
  * Sets morph target animation uniforms in the shader.
233
211
  * @param shaderProgram - The WebGL shader program