bx-1379-redesign #15
|
@ -31,6 +31,7 @@ a[href] {
|
||||||
max-width: 40vw;
|
max-width: 40vw;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
color: var(--main-text-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
&-title {
|
&-title {
|
||||||
|
|
|
@ -39,8 +39,8 @@ const loadEnv = async () => {
|
||||||
const exrCubeRenderTarget = pmremGenerator.fromEquirectangular(result.renderTarget.texture);
|
const exrCubeRenderTarget = pmremGenerator.fromEquirectangular(result.renderTarget.texture);
|
||||||
const newEnvMap = exrCubeRenderTarget ? exrCubeRenderTarget.texture : null;
|
const newEnvMap = exrCubeRenderTarget ? exrCubeRenderTarget.texture : null;
|
||||||
|
|
||||||
// scene.value.environment = newEnvMap
|
scene.value.environment = newEnvMap
|
||||||
// scene.value.environmentIntensity = 1
|
scene.value.environmentIntensity = 1.5
|
||||||
|
|
||||||
result.renderTarget.texture.dispose();
|
result.renderTarget.texture.dispose();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -49,10 +49,14 @@ const loadEnv = async () => {
|
||||||
|
|
||||||
const c = new Color()
|
const c = new Color()
|
||||||
c.set(props.clear_color || PROMOBG)
|
c.set(props.clear_color || PROMOBG)
|
||||||
// renderer.value.setClearColor(c)
|
renderer.value.setClearColor(c)
|
||||||
// scene.value.fog = new Fog(c, props.focus * k.start, props.focus * k.end)
|
scene.value.fog = new Fog(c, props.focus * k.start, props.focus * k.end)
|
||||||
|
|
||||||
|
const hsl_value = { h: 0, s: 0, l: 0 }
|
||||||
|
new Color(props.clear_color).getHSL(hsl_value);
|
||||||
|
|
||||||
document.documentElement.style.setProperty('--primary-color', props.clear_color)
|
document.documentElement.style.setProperty('--primary-color', props.clear_color)
|
||||||
|
document.documentElement.style.setProperty('--main-text-color', hsl_value.l < 0.5 ? '#fff' : '#000')
|
||||||
|
|
||||||
if (props.clear_color_to) {
|
if (props.clear_color_to) {
|
||||||
const c_to = new Color()
|
const c_to = new Color()
|
||||||
|
@ -67,7 +71,6 @@ const loadEnv = async () => {
|
||||||
const grad = ctx.createLinearGradient(0, 0, 0, s);
|
const grad = ctx.createLinearGradient(0, 0, 0, s);
|
||||||
grad.addColorStop(0, props.clear_color);
|
grad.addColorStop(0, props.clear_color);
|
||||||
grad.addColorStop(1, props.clear_color_to);
|
grad.addColorStop(1, props.clear_color_to);
|
||||||
console.log(props.clear_color, props.clear_color_to)
|
|
||||||
ctx.fillStyle = grad;
|
ctx.fillStyle = grad;
|
||||||
ctx.fillRect(0, 0, s, s);
|
ctx.fillRect(0, 0, s, s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue