@davi-ai/react-bodyengine-three 1.0.30 → 1.0.32
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { CharacterProps } from '../models/types';
|
|
3
|
-
declare const Character: ({ url, type, animationsUrl, gender, speechSynthesis, camera, onLoadingCompleted, autoLookAt, breathing, disableAnimations, debug, enableBml, animationWeights, license, detectGpuData, environmentPreset, tonemapping, targets, useBlendshapeManager }: CharacterProps) => React.JSX.Element;
|
|
3
|
+
declare const Character: ({ url, type, animationsUrl, gender, speechSynthesis, camera, onLoadingCompleted, autoLookAt, breathing, disableAnimations, debug, inspector, enableBml, animationWeights, license, detectGpuData, environmentPreset, tonemapping, targets, useBlendshapeManager }: CharacterProps) => React.JSX.Element;
|
|
4
4
|
export default Character;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as THREE from "three/webgpu";
|
|
2
|
+
/**
|
|
3
|
+
* A render pipeline's output graph plus the nodes a debug panel may want to
|
|
4
|
+
* tweak or display. Only `outputNode` is required to render.
|
|
5
|
+
*/
|
|
6
|
+
export interface PipelineNodes {
|
|
7
|
+
outputNode: any;
|
|
8
|
+
/** The lit scene colour before any post-processing. */
|
|
9
|
+
scenePassColor: any;
|
|
10
|
+
/** Temporal resolve (TRAA) of the frame. */
|
|
11
|
+
traaPass: any;
|
|
12
|
+
giPass?: any;
|
|
13
|
+
denoisePass?: any;
|
|
14
|
+
ao?: any;
|
|
15
|
+
gi?: any;
|
|
16
|
+
/** Share of the SSGI occlusion kept on hair and eyes (see createHighPipeline). */
|
|
17
|
+
hairAO?: any;
|
|
18
|
+
eyeAO?: any;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Full pipeline, for high-end GPUs (the vanilla example's): SSGI at half
|
|
22
|
+
* resolution with a depth-aware upsample and a cross-bilateral denoise,
|
|
23
|
+
* surface-aware multi-bounce AO composite, TRAA, then CAS sharpening.
|
|
24
|
+
*
|
|
25
|
+
* Measured on an RX 470 (new8.glb, bust framing): ≈ 7.7 ms at 1920×1080, of
|
|
26
|
+
* which SSGI + denoise ≈ 1.6 ms and TRAA + CAS ≈ 1.9 ms.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createHighPipeline(scene: THREE.Scene, camera: THREE.Camera): PipelineNodes;
|
|
29
|
+
/**
|
|
30
|
+
* Reduced pipeline, for every tier below high: colour + velocity only (no
|
|
31
|
+
* normal / albedo targets, which only SSGI reads), resolved by TRAA. TRAA stays
|
|
32
|
+
* on every tier: the hair's alpha hash relies on it to converge.
|
|
33
|
+
*
|
|
34
|
+
* Measured on an RX 470 (new8.glb, bust framing): ≈ 5.3 ms at 1920×1080
|
|
35
|
+
* against ≈ 7.7 ms for the full pipeline.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createTraaPipeline(scene: THREE.Scene, camera: THREE.Camera): PipelineNodes;
|
|
@@ -5,6 +5,12 @@ interface SceneProps {
|
|
|
5
5
|
setIsGpuAvailable: (v: boolean) => void;
|
|
6
6
|
children: any;
|
|
7
7
|
tonemapping: THREE.ToneMapping;
|
|
8
|
+
/**
|
|
9
|
+
* Attaches three's Inspector and registers an SSGI/TRAA parameter panel, the
|
|
10
|
+
* same way the vanilla example does. Development aid only - the Inspector is
|
|
11
|
+
* dynamically imported, so leaving this off keeps it out of the bundle.
|
|
12
|
+
*/
|
|
13
|
+
inspector?: boolean;
|
|
8
14
|
}
|
|
9
|
-
declare const Scene: ({ parentGpuTier, setIsGpuAvailable, children, tonemapping }: SceneProps) => React.JSX.Element;
|
|
15
|
+
declare const Scene: ({ parentGpuTier, setIsGpuAvailable, children, tonemapping, inspector }: SceneProps) => React.JSX.Element;
|
|
10
16
|
export default Scene;
|