1
0
This commit is contained in:
2026-01-04 16:51:15 +08:00
parent 5d3c95d111
commit c15e3c16d8
6 changed files with 48 additions and 48 deletions

View File

@@ -8,15 +8,11 @@ import tailwindcss from '@tailwindcss/vite';
const isDev = process.env.NODE_ENV === 'development';
const plugins = [tailwindcss()];
let target = process.env.VITE_API_URL || 'https://localhost:51015';
let target = process.env.VITE_API_URL || 'https://localhost:51515';
const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' };
let proxy = {
'/root/center/': {
target: `${target}/root/center/`,
},
'/user/login/': {
target: `${target}/user/login/`,
},
'/root/center/': apiProxy,
'/user/login/': apiProxy,
'/api': apiProxy,
'/client': apiProxy,
};

View File

@@ -41,7 +41,7 @@ export const Main = () => {
<article className='container mx-auto px-6 py-16 bg-gray-50'>
{/* 主标题区域 */}
<div className='text-center mb-16'>
<h1 className='text-5xl font-bold text-gray-900 mb-6'></h1>
<h1 className='text-5xl font-bold text-gray-900 mb-6'></h1>
<p className='text-xl text-gray-600 max-w-4xl mx-auto leading-relaxed'>
使
</p>

View File

@@ -1,7 +1,7 @@
import { createEditor } from '@kevisual/codemirror';
import { Chain } from '@kevisual/codemirror/utils';
import { useEffect, useRef } from 'react';
import { CacheWorkspace } from '@kevisual/cache';
import { MyCache } from '@kevisual/cache';
export const chain = new Chain();
type TextEditorProps = {
@@ -27,7 +27,7 @@ export const TextEditor = ({ content, chain, onChange }: TextEditorProps) => {
}, [content]);
const initEditor = async () => {
if (!editorElRef.current) return;
const cache = new CacheWorkspace();
const cache = new MyCache();
const editor = createEditor(editorElRef.current, {
type: 'html',
onChange: (value) => {

View File

@@ -207,7 +207,8 @@ export const render = () => {
scene.fog = new THREE.Fog(0x0a0a1a, 10, 50);
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.set(0, 8, 12);
// camera.position.set(0, 8, 12);
camera.position.set(0, 16, 24);
camera.lookAt(0, 2, 0);
const renderer = new THREE.WebGLRenderer({ antialias: true });
@@ -499,7 +500,8 @@ export const render = () => {
// 创建 CSS3DObject
const css3dObject = new CSS3DObject(div);
css3dObject.position.set(0, 3.5, 0); // 居中显示
css3dObject.rotation.y = 0; // 面向正前方
// 让面板面向相机(使用 lookAt)
css3dObject.lookAt(camera.position);
css3dObject.scale.set(0.01, 0.01, 0.01); // 缩放以适应场景
scene.add(css3dObject);