mirror of
https://gitee.com/ice-gl/icegl-three-vue-tres.git
synced 2025-04-05 06:22:43 +08:00
271 lines
14 KiB
Markdown
271 lines
14 KiB
Markdown
# 🧊🧊🧊 TvT.js 🧊🧊🧊
|
||
简体中文 | [English](./README.md)
|
||
## 🎉🎉🎊 三维可视化项目快速落地的开源框架 🎊🎉🎉
|
||
|
||
<p align="center">
|
||
<a target="_black" href="https://space.bilibili.com/410503457">
|
||
<img alt="bilibili" src="https://img.shields.io/badge/dynamic/json?url=https://api.bilibili.com/x/relation/stat?vmid=410503457&query=data.follower&color=282c34&label=冰哥B站&labelColor=FE7398&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAD7ElEQVR4nO2dW9WrMBCFK6ESkFAJSKiESqgEHCABCZWAhEpAAhL2ecik5dDc%2FpXLBDLfWnlqy0xmJ5BMQnq5CIIgCIIgCIIgCIIgCEIBAHQAemYfrgCunD6wAKAHsEKxALgx+bCQD8%2FS9tmgVqeDr1lLigDgZvDhXso+K9TyTBQRwRJ8AHjntl0Flh5QRAQK%2FmKxPeayWx2OXpBNBKiHvi34b7T2MC4pAvW6twR%2FRwkRKPizBN8CgEcuESj4Lwm+BwBjahEk+H8EwJRKhOaCDzW8e1JLfkUUH1NgmR3XmHffHR1l+72BSs8d7w8U+JDAnZERQMcV+CtUi7dNqFqibB4J7vtrq7xKCuAasbTMXCL4T+5aVk6+2xHUrWdhruAR6HIJcOeu2UHI8zyAe2ytWfEdWz9PVvQ8YAmIQ5dDAB9LFsMVAv8oMO2zAGrC5WNIarRiAuKR9jYEd9pY08aa6uUzIHGRdkgKd8pY0yc1WjEBAqypDYoAG0QAZkQAZkQAZkQAZk4vANQenjsSzS3I%2FwcSbXU5jQBUkRtdf4Rar90v8kSv3+I3ffCCSpk8I%2Fw+lgDkdI%2Fv2rEp2CaiWm1AsDQLlDAD+dlFXLMeAaCSeLZdaSFE5VUQNot38cKuEeBgAsSuG0flVZBmEanbXfNQAsS0fgBYIn2fIu3%2FBBMHEyBmDXlFfA8IzeHb+Ems4WAChKykrVA9ZfsQTL57jXzRg4A5wC%2FA8N4ADiZAZwm2XjW75Qh2KOTfA0p4kygPw28OJcCVgn3nDnYo2EwEYRgGH0qAMyICMCMCMCMCMCMCMCMCMCMCfP3qwHDOQ4AAUekTk8FaBRihJnZdYbvtCGC7LvmkM63GjVDINPFrQgCq5ETXfmMzI90FXzPvfqt7x4rEu%2FZaEcCUxFvgz2zO+BUn6UkoaEEAsptiMSX5e8FoRYCN7cVgb4Vq7U%2FH50Pq4JNP7Qiw8UFnJwcK+tXy+Wj6PLEvPgHSHv5UgwA1IQIwwyFAyLJin9RoxYgAzAQIkPwNmf26busC+OIx5TDqo5nDT+F%2FSS%2F9CYzwb+No49zNy2evkYv0LywGGAXUvp6eSneycqOic0w20k7CNgKE7jJunSGLACTCxF27ylmQc98T5MQUH49swd+I0HPXslLKnT0N+wnkrTKi9JZL%2FL9i1SorMmdeQ4TQQ7OFMxIMzGD45w8nUL1im7efENZLJpgPSw0pfz0cdt4U3230Td%2FTvx2R6d2FrHhEWLkq5PELOMsRPHCPnAZGv1xJteL7jbJiaW3sB2nDvPC%2FosSYvjRQz4cJ6n7KO3rYQL7M+L6nVtfDVRAEQRAEQRAEQRAEIZ5%2FSAXmdfXaoQsAAAAASUVORK5CYII%3D&cacheSeconds=3600">
|
||
</a>
|
||
<a href="https://github.com/hawk86104/three-vue-tres" target="_blank">
|
||
<img src="https://img.shields.io/github/stars/hawk86104/three-vue-tres" />
|
||
</a>
|
||
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/hawk86104/three-vue-tres">
|
||
<img src="https://img.shields.io/github/license/hawk86104/three-vue-tres" />
|
||
<a target="_black" href="https://gitee.com/ice-gl/icegl-three-vue-tres">
|
||
<img src="https://gitee.com/ice-gl/icegl-three-vue-tres/badge/star.svg?theme=dark" alt="gitee-starts" />
|
||
</a>
|
||
<a target="_black" href="https://gitcode.com/hawk86104/icegl-three-vue-tres">
|
||
<img src="https://gitcode.com/hawk86104/icegl-three-vue-tres/star/badge.svg?theme=dark" alt="gitcode-starts" />
|
||
</a>
|
||
<a target="_black" href="https://space.bilibili.com/384558900">
|
||
<img alt="bilibili" src="https://img.shields.io/badge/dynamic/json?url=https://api.bilibili.com/x/relation/stat?vmid=384558900&query=data.follower&color=282c34&label=地虎B站&labelColor=FE7398&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAD7ElEQVR4nO2dW9WrMBCFK6ESkFAJSKiESqgEHCABCZWAhEpAAhL2ecik5dDc%2FpXLBDLfWnlqy0xmJ5BMQnq5CIIgCIIgCIIgCIIgCEIBAHQAemYfrgCunD6wAKAHsEKxALgx+bCQD8%2FS9tmgVqeDr1lLigDgZvDhXso+K9TyTBQRwRJ8AHjntl0Flh5QRAQK%2FmKxPeayWx2OXpBNBKiHvi34b7T2MC4pAvW6twR%2FRwkRKPizBN8CgEcuESj4Lwm+BwBjahEk+H8EwJRKhOaCDzW8e1JLfkUUH1NgmR3XmHffHR1l+72BSs8d7w8U+JDAnZERQMcV+CtUi7dNqFqibB4J7vtrq7xKCuAasbTMXCL4T+5aVk6+2xHUrWdhruAR6HIJcOeu2UHI8zyAe2ytWfEdWz9PVvQ8YAmIQ5dDAB9LFsMVAv8oMO2zAGrC5WNIarRiAuKR9jYEd9pY08aa6uUzIHGRdkgKd8pY0yc1WjEBAqypDYoAG0QAZkQAZkQAZkQAZk4vANQenjsSzS3I%2FwcSbXU5jQBUkRtdf4Rar90v8kSv3+I3ffCCSpk8I%2Fw+lgDkdI%2Fv2rEp2CaiWm1AsDQLlDAD+dlFXLMeAaCSeLZdaSFE5VUQNot38cKuEeBgAsSuG0flVZBmEanbXfNQAsS0fgBYIn2fIu3%2FBBMHEyBmDXlFfA8IzeHb+Ems4WAChKykrVA9ZfsQTL57jXzRg4A5wC%2FA8N4ADiZAZwm2XjW75Qh2KOTfA0p4kygPw28OJcCVgn3nDnYo2EwEYRgGH0qAMyICMCMCMCMCMCMCMCMCMCMCfP3qwHDOQ4AAUekTk8FaBRihJnZdYbvtCGC7LvmkM63GjVDINPFrQgCq5ETXfmMzI90FXzPvfqt7x4rEu%2FZaEcCUxFvgz2zO+BUn6UkoaEEAsptiMSX5e8FoRYCN7cVgb4Vq7U%2FH50Pq4JNP7Qiw8UFnJwcK+tXy+Wj6PLEvPgHSHv5UgwA1IQIwwyFAyLJin9RoxYgAzAQIkPwNmf26busC+OIx5TDqo5nDT+F%2FSS%2F9CYzwb+No49zNy2evkYv0LywGGAXUvp6eSneycqOic0w20k7CNgKE7jJunSGLACTCxF27ylmQc98T5MQUH49swd+I0HPXslLKnT0N+wnkrTKi9JZL%2FL9i1SorMmdeQ4TQQ7OFMxIMzGD45w8nUL1im7efENZLJpgPSw0pfz0cdt4U3230Td%2FTvx2R6d2FrHhEWLkq5PELOMsRPHCPnAZGv1xJteL7jbJiaW3sB2nDvPC%2FosSYvjRQz4cJ6n7KO3rYQL7M+L6nVtfDVRAEQRAEQRAEQRAEIZ5%2FSAXmdfXaoQsAAAAASUVORK5CYII%3D&cacheSeconds=3600">
|
||
</a>
|
||
</p>
|
||
|
||
## 🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊🧊
|
||
|
||
```shell
|
||
如果对您有帮助,您可以点右上角 “Star⭐” 收藏一下 ,您的star就是我开发的动力,感谢!
|
||
```
|
||
|
||
> B 站上对此项目的视频说明点击下方 👇🏻 跳转
|
||
|
||
<a style="display:block;width:800px;max-width:100%;" href="https://www.bilibili.com/video/BV1mfCcYeE9E"><img src="./preview/bilibili.gif" alt="tres.js webgl three.js"></a>
|
||
|
||
# 生态 `@ThreeJS @Vue3.x @TresJS`
|
||
|
||
> icegl 出品,永久开源且免费商用,持续更新 ing,请点击右上角 start⭐ 关注
|
||
|
||
本项目融合于三大生态系统中:
|
||
|
||
- 🎲 ThreeJS \* [点击详情](https://threejs.org)
|
||
<a href="https://www.npmjs.com/package/three">
|
||
<img src="https://img.shields.io/npm/v/three?label=three">
|
||
</a>
|
||
ThreeJS 大名鼎鼎的基于浏览器渲染,JavaScript 语言的 3D 库。<br/><br/>
|
||
|
||
- 🍀 Vue3.x \* [点击详情](https://cn.vuejs.org)
|
||
<a href="https://www.npmjs.com/package/vue">
|
||
<img src="https://img.shields.io/npm/v/vue?label=vue&color=%2342b883">
|
||
</a>
|
||
易学易用,性能出色,适用场景丰富的 Web 前端框架。<br/><br/>
|
||
|
||
- ⚡ TresJS \* [点击详情](https://tresjs.org)
|
||
<a href="https://www.npmjs.com/package/@tresjs/core">
|
||
<img src="https://img.shields.io/npm/v/@tresjs/core?color=%2382DBCA&label=%40tresjs%2Fcore&logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTExLjY4NTQgMy40MjkxNkMxMi4wNzM4IDIuNzgxODIgMTMuMDEyIDIuNzgxODIgMTMuNDAwNCAzLjQyOTE1TDE5LjE3NzEgMTMuMDU2OUMxOS41NzcgMTMuNzIzNSAxOS4wOTY5IDE0LjU3MTQgMTguMzE5NiAxNC41NzE0SDYuNzY2MjRDNS45ODg5NCAxNC41NzE0IDUuNTA4ODMgMTMuNzIzNSA1LjkwODc1IDEzLjA1NjlMMTEuNjg1NCAzLjQyOTE2WiIgZmlsbD0iIzgyREJDNSIvPgo8cGF0aCBkPSJNMTUuNjg1NyAxMC41NDI5QzE1LjY4NTcgOS45OTA1OSAxNi4xMzM0IDkuNTQyODggMTYuNjg1NyA5LjU0Mjg4SDI2QzI2LjU1MjIgOS41NDI4OCAyNyA5Ljk5MDU5IDI3IDEwLjU0MjlWMTkuODU3MkMyNyAyMC40MDk0IDI2LjU1MjIgMjAuODU3MiAyNiAyMC44NTcySDE2LjY4NTdDMTYuMTMzNCAyMC44NTcyIDE1LjY4NTcgMjAuNDA5NCAxNS42ODU3IDE5Ljg1NzJWMTAuNTQyOVoiIGZpbGw9IiM0RjRGNEYiLz4KPGNpcmNsZSBjeD0iMTYiIGN5PSIyMiIgcj0iNiIgZmlsbD0iI0VGQUMzNSIvPgo8L3N2Zz4K" alt="npm package">
|
||
</a>
|
||
使用 Vue3.x 组件实现声明式的 ThreeJS,做属于前端的三维项目。<br/><br/>
|
||
|
||
## 🏕 点击预览:[🌏 opensource.icegl.cn](https://opensource.icegl.cn)
|
||
|
||
- 如果访问太慢,请访问镜像站点1:[🌏 oss.icegl.cn](http://oss.icegl.cn/)
|
||
- 如果访问太慢,请访问镜像站点2:[🌏 myhome.217dan.com:8899](http://myhome.217dan.com:8899/)
|
||
- 如果有条件翻墙,也可直接访问 github 的镜像站:[🌏 https://hawk86104.github.io](https://hawk86104.github.io/)
|
||
- 全案例微信小程序生态:[🌏 微信内打开](#小程序://三维开源/456pgpJZBiTctdK)
|
||
- 全案例微信小程序扫码:<img src="./preview/miniqr.jpg" width="166" alt="tres.js webgl three.js">
|
||
|
||
```shell
|
||
因项目经常更新编译,如发现访问错误,请清空浏览器缓存。
|
||
```
|
||
<a href="https://opensource.icegl.cn"><img src="./preview/p1.gif" alt="three.js tres.js webgl tvt.js"></a>
|
||
<a href="https://opensource.icegl.cn"><img src="./preview/p2.gif" alt="three.js tres.js webgl tvt.js"></a>
|
||
<a href="https://opensource.icegl.cn"><img src="./preview/p3.gif" alt="three.js tres.js webgl tvt.js"></a>
|
||
<a href="https://opensource.icegl.cn"><img src="./preview/p4.gif" alt="three.js tres.js webgl tvt.js"></a>
|
||
|
||
更多演示请进入预览页面
|
||
|
||
# 优势
|
||
|
||
- 🌈 前端の基本素养 \* FesJS [点击详情](https://fesjs.mumblefe.cn)<br/>
|
||
<a href="https://www.npmjs.com/package/@fesjs/fes">
|
||
<img src="https://img.shields.io/npm/v/%40fesjs%2Ffes?label=%40fesjs%2Ffes">
|
||
</a><br/>
|
||
集成封装项目落地的常用库:图标、多语言、API 接口调用、Vuex/Pinia、model 数据封装、页面 layout/权限 access、路由管理等。<br/>
|
||
|
||
- 🌠 像写 Vue3.x 一样写三维可视化项目[点击详情](https://tresjs.org/guide)<br/>
|
||
<br/>
|
||
全功能版本追溯保持 threeJS 最新版本 \* TresJS
|
||
最新 Vue3.x 的语法糖写法,TS/JS 通吃,让你以最新最爽快的方式构建三维可视化项目
|
||
|
||
```html
|
||
<template>
|
||
<TresCanvas window-size>
|
||
<TresPerspectiveCamera />
|
||
<TresMesh>
|
||
<TresTorusGeometry :args="[1, 0.5, 16, 32]" />
|
||
<TresMeshBasicMaterial color="orange" />
|
||
</TresMesh>
|
||
</TresCanvas>
|
||
</template>
|
||
<script setup lang="ts">
|
||
import { useRenderLoop, useTexture } from '@tresjs/core'
|
||
//读取材质
|
||
const pTexture = await useTexture(['./**.jpg', './**.png'])
|
||
const { onLoop } = useRenderLoop()
|
||
onLoop(({ delta }) => {
|
||
//循环render
|
||
})
|
||
</script>
|
||
```
|
||
|
||
### 敬请右上角一键三连: 关注 💛 点赞 ⭐ fork👣
|
||
|
||
# ✅ 快速开始
|
||
|
||
```js
|
||
1、git clone 或者 直接下载 本项目
|
||
|
||
2、cd 到项目根目录
|
||
|
||
3、yarn // 安装依赖
|
||
|
||
4、yarn pre.dev // 预览 下的调试模式
|
||
|
||
5、yarn dev // 自己项目 下的调试模式
|
||
|
||
6、yarn pre.build // 预览 下的编译打包
|
||
|
||
7、yarn build // 自己项目 下的编译打包
|
||
|
||
8、yarn pre.dev.one // 只展示某一个案例/插件
|
||
|
||
9、yarn pre.build.one // 针对某一个案例/插件打包,会根据配置下的依赖插件项保留资源,其余资源删除
|
||
|
||
10、yarn both // 同时启动 dev 和 pre.dev 可以边调试自己得项目,边对照移植样例和插件
|
||
```
|
||
|
||

|
||
|
||
# 📖 文档
|
||
|
||
## 使用说明:[🌏docs.icegl.cn](https://docs.icegl.cn/)
|
||
<table style="border: none; width: 100%; text-align: center;">
|
||
<tr>
|
||
<td style="padding:10px;font-size:1.2em;">
|
||
<a href="https://docs.icegl.cn/docs/three-vue-tres/editor/threeeditor.html">
|
||
三维编辑器:[ 📊原生编辑器+插件生成器 ]
|
||
</a>
|
||
</td>
|
||
<td style="padding:10px;font-size:1.2em;">
|
||
<a href="https://docs.icegl.cn/docs/three-vue-tres/editor/goview.html">
|
||
UI 编辑器:[ 📊GoView导出+配置导入组件 ]
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="padding: 10px;">
|
||
<a href="https://docs.icegl.cn/docs/three-vue-tres/editor/threeeditor.html" style="display:block;max-width:100%;">
|
||
<img src="https://docs.icegl.cn/editor.png" alt="tres.js webgl">
|
||
</a>
|
||
</td>
|
||
<td style="padding: 10px;">
|
||
<a href="https://docs.icegl.cn/docs/three-vue-tres/editor/goview.html" style="display:block;max-width:100%;">
|
||
<img src="./preview/goViewPlugin.png" alt="tres.js webgl">
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
# 🧩 丰富的[插件应用市场🌏tvtstore](https://www.icegl.cn/tvtstore)
|
||
#### [🌏www.icegl.cn/tvtstore](https://www.icegl.cn/tvtstore) 包含各式各样的项目场景和功能。插件是 ICE 社区生态中重要的一环,在应用市场中完整应用和普通插件统一称为插件。<br/>
|
||
<table style="border: none; width: 100%; text-align: center;">
|
||
<tr>
|
||
<td style="padding:10px;font-size:1.2em;">
|
||
<a href="https://www.icegl.cn/tvtstore">
|
||
插件应用市场
|
||
</a>
|
||
</td>
|
||
<td style="padding:10px;font-size:1.2em;">
|
||
<a href="https://www.icegl.cn/p/tvtdeveloper">
|
||
成为作者,加入我们
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="padding: 10px;">
|
||
<a href="https://www.icegl.cn/tvtstore" style="display:block;max-width:100%;">
|
||
<img src="./preview/tvtstore.png" alt="tres.js webgl">
|
||
</a>
|
||
</td>
|
||
<td style="padding: 10px;">
|
||
<a href="https://www.icegl.cn/p/tvtdeveloper" style="display:block;max-width:100%;">
|
||
<img src="./preview/findyou.png" alt="tres.js webgl">
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
# ❓ 问题反馈
|
||
|
||
在使用中有任何问题,请使用以下联系方式联系我们
|
||
|
||
### 问答社区: [图形学社区 icegl.cn](https://www.icegl.cn/ask)
|
||
|
||
<a href="https://www.icegl.cn/ask" style="display:block;width:800px;max-width:100%;">
|
||
<img src="./preview/ask01.png" alt="图形学问答社区"></a>
|
||
|
||
#### 社区贡献者以及达人: [向他们提问](https://icegl.cn/ask/experts)
|
||
<a href="https://icegl.cn/ask/experts.html" style="display:block;width:800px;max-width:100%;">
|
||
<img src="./preview/ask02.png" alt="图形学问答社区"></a>
|
||
|
||
### 欢迎大家也加入微信群,QQ群,已有几个群已满,一起学习讨论 webgl。加微信我拉进群
|
||
<table style="border: none; width: 60%; text-align: center;">
|
||
<tr>
|
||
<td style="padding:10px;font-size:1.2em;">
|
||
微信小程序生态
|
||
</td>
|
||
<td style="padding:10px;font-size:1.2em;">
|
||
微信群
|
||
</td>
|
||
<td style="padding:10px;font-size:1.2em;">
|
||
<a href="https://qm.qq.com/q/34V4hTtvbq">
|
||
QQ群: 795714357
|
||
</a>
|
||
</td>
|
||
<td style="padding:10px;font-size:1.2em;">
|
||
公众号: ICE图形学社区
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="padding: 10px;">
|
||
<p style="display:block;max-width:100%;">
|
||
<img src="./preview/miniqr.jpg" alt="tres.js webgl">
|
||
</p>
|
||
</td>
|
||
<td style="padding: 10px;">
|
||
<p style="display:block;max-width:100%;">
|
||
<img src="./preview/wx.png" alt="tres.js webgl">
|
||
</p>
|
||
</td>
|
||
<td style="padding: 10px;">
|
||
<a href="https://qm.qq.com/q/34V4hTtvbq" style="display:block;max-width:100%;">
|
||
<img src="./preview/qqq.png" alt="tres.js webgl">
|
||
</a>
|
||
</td>
|
||
<td style="padding: 10px;">
|
||
<p style="display:block;max-width:100%;">
|
||
<img src="./preview/wxgzh.jpg" alt="tres.js webgl">
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
# ⭐ 点星历史
|
||
|
||
[](https://star-history.com/#hawk86104/three-vue-tres&hawk86104/vue3-ts-cesium-map-show&Date)
|
||
|
||
# ™️ 版权信息
|
||
|
||
本项目遵循 Apache2 开源协议发布,并提供永久免费使用以及商用。
|
||
|
||
> 如果您将此项目用于商业用途,请遵守 Apache2.0 协议并保留作者技术支持声明。
|
||
|
||
- 二次开发如用于商业性质或开源竞品请不要删除和修改 TvT.js 源码头部的版权与作者声明及出处
|
||
- 允许进行商用,但是不允许二次开源出来并进行收费
|
||
|
||
本项目包含的第三方源码和二进制文件之版权信息另行标注。
|
||
|
||
版权所有 Copyright © 2022-2026 by 🧊icegl (https://www.icegl.cn)
|
||
|
||
All rights reserved。
|