From f832d75f50509b5059bc3f20b2e32e95bb0e50e0 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Sun, 22 Jun 2025 17:01:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A0=87=E9=A2=98=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=8D=A2=E7=94=A8=E6=96=B0=E6=B8=B2=E6=9F=93=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/render/components/icons.tsx | 181 ++++++ .../src/render/components/tip.tsx | 2 +- .../client-modules/src/render/fx/base.ts | 24 +- .../client-modules/src/render/fx/image3d.ts | 14 +- .../client-modules/src/render/index.tsx | 24 +- .../client-modules/src/render/scene.ts | 3 + .../client-modules/src/render/ui/main.tsx | 4 +- .../client-modules/src/render/ui/title.tsx | 553 ++++++++++++++++++ packages/legacy-ui/src/ui/load.vue | 5 +- packages/legacy-ui/src/ui/start.vue | 10 +- packages/render-core/src/gl2.ts | 36 +- packages/render-core/src/item.ts | 10 +- packages/render-core/src/shader.ts | 14 +- packages/render-elements/src/graphics.ts | 7 +- packages/system-action/src/hotkey.ts | 9 +- public/libs/control.js | 28 +- public/libs/events.js | 15 +- public/project/images/bg.webp | Bin 24102 -> 110870 bytes public/styles.css | 1 + 19 files changed, 849 insertions(+), 91 deletions(-) create mode 100644 packages-user/client-modules/src/render/scene.ts create mode 100644 packages-user/client-modules/src/render/ui/title.tsx diff --git a/packages-user/client-modules/src/render/components/icons.tsx b/packages-user/client-modules/src/render/components/icons.tsx index c4a5072..4c609b9 100644 --- a/packages-user/client-modules/src/render/components/icons.tsx +++ b/packages-user/client-modules/src/render/components/icons.tsx @@ -501,3 +501,184 @@ export const StepForward = defineComponent(props => { ); }; }, iconsProps); + +export const SoundVolume = defineComponent(props => { + const path = ref(); + + const width = computed(() => props.loc[2] ?? 200); + const height = computed(() => props.loc[3] ?? 200); + const generatePath = adjustPath(1, path, (ox, oy, width, height) => { + const path = new Path2D(); + const left = ox + width / 8; + const top = oy + height / 5; + const bottom = oy + height - height / 5; + path.moveTo(left, height / 2 - height / 10); + path.lineTo(left, height / 2 + height / 10); + path.lineTo(left + width / 6, height / 2 + height / 10); + path.lineTo(width / 2, bottom); + path.lineTo(width / 2, top); + path.lineTo(left + width / 6, height / 2 - height / 10); + path.closePath(); + const cx = width / 2; + const cy = height / 2; + const start = -Math.PI / 4; + const end = Math.PI / 4; + path.moveTo( + width / 2 + (Math.SQRT1_2 * width) / 6, + height / 2 - (Math.SQRT1_2 * width) / 6 + ); + path.arc(cx, cy, width / 6, start, end); + path.moveTo( + width / 2 + (Math.SQRT1_2 * width) / 3, + height / 2 - (Math.SQRT1_2 * width) / 3 + ); + path.arc(cx, cy, width / 3, start, end); + return path; + }); + + watch(props, () => { + generatePath(width.value, height.value); + }); + + onMounted(() => { + generatePath(width.value, height.value); + }); + + return () => { + return ( + + ); + }; +}, iconsProps); + +export const Fullscreen = defineComponent(props => { + const path = ref(); + + const width = computed(() => props.loc[2] ?? 200); + const height = computed(() => props.loc[3] ?? 200); + const generatePath = adjustPath(1, path, (ox, oy, width, height) => { + const path = new Path2D(); + const left = ox + width / 4; + const right = ox + width - width / 4; + const top = oy + height / 4; + const bottom = oy + height - height / 4; + + // 左上 + path.moveTo(left + width / 6, top + height / 6); + path.lineTo(left, top); + path.moveTo(left, top + height / 8); + path.lineTo(left, top); + path.lineTo(left + width / 8, top); + + // 右上 + path.moveTo(right - width / 6, top + height / 6); + path.lineTo(right, top); + path.moveTo(right, top + height / 8); + path.lineTo(right, top); + path.lineTo(right - width / 8, top); + + // 左下 + path.moveTo(left + width / 6, bottom - height / 6); + path.lineTo(left, bottom); + path.moveTo(left, bottom - height / 8); + path.lineTo(left, bottom); + path.lineTo(left + width / 8, bottom); + + // 右下 + path.moveTo(right - width / 6, bottom - height / 6); + path.lineTo(right, bottom); + path.moveTo(right, bottom - height / 8); + path.lineTo(right, bottom); + path.lineTo(right - width / 8, bottom); + return path; + }); + + watch(props, () => { + generatePath(width.value, height.value); + }); + + onMounted(() => { + generatePath(width.value, height.value); + }); + + return () => { + return ( + + ); + }; +}, iconsProps); + +export const ExitFullscreen = defineComponent(props => { + const path = ref(); + + const width = computed(() => props.loc[2] ?? 200); + const height = computed(() => props.loc[3] ?? 200); + const generatePath = adjustPath(1, path, (ox, oy, width, height) => { + const path = new Path2D(); + const left = ox + width / 4; + const right = ox + width - width / 4; + const top = oy + height / 4; + const bottom = oy + height - height / 4; + + // 左上 + path.moveTo(left + width / 6, top + height / 6); + path.lineTo(left, top); + path.moveTo(left + width / 24, top + height / 6); + path.lineTo(left + width / 6, top + height / 6); + path.lineTo(left + width / 6, top + height / 24); + + // 右上 + path.moveTo(right - width / 6, top + height / 6); + path.lineTo(right, top); + path.moveTo(right - width / 24, top + height / 6); + path.lineTo(right - width / 6, top + height / 6); + path.lineTo(right - width / 6, top + height / 24); + + // 左下 + path.moveTo(left + width / 6, bottom - height / 6); + path.lineTo(left, bottom); + path.moveTo(left + width / 24, bottom - height / 6); + path.lineTo(left + width / 6, bottom - height / 6); + path.lineTo(left + width / 6, bottom - height / 24); + + // 右下 + path.moveTo(right - width / 6, bottom - height / 6); + path.lineTo(right, bottom); + path.moveTo(right - width / 24, bottom - height / 6); + path.lineTo(right - width / 6, bottom - height / 6); + path.lineTo(right - width / 6, bottom - height / 24); + return path; + }); + + watch(props, () => { + generatePath(width.value, height.value); + }); + + onMounted(() => { + generatePath(width.value, height.value); + }); + + return () => { + return ( + + ); + }; +}, iconsProps); diff --git a/packages-user/client-modules/src/render/components/tip.tsx b/packages-user/client-modules/src/render/components/tip.tsx index bfe9b8e..93ec101 100644 --- a/packages-user/client-modules/src/render/components/tip.tsx +++ b/packages-user/client-modules/src/render/components/tip.tsx @@ -121,7 +121,7 @@ export const Tip = defineComponent((props, { expose }) => { loc={rectLoc.value} circle={[props.corner ?? 4]} fill - fillStyle="rgba(40,40,40,0.8)" + fillStyle="rgba(0,0,0,0.8)" />