Needle Engine 文档
Downloads
  • What is Needle Engine?
  • 用户评价
  • Get an overview

    • Samples and Showcase
    • 我们的愿景 🔮
    • 功能概览
    • 技术概述
  • Resources

    • Pricing and Plans
    • Changelog
    • API Documentation
    • Support & Community
  • Integrations

    • Unity 版 Needle Engine
    • 适用于 Blender 的 Needle Engine
    • Needle Engine 作为 Web Component
    • 在您的网站上使用 Needle Engine
    • Needle Cloud
  • Topics

    • Web 项目结构
    • Everywhere Actions
    • Exporting Assets to glTF
    • 框架、打包器、HTML
    • 在本地设备上测试
    • 部署与优化
  • Advanced

    • 网络
    • VR 和 AR (WebXR)
    • /lang/zh/vanilla-js.html
    • 编辑器同步
  • Troubleshooting

    • 如何调试
    • 常见问题 (FAQ) 💡
    • Get Help
  • Videos

    • Tutorials on Youtube
    • Interviews on Youtube
  • Scripting Overview

    • 在 Needle Engine 中编写脚本
    • 面向 Unity 开发者的脚本编写简介
    • Needle 核心组件
    • Everywhere Actions
  • Components and Lifecycle

    • Creating and using Components
    • @serializable 和其他装饰器
    • 自动生成组件
    • 脚本示例
    • Community Contributions
    • 附加模块
  • Settings and APIs

    • <needle-engine> 配置
    • needle.config.json
    • Needle Engine API
    • three.js API
Help
Samples
Pricing
  • Needle Website
  • Needle Cloud
  • Support Community
  • Discord Server
  • X/Twitter
  • YouTube
  • Newsletter
  • Email
  • Feedback
  • Github
  • English
  • 简体中文
  • Español
  • Português
  • Français
  • हिन्दी
  • 日本語
  • Deutsch
  • Tiếng Việt
Downloads
  • What is Needle Engine?
  • 用户评价
  • Get an overview

    • Samples and Showcase
    • 我们的愿景 🔮
    • 功能概览
    • 技术概述
  • Resources

    • Pricing and Plans
    • Changelog
    • API Documentation
    • Support & Community
  • Integrations

    • Unity 版 Needle Engine
    • 适用于 Blender 的 Needle Engine
    • Needle Engine 作为 Web Component
    • 在您的网站上使用 Needle Engine
    • Needle Cloud
  • Topics

    • Web 项目结构
    • Everywhere Actions
    • Exporting Assets to glTF
    • 框架、打包器、HTML
    • 在本地设备上测试
    • 部署与优化
  • Advanced

    • 网络
    • VR 和 AR (WebXR)
    • /lang/zh/vanilla-js.html
    • 编辑器同步
  • Troubleshooting

    • 如何调试
    • 常见问题 (FAQ) 💡
    • Get Help
  • Videos

    • Tutorials on Youtube
    • Interviews on Youtube
  • Scripting Overview

    • 在 Needle Engine 中编写脚本
    • 面向 Unity 开发者的脚本编写简介
    • Needle 核心组件
    • Everywhere Actions
  • Components and Lifecycle

    • Creating and using Components
    • @serializable 和其他装饰器
    • 自动生成组件
    • 脚本示例
    • Community Contributions
    • 附加模块
  • Settings and APIs

    • <needle-engine> 配置
    • needle.config.json
    • Needle Engine API
    • three.js API
Help
Samples
Pricing
  • Needle Website
  • Needle Cloud
  • Support Community
  • Discord Server
  • X/Twitter
  • YouTube
  • Newsletter
  • Email
  • Feedback
  • Github
  • English
  • 简体中文
  • Español
  • Português
  • Français
  • हिन्दी
  • 日本語
  • Deutsch
  • Tiếng Việt
  • Getting Started

    • Downloads
    • Needle Engine for Unity
    • Needle Engine for Blender
    • Needle Engine as Web Component
    • Needle Engine on your Website
    • Needle Cloud
    • Custom integrations
    • Support and Community
  • Core Concepts

    • Web 项目结构
    • Everywhere Actions
    • Exporting Assets to glTF
    • 框架、打包器、HTML
    • 在本地设备上测试
    • 部署与优化
    • 如何调试
    • 常见问题 (FAQ) 💡
  • Scripting

    • 在 Needle Engine 中编写脚本
    • 面向 Unity 开发者的脚本编写简介
    • Creating and using Components
    • 自动生成组件
    • 脚本示例
    • Community Contributions
  • Advanced

    • VR 和 AR (WebXR)
    • 网络
    • 编辑器同步
  • Reference

    • 功能概览
    • 技术概述
    • Needle 核心组件
    • needle.config.json
    • <needle-engine> 配置
    • @serializable 和其他装饰器

Needle Engine 项目结构

Web 项目文件

Needle Engine
needle.config.jsonNeedle Engine 构建和集成的配置
生态系统
package.json包含名称、版本、依赖项和脚本的项目配置
tsconfig.jsonTypescript 编译器配置
.gitignore在 git 中忽略的文件和文件夹
vite.config.js包含 vite 特定的配置。
它也添加了 Needle Engine vite 插件。

默认的 Vite 项目结构

我们的主要项目模板使用超快的 vite 打包器。以下显示了我们创建和交付的 Vite 模板结构(尽管可以根据您的需要进行调整)。

| | | | --- | | | 文件夹 | | | assets/ | 资产文件夹包含从 Unity 导出的资产。例如,生成的 gltf 文件、音频或视频文件。不建议手动添加文件到 assets,因为在构建项目分发版本时会清除该文件夹。 | | include/ | (可选)- 如果您有需要引用/加载的自定义资产,请将它们添加到 include 目录。构建时,此目录将被复制到输出文件夹。 | | src/generated/ | 生成的 javascript 代码。请勿手动编辑! | | src/scripts/ | 您的项目特定脚本/组件 | | src/styles/ | 样式表 | | * | 您可以随意在此处添加任何新文件夹。请确保在构建时将它们 复制 到输出目录 | | 文件 | | | index.html | 您网站的着陆页或主页 | | vite.config | vite 配置。在此处进行构建分发和托管开发服务器的设置。通常不需要编辑这些设置。 | | src/main.ts | 从 index.html 包含并导入 needle-engine | | * | 您可以随意在此处添加任何新文件。请确保在构建时将它们 复制 到输出目录(除非它们仅在开发期间使用) |

我们的导出器也可以与其他项目结构一起使用,vite 只是我们首选的前端打包工具,因为它速度快。请随意按照您喜欢的方式设置您的 JavaScript 项目。

在文档中了解更多关于打包以及与其他框架的使用


继续阅读

  • 面向 Unity 开发者的 Typescript 指南
  • Typescript 要点
  • 编写自定义脚本
  • Everywhere Actions

页面由 AI 自动翻译

Suggest changes
最近更新:: 2025/6/11 12:25
Next
Everywhere Actions