Add theme settings, and remove the old theme system
This commit is contained in:
parent
567ac1a26d
commit
9f4a3197de
22 changed files with 2301 additions and 463 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// Volumetric GLSL shader exhaust plumes, mach shock diamonds (this doesn't look so much better than p1), and altitude/throttle plume scaling.
|
||||
import * as THREE from "three";
|
||||
import { getSoftParticleTexture } from "../sceneManager.js";
|
||||
import { isReducedEffects } from "../../theme.js";
|
||||
import { isReducedMotionEffects } from "../../theme.js";
|
||||
import { getPlumeStyle, type NozzleEmitter } from "./materials.js";
|
||||
|
||||
const PLUME_VERTEX_SHADER = `
|
||||
|
|
@ -76,7 +76,7 @@ export function setPlumeAtmosphere(
|
|||
mat.uniforms.uVacuum.value = vacuum;
|
||||
mat.uniforms.uThrottle.value = thr;
|
||||
if (mat.uniforms.uReduced) {
|
||||
mat.uniforms.uReduced.value = isReducedEffects() ? 1.0 : 0.0;
|
||||
mat.uniforms.uReduced.value = isReducedMotionEffects() ? 1.0 : 0.0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -129,7 +129,7 @@ export function buildStagePlume(
|
|||
uTime: { value: 0 },
|
||||
uVacuum: { value: 0 },
|
||||
uThrottle: { value: 1 },
|
||||
uReduced: { value: isReducedEffects() ? 1.0 : 0.0 },
|
||||
uReduced: { value: isReducedMotionEffects() ? 1.0 : 0.0 },
|
||||
uCoreColor: { value: new THREE.Color(style.core).multiplyScalar(1.35) },
|
||||
uInnerColor: {
|
||||
value: new THREE.Color(style.inner).multiplyScalar(1.15),
|
||||
|
|
@ -153,7 +153,7 @@ export function buildStagePlume(
|
|||
);
|
||||
envelope.position.y = -plumeLen * 0.5;
|
||||
envelope.onBeforeRender = () => {
|
||||
if (!isReducedEffects()) {
|
||||
if (!isReducedMotionEffects()) {
|
||||
shaderMat.uniforms.uTime.value = performance.now() * 0.001;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue