update
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user