From 24cebd21796949819bcb4e67edf8aeede9f688e1 Mon Sep 17 00:00:00 2001 From: yinsx Date: Mon, 5 Jan 2026 17:41:00 +0800 Subject: [PATCH] 1 --- cursor.md | 342 ++++++++++++++++++--------------- public/docs/camera-light.md | 43 +++++ public/docs/config-template.md | 30 +++ public/docs/hotspot-events.md | 40 ++++ public/docs/import-guide.md | 46 +++++ public/docs/model-material.md | 38 ++++ public/docs/quickstart.md | 35 ++++ src/App.vue | 58 ++---- src/config/site.ts | 5 +- src/router/index.ts | 7 +- src/views/CooperationPage.vue | 116 ----------- src/views/FeaturesPage.vue | 326 +++++++++++-------------------- src/views/MarkdownPage.vue | 19 +- 13 files changed, 569 insertions(+), 536 deletions(-) create mode 100644 public/docs/camera-light.md create mode 100644 public/docs/config-template.md create mode 100644 public/docs/hotspot-events.md create mode 100644 public/docs/import-guide.md create mode 100644 public/docs/model-material.md create mode 100644 public/docs/quickstart.md delete mode 100644 src/views/CooperationPage.vue diff --git a/cursor.md b/cursor.md index ba02f54..02ff48e 100644 --- a/cursor.md +++ b/cursor.md @@ -1,178 +1,204 @@ -# AI Code Generation Prompts: Startup Website Clone -**Tech Stack:** Vite + Vue 3 (Script Setup) + Tailwind CSS + Lucide Icons +# Web3D 场景 SDK 使用说明 + +本 SDK 用于在 Web 场景中快速完成三维展示与交互,核心能力包括:相机修改、灯光调参、环境贴图切换、按配置渲染热点、热点驱动抛出事件、模型热加载/热销毁/热替换,以及按部件切换材质。 --- -## 🟢 Step 0: Project Setup (Global System Prompt) -*在开始编写具体页面前,先发送这条指令,建立全局的设计规范和技术栈。* - -**Prompt:** - -> **Role:** Senior Frontend Developer specializing in Pixel-Perfect UI cloning. -> -> **Tech Stack Requirements:** -> - **Framework:** Vue 3 (Composition API with ` + ``` +2. 获取实例并初始化: + ```js + const kernel = window.faceSDK?.kernel + if (!kernel) { + console.error('SDK 未加载') + } else { + kernel.init({ + container: 'renderDom', // 容器 ID(canvas) + modelUrlList: ['./model.glb'], // 模型列表 + env: { hdrPath: '/hdr/my.env' }, // 环境贴图等参数 + }) + } + ``` + +## 模块化(ESM) +1. 在 ` - - diff --git a/src/views/FeaturesPage.vue b/src/views/FeaturesPage.vue index 31d393b..41de961 100644 --- a/src/views/FeaturesPage.vue +++ b/src/views/FeaturesPage.vue @@ -1,19 +1,19 @@