From 5d22e113b2617eb7807136405132d5ca2e60488e Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 17 May 2023 10:52:22 +0900 Subject: [PATCH] :art: --- packages/frontend/src/components/MkAnimBg.vue | 7 +- packages/frontend/src/pages/welcome.setup.vue | 66 ++++++++++++------- 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/packages/frontend/src/components/MkAnimBg.vue b/packages/frontend/src/components/MkAnimBg.vue index 5a5c427cf1..010bfb6fee 100644 --- a/packages/frontend/src/components/MkAnimBg.vue +++ b/packages/frontend/src/components/MkAnimBg.vue @@ -50,8 +50,10 @@ let handle: ReturnType | null = null; onMounted(() => { const canvas = canvasEl.value!; - const gl = canvas.getContext('webgl', { premultipliedAlpha: true }); + canvas.width = canvas.offsetWidth; + canvas.height = canvas.offsetHeight; + const gl = canvas.getContext('webgl', { premultipliedAlpha: true }); if (gl == null) return; gl.clearColor(0.0, 0.0, 0.0, 0.0); @@ -156,8 +158,7 @@ onMounted(() => { vec3 purple = vec3( 1.0 ) - vec3( 195.0 / 255.0, 165.0 / 255.0, 242.0 / 255.0 ); vec3 orange = vec3( 1.0 ) - vec3( 255.0 / 255.0, 156.0 / 255.0, 136.0 / 255.0 ); - //float ratio = u_resolution.x / u_resolution.y; - float ratio = 1.0; + float ratio = u_resolution.x / u_resolution.y; vec2 uv = vec2( v_pos.x, v_pos.y / ratio ) * 0.5 + 0.5; diff --git a/packages/frontend/src/pages/welcome.setup.vue b/packages/frontend/src/pages/welcome.setup.vue index 7728d97a65..5a68292b1b 100644 --- a/packages/frontend/src/pages/welcome.setup.vue +++ b/packages/frontend/src/pages/welcome.setup.vue @@ -1,27 +1,32 @@