rhodonite 0.14.5 → 0.15.1
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/LICENSE +29 -1
- package/README.md +16 -5
- package/VERSION-FILE +1 -1
- package/dist/esm/index.d.ts +26 -10
- package/dist/esm/index.js +1274 -826
- package/dist/esmdev/index.d.ts +26 -10
- package/dist/esmdev/index.js +10170 -9443
- package/package.json +3 -4
package/LICENSE
CHANGED
|
@@ -22,8 +22,36 @@ SOFTWARE.
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
This software includes portions of code originally developed by the Khronos Group
|
|
25
|
+
This software includes portions of code originally developed by the Khronos Group.
|
|
26
26
|
Some of these portions have been translated and modified for use in the RhodoniteTS library.
|
|
27
27
|
- glTF-Sample-Renderer (https://github.com/KhronosGroup/glTF-Sample-Renderer)
|
|
28
28
|
|
|
29
29
|
See LICENSES/glTF-Sample-Renderer.LICENSE for details.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
This software includes code originally developed by enkimute.
|
|
34
|
+
- hdrpng.js (https://github.com/enkimute/hdrpng.js)
|
|
35
|
+
|
|
36
|
+
See LICENSES/hdrpng.js.LICENSE for details.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
This software includes code originally developed by Don McCurdy.
|
|
41
|
+
- KTX-Parse (https://github.com/donmccurdy/KTX-Parse)
|
|
42
|
+
|
|
43
|
+
See LICENSES/KTX-Parse.LICENSE for details.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
This software includes code originally developed by Don McCurdy.
|
|
48
|
+
- zstddec-wasm (https://github.com/donmccurdy/zstddec-wasm)
|
|
49
|
+
|
|
50
|
+
See LICENSES/zstddec-wasm.LICENSE for details.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
This software includes code originally developed by W3C/immersive-web.
|
|
55
|
+
- webxr-input-profiles (https://github.com/immersive-web/webxr-input-profiles)
|
|
56
|
+
|
|
57
|
+
See LICENSES/webxr-input-profiles.LICENSE for details.
|
package/README.md
CHANGED
|
@@ -194,10 +194,15 @@ $ yarn doc
|
|
|
194
194
|
|
|
195
195
|
## Testing Rhodonite
|
|
196
196
|
|
|
197
|
+
The following command runs unit tests and E2E tests.
|
|
198
|
+
|
|
197
199
|
```bash
|
|
198
200
|
$ yarn test
|
|
199
201
|
```
|
|
200
202
|
|
|
203
|
+
The E2E test uses a headless browser for rendering. Because the results are GPU hardware-dependent rather than software-dependent, results will vary depending on your environment.
|
|
204
|
+
Since the correct images were run in the library author's environment, it is likely that many tests will fail in your environment.
|
|
205
|
+
|
|
201
206
|
You can execute a part of tests like this.
|
|
202
207
|
|
|
203
208
|
### For unit test
|
|
@@ -213,7 +218,7 @@ $ yarn test-unit-part -- ./src/foundation/core/Entity.test.ts
|
|
|
213
218
|
### For E2E (visual) test
|
|
214
219
|
|
|
215
220
|
```bash
|
|
216
|
-
$ yarn test-e2e-part -- ./samples/test_e2e/
|
|
221
|
+
$ yarn test-e2e-part -- ./samples/test_e2e/DataTextureInstancedDrawing
|
|
217
222
|
```
|
|
218
223
|
|
|
219
224
|
## Development using VSCode devcontainer
|
|
@@ -250,14 +255,20 @@ Some of these portions have been translated and modified for use in the Rhodonit
|
|
|
250
255
|
|
|
251
256
|
See [LICENSES/glTF-Sample-Renderer.LICENSE](LICENSES/glTF-Sample-Renderer.LICENSE) for details.
|
|
252
257
|
|
|
253
|
-
### Libraries
|
|
258
|
+
### Libraries
|
|
254
259
|
|
|
255
|
-
|
|
260
|
+
This library uses the following libraries.
|
|
256
261
|
|
|
257
262
|
* [immersive-web/webxr-input-profiles](https://github.com/immersive-web/webxr-input-profiles) (forked version)
|
|
258
|
-
* [
|
|
263
|
+
* [enkimute/hdrpng.js](https://github.com/enkimute/hdrpng.js)
|
|
264
|
+
* [donmccurdy/KTX-Parse](https://github.com/donmccurdy/KTX-Parse)
|
|
265
|
+
* [donmccurdy/zstddec-wasm](https://github.com/donmccurdy/zstddec-wasm)
|
|
259
266
|
|
|
260
|
-
|
|
267
|
+
### Assets
|
|
268
|
+
|
|
269
|
+
This library also uses the following assets.
|
|
270
|
+
|
|
271
|
+
* [KhronosGroup/glTF-Sample-Assets](https://github.com/KhronosGroup/glTF-Sample-Assets)
|
|
261
272
|
|
|
262
273
|
### Contributors
|
|
263
274
|
|
package/VERSION-FILE
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
v0.
|
|
1
|
+
v0.15.1-0-g1656e2424-dirty
|
|
2
2
|
main
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2030,6 +2030,7 @@ declare const ShaderSemantics: Readonly<{
|
|
|
2030
2030
|
BrdfLutTexture: ShaderSemanticsEnum;
|
|
2031
2031
|
DiffuseEnvTexture: ShaderSemanticsEnum;
|
|
2032
2032
|
SpecularEnvTexture: ShaderSemanticsEnum;
|
|
2033
|
+
SheenEnvTexture: ShaderSemanticsEnum;
|
|
2033
2034
|
InverseEnvironment: ShaderSemanticsEnum;
|
|
2034
2035
|
IBLParameter: ShaderSemanticsEnum;
|
|
2035
2036
|
ViewPosition: ShaderSemanticsEnum;
|
|
@@ -3406,6 +3407,7 @@ declare class AABB {
|
|
|
3406
3407
|
*/
|
|
3407
3408
|
declare class LightComponent extends Component {
|
|
3408
3409
|
type: EnumIO;
|
|
3410
|
+
private __color;
|
|
3409
3411
|
private __intensity;
|
|
3410
3412
|
private readonly __initialDirection;
|
|
3411
3413
|
private __direction;
|
|
@@ -3431,8 +3433,10 @@ declare class LightComponent extends Component {
|
|
|
3431
3433
|
get componentTID(): ComponentTID;
|
|
3432
3434
|
get updateCount(): number;
|
|
3433
3435
|
get direction(): Vector3;
|
|
3434
|
-
set intensity(value:
|
|
3435
|
-
get intensity():
|
|
3436
|
+
set intensity(value: number);
|
|
3437
|
+
get intensity(): number;
|
|
3438
|
+
set color(value: Vector3);
|
|
3439
|
+
get color(): Vector3;
|
|
3436
3440
|
get _up(): Vector3;
|
|
3437
3441
|
set isLightGizmoVisible(flg: boolean);
|
|
3438
3442
|
get isLightGizmoVisible(): boolean;
|
|
@@ -3643,6 +3647,7 @@ type RenderingArgWebGL = {
|
|
|
3643
3647
|
renderPass: RenderPass;
|
|
3644
3648
|
diffuseCube?: CubeTexture | RenderTargetTextureCube;
|
|
3645
3649
|
specularCube?: CubeTexture | RenderTargetTextureCube;
|
|
3650
|
+
sheenCube?: CubeTexture | RenderTargetTextureCube;
|
|
3646
3651
|
isVr: boolean;
|
|
3647
3652
|
displayIdx: Index;
|
|
3648
3653
|
setUniform: boolean;
|
|
@@ -3849,7 +3854,7 @@ declare class WebGpuResourceRepository extends CGAPIResourceRepository implement
|
|
|
3849
3854
|
private __toClearRenderBundles;
|
|
3850
3855
|
executeRenderBundle(renderPass: RenderPass): boolean;
|
|
3851
3856
|
finishRenderBundleEncoder(renderPass: RenderPass): void;
|
|
3852
|
-
getOrCreateRenderPipeline(renderPipelineId: string, primitive: Primitive, material: Material, renderPass: RenderPass, zWrite: boolean, diffuseCubeMap?: CubeTexture | RenderTargetTextureCube, specularCubeMap?: CubeTexture | RenderTargetTextureCube): [GPURenderPipeline, boolean];
|
|
3857
|
+
getOrCreateRenderPipeline(renderPipelineId: string, primitive: Primitive, material: Material, renderPass: RenderPass, zWrite: boolean, diffuseCubeMap?: CubeTexture | RenderTargetTextureCube, specularCubeMap?: CubeTexture | RenderTargetTextureCube, sheenCubeMap?: CubeTexture | RenderTargetTextureCube): [GPURenderPipeline, boolean];
|
|
3853
3858
|
flush(): void;
|
|
3854
3859
|
setColorWriteMask(material: Material): GPUColorWriteFlags;
|
|
3855
3860
|
/**
|
|
@@ -5551,6 +5556,7 @@ interface IAnimatedValue {
|
|
|
5551
5556
|
getAnimationSampler(trackName: AnimationTrackName): AnimationSampler;
|
|
5552
5557
|
deleteAnimationSampler(trackName: AnimationTrackName): void;
|
|
5553
5558
|
setFloat32Array(array: Float32Array): void;
|
|
5559
|
+
getNumberArray(): number[];
|
|
5554
5560
|
}
|
|
5555
5561
|
|
|
5556
5562
|
/**
|
|
@@ -5742,7 +5748,6 @@ declare class Material extends RnObject {
|
|
|
5742
5748
|
get materialTypeName(): string;
|
|
5743
5749
|
get stateVersion(): number;
|
|
5744
5750
|
makeShadersInvalidate(): void;
|
|
5745
|
-
setTime(time: number): void;
|
|
5746
5751
|
}
|
|
5747
5752
|
|
|
5748
5753
|
type RnM2 = {
|
|
@@ -6028,8 +6033,6 @@ type RnM2Accessor = {
|
|
|
6028
6033
|
accessor?: Accessor;
|
|
6029
6034
|
extensions?: Gltf2AnyObject;
|
|
6030
6035
|
extras?: {
|
|
6031
|
-
attributeName: string;
|
|
6032
|
-
toGetAsTypedArray: boolean;
|
|
6033
6036
|
typedDataArray?: Float32Array;
|
|
6034
6037
|
componentN?: number;
|
|
6035
6038
|
componentBytes?: number;
|
|
@@ -10327,6 +10330,7 @@ declare class Texture extends AbstractTexture implements Disposable {
|
|
|
10327
10330
|
declare class MeshRendererComponent extends Component {
|
|
10328
10331
|
private __diffuseCubeMap?;
|
|
10329
10332
|
private __specularCubeMap?;
|
|
10333
|
+
private __sheenCubeMap?;
|
|
10330
10334
|
private __diffuseCubeMapContribution;
|
|
10331
10335
|
private __specularCubeMapContribution;
|
|
10332
10336
|
private __rotationOfCubeMap;
|
|
@@ -10341,6 +10345,7 @@ declare class MeshRendererComponent extends Component {
|
|
|
10341
10345
|
get componentTID(): ComponentTID;
|
|
10342
10346
|
get diffuseCubeMap(): RenderTargetTextureCube | CubeTexture | undefined;
|
|
10343
10347
|
get specularCubeMap(): RenderTargetTextureCube | CubeTexture | undefined;
|
|
10348
|
+
get sheenCubeMap(): RenderTargetTextureCube | CubeTexture | undefined;
|
|
10344
10349
|
get updateCount(): number;
|
|
10345
10350
|
static get updateCount(): number;
|
|
10346
10351
|
get diffuseCubeMapContribution(): number;
|
|
@@ -10349,7 +10354,7 @@ declare class MeshRendererComponent extends Component {
|
|
|
10349
10354
|
set specularCubeMapContribution(contribution: number);
|
|
10350
10355
|
get rotationOfCubeMap(): number;
|
|
10351
10356
|
set rotationOfCubeMap(rotation: number);
|
|
10352
|
-
setIBLCubeMap(diffuseCubeTexture: CubeTexture | RenderTargetTextureCube, specularCubeTexture: CubeTexture | RenderTargetTextureCube): Promise<void> | undefined;
|
|
10357
|
+
setIBLCubeMap(diffuseCubeTexture: CubeTexture | RenderTargetTextureCube, specularCubeTexture: CubeTexture | RenderTargetTextureCube, sheenCubeTexture?: CubeTexture | RenderTargetTextureCube): Promise<void> | undefined;
|
|
10353
10358
|
static common_$load({ processApproach }: {
|
|
10354
10359
|
processApproach: ProcessApproachEnum;
|
|
10355
10360
|
}): void;
|
|
@@ -11610,6 +11615,7 @@ declare class AnimatedScalar extends Scalar$1 implements IScalar, IAnimatedValue
|
|
|
11610
11615
|
private __lastTime;
|
|
11611
11616
|
isLoop: boolean;
|
|
11612
11617
|
constructor(animationSamplers: AnimationSamplers, activeAnimationTrackName: AnimationTrackName);
|
|
11618
|
+
getNumberArray(): number[];
|
|
11613
11619
|
setFloat32Array(array: Float32Array): void;
|
|
11614
11620
|
setTime(time: number): void;
|
|
11615
11621
|
useGlobalTime(): void;
|
|
@@ -11640,6 +11646,7 @@ declare class AnimatedVector2 extends Vector2 implements IVector2, IAnimatedValu
|
|
|
11640
11646
|
private __lastTime;
|
|
11641
11647
|
isLoop: boolean;
|
|
11642
11648
|
constructor(animationSamplers: AnimationSamplers, activeAnimationTrackName: AnimationTrackName);
|
|
11649
|
+
getNumberArray(): number[];
|
|
11643
11650
|
setFloat32Array(array: Float32Array): void;
|
|
11644
11651
|
setTime(time: number): void;
|
|
11645
11652
|
useGlobalTime(): void;
|
|
@@ -11672,6 +11679,7 @@ declare class AnimatedVector3 extends Vector3 implements IVector3, IAnimatedValu
|
|
|
11672
11679
|
private __lastTime;
|
|
11673
11680
|
isLoop: boolean;
|
|
11674
11681
|
constructor(animationSamplers: AnimationSamplers, activeAnimationTrackName: AnimationTrackName);
|
|
11682
|
+
getNumberArray(): number[];
|
|
11675
11683
|
setFloat32Array(array: Float32Array): void;
|
|
11676
11684
|
setTime(time: number): void;
|
|
11677
11685
|
useGlobalTime(): void;
|
|
@@ -11704,6 +11712,7 @@ declare class AnimatedVector4 extends Vector4 implements IVector4, IAnimatedValu
|
|
|
11704
11712
|
private __lastTime;
|
|
11705
11713
|
isLoop: boolean;
|
|
11706
11714
|
constructor(animationSamplers: AnimationSamplers, activeAnimationTrackName: AnimationTrackName);
|
|
11715
|
+
getNumberArray(): number[];
|
|
11707
11716
|
setFloat32Array(array: Float32Array): void;
|
|
11708
11717
|
setTime(time: number): void;
|
|
11709
11718
|
useGlobalTime(): void;
|
|
@@ -11767,6 +11776,7 @@ declare class AnimatedQuaternion extends Quaternion implements IQuaternion, IAni
|
|
|
11767
11776
|
private __lastTime;
|
|
11768
11777
|
isLoop: boolean;
|
|
11769
11778
|
constructor(animationSamplers: AnimationSamplers, activeAnimationTrackName: AnimationTrackName);
|
|
11779
|
+
getNumberArray(): number[];
|
|
11770
11780
|
setFloat32Array(array: Float32Array): void;
|
|
11771
11781
|
setTime(time: number): void;
|
|
11772
11782
|
useGlobalTime(): void;
|
|
@@ -11835,6 +11845,7 @@ interface SphereDescriptor extends IAnyPrimitiveDescriptor {
|
|
|
11835
11845
|
widthSegments?: Count;
|
|
11836
11846
|
/** the number of segments for height direction */
|
|
11837
11847
|
heightSegments?: Count;
|
|
11848
|
+
inverseNormal?: boolean;
|
|
11838
11849
|
physics?: PhysicsProperty;
|
|
11839
11850
|
}
|
|
11840
11851
|
/**
|
|
@@ -12486,7 +12497,7 @@ declare function createLightWithCameraEntity(): ILightEntity & ICameraEntityMeth
|
|
|
12486
12497
|
* type of animation.channel.target.path in glTF2
|
|
12487
12498
|
* See: https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#_animation_channels
|
|
12488
12499
|
*/
|
|
12489
|
-
type AnimationPathName = 'undefined' | 'translate' | 'quaternion' | 'scale' | 'weights' |
|
|
12500
|
+
type AnimationPathName = 'undefined' | 'translate' | 'quaternion' | 'scale' | 'weights' | `material/${string}` | 'light_color' | 'light_intensity' | 'light_range' | 'light_spot_innerConeAngle' | 'light_spot_outerConeAngle' | 'camera_znear' | 'camera_zfar' | 'camera_fovy' | 'camera_xmag' | 'camera_ymag' | 'effekseer';
|
|
12490
12501
|
type AnimationTrackName = string;
|
|
12491
12502
|
interface AnimationInfo {
|
|
12492
12503
|
name: AnimationTrackName;
|
|
@@ -12627,7 +12638,7 @@ declare class AnimationComponent extends Component {
|
|
|
12627
12638
|
* @param pathName - the name of animation path
|
|
12628
12639
|
* @param animatedValue - the animated value
|
|
12629
12640
|
*/
|
|
12630
|
-
setAnimation(pathName: AnimationPathName,
|
|
12641
|
+
setAnimation(pathName: AnimationPathName, animatedValueArg: IAnimatedValue): void;
|
|
12631
12642
|
getAnimation(pathName: AnimationPathName): IAnimatedValue | undefined;
|
|
12632
12643
|
getStartInputValueOfAnimation(animationTrackName: string): number;
|
|
12633
12644
|
getEndInputValueOfAnimation(animationTrackName: string): number;
|
|
@@ -15646,6 +15657,10 @@ declare class ModelConverter {
|
|
|
15646
15657
|
*/
|
|
15647
15658
|
static _setupAnimation(gltfModel: RnM2, rnEntities: ISceneGraphEntity[], rnBuffers: Buffer[], rootGroup: ISceneGraphEntity, rnMaterials: Material[]): void;
|
|
15648
15659
|
private static __setPointerAnimation;
|
|
15660
|
+
private static __setPointerAnimationCameras;
|
|
15661
|
+
private static __setPointerAnimationLights;
|
|
15662
|
+
private static __setPointerAnimationNodes;
|
|
15663
|
+
private static __setPointerAnimationMaterials;
|
|
15649
15664
|
private static __setNormalAnimation;
|
|
15650
15665
|
static _setupSkeleton(gltfModel: RnM2, rnEntities: ISceneGraphEntity[], rnBuffers: Buffer[]): void;
|
|
15651
15666
|
private static __setupObjects;
|
|
@@ -16702,6 +16717,7 @@ declare class ForwardRenderPipeline extends RnObject {
|
|
|
16702
16717
|
private __oDrawFunc;
|
|
16703
16718
|
private __oDiffuseCubeTexture;
|
|
16704
16719
|
private __oSpecularCubeTexture;
|
|
16720
|
+
private __oSheenCubeTexture;
|
|
16705
16721
|
private __oSamplerForBackBuffer;
|
|
16706
16722
|
private __toneMappingType;
|
|
16707
16723
|
private __bloomHelper;
|
|
@@ -16753,7 +16769,7 @@ declare class ForwardRenderPipeline extends RnObject {
|
|
|
16753
16769
|
* @param diffuse - diffuse IBL Cube Texture
|
|
16754
16770
|
* @param specular - specular IBL Cube Texture
|
|
16755
16771
|
*/
|
|
16756
|
-
setIBLTextures(diffuse: CubeTexture, specular: CubeTexture): Promise<void>;
|
|
16772
|
+
setIBLTextures(diffuse: CubeTexture, specular: CubeTexture, sheen?: CubeTexture): Promise<void>;
|
|
16757
16773
|
/**
|
|
16758
16774
|
* getter of initial expression
|
|
16759
16775
|
*/
|