lythreeframe 2.0.3 → 2.0.5
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/dist/bundle.cjs.js +68 -68
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +68 -68
- package/dist/bundle.esm.js.map +1 -1
- package/dist/src/Frame/Controller.d.ts +13 -2
- package/dist/src/Frame/Rendering/WebGLPostProcess.d.ts +2 -0
- package/dist/src/Frame/Viewport.d.ts +2 -0
- package/package.json +1 -1
|
@@ -49,6 +49,17 @@ export interface ActorHoverEvent {
|
|
|
49
49
|
hit: Intersection | null;
|
|
50
50
|
handled: boolean;
|
|
51
51
|
}
|
|
52
|
+
/** focusToBounds 选项 */
|
|
53
|
+
export interface FocusToBoundsOptions {
|
|
54
|
+
/** 是否计算最优朝向 */
|
|
55
|
+
computeOptimalQuat?: boolean;
|
|
56
|
+
/** 持续回调 */
|
|
57
|
+
onGoing?: (() => void) | null;
|
|
58
|
+
/** 完成回调 */
|
|
59
|
+
onFinished?: (() => void) | null;
|
|
60
|
+
/** 目标屏幕占比,默认 sqrt(0.5) ≈ 0.707 */
|
|
61
|
+
targetScreenRatio?: number;
|
|
62
|
+
}
|
|
52
63
|
export declare class Controller {
|
|
53
64
|
protected _app: ThreeJsApp;
|
|
54
65
|
protected _pawn: Pawn | null;
|
|
@@ -169,6 +180,6 @@ export declare class Controller {
|
|
|
169
180
|
getAllHitResultUnderCursor(_checkInteractable?: boolean): HitResult[] | null;
|
|
170
181
|
protected getAllHitResultFromScreenPoint(x: number, y: number): HitResult[];
|
|
171
182
|
focusTo(targetPos: Vector3, targetQuat: Quaternion | Euler, distance: number, time: number, onGoing?: (() => void) | null, onFinished?: (() => void) | null): void;
|
|
172
|
-
focusToBounds(bounds: Box3, time: number,
|
|
173
|
-
focusToObject(targetObejct: Object3D, time: number,
|
|
183
|
+
focusToBounds(bounds: Box3, time: number, options?: FocusToBoundsOptions): void;
|
|
184
|
+
focusToObject(targetObejct: Object3D, time: number, options?: FocusToBoundsOptions): void;
|
|
174
185
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Camera, Data3DTexture, Object3D, Scene, WebGLRenderer } from "three";
|
|
2
2
|
import { EffectComposer } from "three/examples/jsm/postprocessing/EffectComposer.js";
|
|
3
3
|
import { PostProcessParam, PostProcessStepParam } from '../../PostProcess/PostProcessParam';
|
|
4
|
+
import { Pass } from "three/examples/jsm/postprocessing/Pass.js";
|
|
4
5
|
export declare class WebGLPostProcessManager {
|
|
5
6
|
private postProcessParam;
|
|
6
7
|
private composer;
|
|
@@ -24,6 +25,7 @@ export declare class WebGLPostProcessManager {
|
|
|
24
25
|
updateCamera(camera: Camera): void;
|
|
25
26
|
setup(): void;
|
|
26
27
|
private buildPipeline;
|
|
28
|
+
buildCustomPostProcess(passes: Pass[]): void;
|
|
27
29
|
private getStepParam;
|
|
28
30
|
private updateAllParameters;
|
|
29
31
|
private updateGTAOParameters;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Pass } from "three/examples/jsm/Addons.js";
|
|
1
2
|
import { WebGPURendererParameters } from "three/src/renderers/webgpu/WebGPURenderer.js";
|
|
2
3
|
import { Object3D, ShadowMapType, ToneMapping, WebGPURenderer } from "three/webgpu";
|
|
3
4
|
import { ThreeJsApp } from "../ThreeJsApp";
|
|
@@ -28,6 +29,7 @@ export declare class Viewport {
|
|
|
28
29
|
protected createCSS3DRenderer(): void;
|
|
29
30
|
protected createUILayer(): void;
|
|
30
31
|
init(): void;
|
|
32
|
+
buildCustomPostProcess(passes: Pass[]): void;
|
|
31
33
|
protected setupPostProcess(postProcessParam: PostProcessParam): void;
|
|
32
34
|
/** Create the PostProcessManager instance. Override in subclass to use custom manager. */
|
|
33
35
|
protected createPostProcessManager(postProcessParam: PostProcessParam): PostProcessManager | WebGLPostProcessManager;
|