feat: daybreak finale turns the contact arrival into a sunrise with a dawn chord
This commit is contained in:
@@ -11,7 +11,8 @@ import type {
|
||||
|
||||
export interface PostProcessor extends GpuRenderTargetReporter {
|
||||
resize(width: number, height: number, pixelRatio: number): void;
|
||||
setDynamics(acceleration: number): void;
|
||||
/** dawn (END OF SHIFT, 0..1) lowers the bloom threshold up to 10%. */
|
||||
setDynamics(acceleration: number, dawn?: number): void;
|
||||
setLens(state: LensState): void;
|
||||
render(scene: unknown, camera: unknown): void;
|
||||
dispose(): void;
|
||||
@@ -127,12 +128,13 @@ export function createPostProcessor(
|
||||
Math.max(1, Math.floor(finiteOr(height, 1))),
|
||||
);
|
||||
},
|
||||
setDynamics(acceleration) {
|
||||
setDynamics(acceleration, dawn = 0) {
|
||||
if (disposed) return;
|
||||
const energy = clamp(acceleration, 0, 1);
|
||||
const daybreak = clamp(dawn, 0, 1);
|
||||
bloomPass.strength = BLOOM_REST.strength + energy * 0.16;
|
||||
bloomPass.radius = BLOOM_REST.radius + energy * 0.06;
|
||||
bloomPass.threshold = BLOOM_REST.threshold - energy * 0.05;
|
||||
bloomPass.threshold = (BLOOM_REST.threshold - energy * 0.05) * (1 - 0.1 * daybreak);
|
||||
},
|
||||
setLens(state) {
|
||||
if (disposed) return;
|
||||
|
||||
Reference in New Issue
Block a user