Merge branch 'master' into online

# Conflicts:
#	.fes.js
This commit is contained in:
hawk86104 2023-11-17 16:36:38 +08:00
commit de926d08b1
49 changed files with 825 additions and 519 deletions

View File

@ -4,7 +4,7 @@
* @Autor: 地虎降天龙
* @Date: 2023-10-16 10:53:09
* @LastEditors: 地虎降天龙
* @LastEditTime: 2023-11-16 16:09:31
* @LastEditTime: 2023-11-17 16:35:40
*/
// import { resolve } from 'path';
import { join } from 'path';

View File

@ -16,18 +16,22 @@
> icegl出品永久开源且免费商用持续更新ing请点击右上角start⭐关注
本项目融合于三大生态系统中:
- 🎲 ThreeJS * [点击详情](https://threejs.org)<br/>
![npm](https://img.shields.io/npm/v/three?label=three)<br/>
ThreeJS大名鼎鼎的基于浏览器渲染JavaScript语言的3D库。
- 🎲 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)<br/>
![npm](https://img.shields.io/npm/v/vue?label=vue&color=%2342b883)<br/>
易学易用,性能出色,适用场景丰富的 Web 前端框架。
- 🍀 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)
- ⚡ TresJS * [点击详情](https://tresjs.org)<br/>
<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>
![npm](https://img.shields.io/npm/v/%40tresjs%2Fcientos?label=%40tresjs%2Fcientos)<br/>
使用Vue3.x组件实现声明式的ThreeJS做属于前端的三维项目。
使用Vue3.x组件实现声明式的ThreeJS做属于前端的三维项目。<br/><br/>
# 🏕点击预览:[🌏opensource.icegl.cn](http://opensource.icegl.cn)
![展示](./preview/数字城市1.gif)
@ -38,14 +42,15 @@ ThreeJS大名鼎鼎的基于浏览器渲染JavaScript语言的3D库。
更多演示请进入预览页面
# 优势
- 🌈 前端の基本素养 * FesJS [点击详情](https://fesjs.mumblefe.cn)<br/>
![npm](https://img.shields.io/npm/v/%40fesjs%2Ffes?label=%40fesjs%2Ffes)
集成封装项目落地的常用库图标、多语言、API接口调用、Vuex/Pinia、model数据封装、页面layout/权限access、路由管理等。
- 🌈 前端の基本素养 * FesJS [点击详情](https://fesjs.mumblefe.cn)
<a href="https://www.npmjs.com/package/@fesjs/fes">
<img src="https://img.shields.io/npm/v/%40fesjs%2Ffes?label=%40fesjs%2Ffes">
</a>
集成封装项目落地的常用库图标、多语言、API接口调用、Vuex/Pinia、model数据封装、页面layout/权限access、路由管理等。<br/>
- 🌠 像写Vue3.x一样写三维可视化项目[点击详情](https://tresjs.org/guide)
全功能版本追溯保持threeJS最新版本 * TresJS
![npm](https://img.shields.io/npm/v/%40tresjs%2Fcientos?label=%40tresjs%2Fcientos)全功能版本追溯保持threeJS最新版本 * TresJS
最新Vue3.x的语法糖写法TS/JS通吃让你以最新最爽快的方式构建三维可视化项目
```html
@ -68,8 +73,7 @@ ThreeJS大名鼎鼎的基于浏览器渲染JavaScript语言的3D库。
})
</script>
```
- 🧩 丰富的插件应用市场
- 🧩 丰富的插件应用市场<br/>
插件中心包含各式各样的项目场景和功能。插件是ICE社区生态中重要的一环在应用市场中完整应用和普通插件统一称为插件。
### 我们将会逐一把落地的项目以插件的形式加入到此开源框中...

2
dist/index.html vendored
View File

@ -4,4 +4,4 @@
hm.src = "https://hm.baidu.com/hm.js?3c442b1ada04ec23771dfc94ea581c10";
const s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();</script><script type="module" crossorigin src="/icegl-three-vue-tres/static/index-a8aa3f05.js"></script><link rel="modulepreload" crossorigin href="/icegl-three-vue-tres/static/vendor-524e5929.js"><link rel="stylesheet" href="/icegl-three-vue-tres/static/vendor-28ba1523.css"><link rel="stylesheet" href="/icegl-three-vue-tres/static/index-e43837b0.css"></head><body><div id="app"></div></body></html>
})();</script><script type="module" crossorigin src="/icegl-three-vue-tres/static/index-5accba09.js"></script><link rel="modulepreload" crossorigin href="/icegl-three-vue-tres/static/vendor-e1483ee8.js"><link rel="stylesheet" href="/icegl-three-vue-tres/static/vendor-28ba1523.css"><link rel="stylesheet" href="/icegl-three-vue-tres/static/index-e43837b0.css"></head><body><div id="app"></div></body></html>

View File

@ -1 +1 @@
import{Y as b,j as m,az as _,a5 as y,ae as w,Z as u,o as d,s,B as C,I as p,V as g}from"./vendor-524e5929.js";import{_ as f,l as h,a as B,b as x}from"./pagesShow.vue_vue_type_style_index_0_lang-4a631ac6.js";import"./_commonjsHelpers-725317a4.js";const L=b({__name:"buildings",async setup(k){let e,r;const n=m(!1),c=([e,r]=_(()=>h()),e=await e,r(),e);n.value=!0,y(()=>{const l=new w({title:"建筑效果",expanded:!0}),o=l.addFolder({title:"线条"});o.addBinding(i,"show",{label:"显示"}),o.addBinding(i,"color",{label:"颜色"}),o.addBinding(i,"width",{label:"宽度",min:0,max:10,step:1}),o.addBinding(i,"opacity",{label:"透明度",min:0,max:1,step:.1});const t=l.addFolder({title:"建筑物"});t.addBinding(a,"show",{label:"显示"}),t.addBinding(a,"bulidingsColor",{label:"楼宇颜色"}),t.addBinding(a,"gradient",{label:"渐变"}),t.addBinding(a,"opacity",{label:"透明度",min:0,max:1,step:.1}),t.addBinding(a,"landColor",{label:"地面颜色"})});const i=u({width:1,color:"#000",opacity:1,show:!0}),a=u({bulidingsColor:"#e523ff",landColor:"#112233",opacity:.9,show:!0,gradient:!0});return(l,o)=>(d(),s(f,{showBuildings:!1},{ability:C(()=>[a.show&&n.value?(d(),s(B,{key:0,model:p(c),bulidingsColor:a.bulidingsColor,landColor:a.landColor,gradient:a.gradient,opacity:a.opacity},null,8,["model","bulidingsColor","landColor","gradient","opacity"])):g("",!0),i.show&&n.value?(d(),s(x,{key:1,builds:p(c).city,width:i.width,color:i.color,opacity:i.opacity},null,8,["builds","width","color","opacity"])):g("",!0)]),_:1}))}});export{L as default};
import{Y as b,j as m,az as _,a5 as y,ae as w,Z as u,o as d,s,B as C,I as p,V as g}from"./vendor-e1483ee8.js";import{_ as f,l as h,a as B,b as x}from"./pagesShow.vue_vue_type_style_index_0_lang-394dddd1.js";import"./_commonjsHelpers-725317a4.js";const L=b({__name:"buildings",async setup(k){let e,r;const n=m(!1),c=([e,r]=_(()=>h()),e=await e,r(),e);n.value=!0,y(()=>{const l=new w({title:"建筑效果",expanded:!0}),o=l.addFolder({title:"线条"});o.addBinding(i,"show",{label:"显示"}),o.addBinding(i,"color",{label:"颜色"}),o.addBinding(i,"width",{label:"宽度",min:0,max:10,step:1}),o.addBinding(i,"opacity",{label:"透明度",min:0,max:1,step:.1});const t=l.addFolder({title:"建筑物"});t.addBinding(a,"show",{label:"显示"}),t.addBinding(a,"bulidingsColor",{label:"楼宇颜色"}),t.addBinding(a,"gradient",{label:"渐变"}),t.addBinding(a,"opacity",{label:"透明度",min:0,max:1,step:.1}),t.addBinding(a,"landColor",{label:"地面颜色"})});const i=u({width:1,color:"#000",opacity:1,show:!0}),a=u({bulidingsColor:"#e523ff",landColor:"#112233",opacity:.9,show:!0,gradient:!0});return(l,o)=>(d(),s(f,{showBuildings:!1},{ability:C(()=>[a.show&&n.value?(d(),s(B,{key:0,model:p(c),bulidingsColor:a.bulidingsColor,landColor:a.landColor,gradient:a.gradient,opacity:a.opacity},null,8,["model","bulidingsColor","landColor","gradient","opacity"])):g("",!0),i.show&&n.value?(d(),s(x,{key:1,builds:p(c).city,width:i.width,color:i.color,opacity:i.opacity},null,8,["builds","width","color","opacity"])):g("",!0)]),_:1}))}});export{L as default};

View File

@ -1 +1 @@
import{Y as g,Z as x,a2 as u,al as D,am as i,o as k,s as M,B as f,a6 as p,I as h,a7 as C,$ as F,a0 as T,a1 as w,a as y,an as b,U as o}from"./vendor-524e5929.js";const G=o("TresPerspectiveCamera",{position:[5,5,5]},null,-1),S=o("TresGridHelper",{position:[0,-1,0]},null,-1),A=o("TresBoxGeometry",{args:[2,2,2]},null,-1),E=o("TresMeshBasicMaterial",{color:"orange",wireframe:""},null,-1),N=[A,E],P=o("TresAmbientLight",{intensity:1},null,-1),H=g({__name:"cameraControls",setup(U){const m={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:F,outputColorSpace:T,toneMapping:w},l=x({distance:5,minDistance:0,maxDistance:100}),e=u(),r=u(),{pane:n}=D(),d=n.addFolder({title:"距离参数"});d.addBinding(l,"distance",{label:"设置距离",step:.01,min:0,max:100}),d.addBinding(l,"minDistance",{label:"最小距离",step:.01,min:0,max:10}),d.addBinding(l,"maxDistance",{label:"最大距离",step:.01,min:0,max:100});const c=n.addFolder({title:"远近"});c.addButton({title:"(+1)"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.dolly(1,!0)}),c.addButton({title:"(-1)"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.dolly(-1,!0)});const s=n.addFolder({title:"旋转"});s.addButton({title:"Rotate theta 45°"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.rotate(45*i.DEG2RAD,0,!0)}),s.addButton({title:"Rotate theta -90°"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.rotate(-90*i.DEG2RAD,0,!0)}),s.addButton({title:"Rotate theta 360°"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.rotate(360*i.DEG2RAD,0,!0)}),s.addButton({title:"Rotate phi 20°"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.rotate(0,20*i.DEG2RAD,!0)}),n.addFolder({title:"移动"}).addButton({title:"对焦到 box of the mesh"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.fitToBox(r.value,!0)});function _(){console.log("change")}function B(){console.log("start")}function v(){console.log("end")}return(t,a)=>(k(),M(h(C),p(m,{"window-size":""}),{default:f(()=>[G,y(h(b),p(l,{ref_key:"controlsRef",ref:e,"make-default":"",onChange:_,onStart:B,onEnd:v}),null,16),S,o("TresMesh",{ref_key:"boxMeshRef",ref:r},N,512),P]),_:1},16))}});export{H as default};
import{Y as g,Z as x,a2 as u,al as D,am as i,o as k,s as M,B as f,a6 as p,I as h,a7 as C,$ as F,a0 as T,a1 as w,a as y,an as b,U as o}from"./vendor-e1483ee8.js";const G=o("TresPerspectiveCamera",{position:[5,5,5]},null,-1),S=o("TresGridHelper",{position:[0,-1,0]},null,-1),A=o("TresBoxGeometry",{args:[2,2,2]},null,-1),E=o("TresMeshBasicMaterial",{color:"orange",wireframe:""},null,-1),N=[A,E],P=o("TresAmbientLight",{intensity:1},null,-1),H=g({__name:"cameraControls",setup(U){const m={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:F,outputColorSpace:T,toneMapping:w},l=x({distance:5,minDistance:0,maxDistance:100}),e=u(),r=u(),{pane:n}=D(),d=n.addFolder({title:"距离参数"});d.addBinding(l,"distance",{label:"设置距离",step:.01,min:0,max:100}),d.addBinding(l,"minDistance",{label:"最小距离",step:.01,min:0,max:10}),d.addBinding(l,"maxDistance",{label:"最大距离",step:.01,min:0,max:100});const c=n.addFolder({title:"远近"});c.addButton({title:"(+1)"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.dolly(1,!0)}),c.addButton({title:"(-1)"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.dolly(-1,!0)});const s=n.addFolder({title:"旋转"});s.addButton({title:"Rotate theta 45°"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.rotate(45*i.DEG2RAD,0,!0)}),s.addButton({title:"Rotate theta -90°"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.rotate(-90*i.DEG2RAD,0,!0)}),s.addButton({title:"Rotate theta 360°"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.rotate(360*i.DEG2RAD,0,!0)}),s.addButton({title:"Rotate phi 20°"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.rotate(0,20*i.DEG2RAD,!0)}),n.addFolder({title:"移动"}).addButton({title:"对焦到 box of the mesh"}).on("click",()=>{var t,a;(a=(t=e==null?void 0:e.value)==null?void 0:t.value)==null||a.fitToBox(r.value,!0)});function _(){console.log("change")}function B(){console.log("start")}function v(){console.log("end")}return(t,a)=>(k(),M(h(C),p(m,{"window-size":""}),{default:f(()=>[G,y(h(b),p(l,{ref_key:"controlsRef",ref:e,"make-default":"",onChange:_,onStart:B,onEnd:v}),null,16),S,o("TresMesh",{ref_key:"boxMeshRef",ref:r},N,512),P]),_:1},16))}});export{H as default};

1
dist/static/digitalBrain-4d5d6343.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
import{Y as ye,a3 as xe,a2 as Ki,j as lr,a5 as cr,o as bt,s as we,I as D,av as Zi,az as dr,aM as pr,c as Le,U as A,ah as Vt,C as Ie,ai as Ji,aL as tn,D as en,aE as Se,a as Ft,B as Te,a6 as rn,a7 as nn,a0 as sn,b5 as an,aa as on,aC as Ue}from"./vendor-524e5929.js";import{_ as un}from"./loading.vue_vue_type_script_setup_true_lang-fa08807f.js";const fn=ye({__name:"starts",setup(f){const{onLoop:t}=xe(),e=Ki(0);t(({delta:i})=>{e.value+=.02*i});const r=lr();return cr(()=>{r.value.value.material.color.setHex(5076687),r.value.value.scale.set(5,5,5)}),(i,n)=>(bt(),we(D(Zi),{ref_key:"StarsREF",ref:r,rotation:[0,e.value,0],radius:100,depth:50,count:1e4,size:5,"size-attenuation":!0},null,8,["rotation"]))}}),hn={position:[0,0,0]},_n=A("TresSphereGeometry",{args:[50,32,32]},null,-1),ln=["map"],cn=A("TresSphereGeometry",{args:[53,32,32]},null,-1),dn=["map","alphaMap","blending"],pn={scale:[155,155,0]},mn=["map","blending"],gn={scale:[128,128,0]},yn=["map","blending"],xn=ye({__name:"earthmap",async setup(f){let t,e;const r=([t,e]=dr(()=>pr(["./plugins/earthSample/image/earthA/map.jpg","./plugins/earthSample/image/earthA/earth.jpg","./plugins/earthSample/image/earthA/glow.png","./plugins/earthSample/image/earthA/innerGlow.png"])),t=await t,e(),t),{onLoop:i}=xe();return i(({delta:n})=>{}),cr(()=>{}),(n,s)=>(bt(),Le(Ie,null,[A("TresMesh",hn,[_n,A("TresMeshBasicMaterial",{map:D(r)[0]},null,8,ln)]),A("TresMesh",null,[cn,A("TresMeshBasicMaterial",{map:D(r)[1],alphaMap:D(r)[1],blending:D(Vt),transparent:!0},null,8,dn)]),A("TresSprite",pn,[A("TresSpriteMaterial",{color:"#4d76cf",map:D(r)[2],blending:D(Vt),depthWrite:!1,depthTest:!1,transparent:!0},null,8,mn)]),A("TresSprite",gn,[A("TresSpriteMaterial",{color:"#4d76cf",map:D(r)[3],blending:D(Vt),depthWrite:!1,depthTest:!1,transparent:!0},null,8,yn)])],64))}});function yt(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function Kr(f,t){f.prototype=Object.create(t.prototype),f.prototype.constructor=f,f.__proto__=t}/*!
import{Y as ye,a3 as xe,a2 as Ki,j as lr,a5 as cr,o as bt,s as we,I as D,av as Zi,az as dr,aM as pr,c as Le,U as A,ah as Vt,C as Ie,ai as Ji,aL as tn,D as en,aE as Se,a as Ft,B as Te,a6 as rn,a7 as nn,a0 as sn,b5 as an,aa as on,aC as Ue}from"./vendor-e1483ee8.js";import{_ as un}from"./loading.vue_vue_type_script_setup_true_lang-5ac30ba9.js";const fn=ye({__name:"starts",setup(f){const{onLoop:t}=xe(),e=Ki(0);t(({delta:i})=>{e.value+=.02*i});const r=lr();return cr(()=>{r.value.value.material.color.setHex(5076687),r.value.value.scale.set(5,5,5)}),(i,n)=>(bt(),we(D(Zi),{ref_key:"StarsREF",ref:r,rotation:[0,e.value,0],radius:100,depth:50,count:1e4,size:5,"size-attenuation":!0},null,8,["rotation"]))}}),hn={position:[0,0,0]},_n=A("TresSphereGeometry",{args:[50,32,32]},null,-1),ln=["map"],cn=A("TresSphereGeometry",{args:[53,32,32]},null,-1),dn=["map","alphaMap","blending"],pn={scale:[155,155,0]},mn=["map","blending"],gn={scale:[128,128,0]},yn=["map","blending"],xn=ye({__name:"earthmap",async setup(f){let t,e;const r=([t,e]=dr(()=>pr(["./plugins/earthSample/image/earthA/map.jpg","./plugins/earthSample/image/earthA/earth.jpg","./plugins/earthSample/image/earthA/glow.png","./plugins/earthSample/image/earthA/innerGlow.png"])),t=await t,e(),t),{onLoop:i}=xe();return i(({delta:n})=>{}),cr(()=>{}),(n,s)=>(bt(),Le(Ie,null,[A("TresMesh",hn,[_n,A("TresMeshBasicMaterial",{map:D(r)[0]},null,8,ln)]),A("TresMesh",null,[cn,A("TresMeshBasicMaterial",{map:D(r)[1],alphaMap:D(r)[1],blending:D(Vt),transparent:!0},null,8,dn)]),A("TresSprite",pn,[A("TresSpriteMaterial",{color:"#4d76cf",map:D(r)[2],blending:D(Vt),depthWrite:!1,depthTest:!1,transparent:!0},null,8,mn)]),A("TresSprite",gn,[A("TresSpriteMaterial",{color:"#4d76cf",map:D(r)[3],blending:D(Vt),depthWrite:!1,depthTest:!1,transparent:!0},null,8,yn)])],64))}});function yt(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function Kr(f,t){f.prototype=Object.create(t.prototype),f.prototype.constructor=f,f.__proto__=t}/*!
* GSAP 3.12.2
* https://greensock.com
*

View File

@ -1 +1 @@
import{Y as p,o as l,s as c,B as d,a6 as _,I as e,a7 as u,$ as m,a1 as f,a as s,ao as h,ap as g,aq as w,U as a}from"./vendor-524e5929.js";const B=a("TresPerspectiveCamera",{position:[0,3,10]},null,-1),C=a("TresGridHelper",{args:[100,100]},null,-1),T=a("TresAmbientLight",{intensity:1},null,-1),M=p({__name:"firstPersonControls",setup(b){const n={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:m,toneMapping:f},r=o=>console.log(o);return(o,t)=>(l(),c(e(u),_(n,{"window-size":""}),{default:d(()=>[s(e(h)),B,s(e(g),{"make-default":"",onIsLock:t[0]||(t[0]=i=>r(i))}),s(e(w),{"head-bobbing":""}),C,T]),_:1},16))}});export{M as default};
import{Y as p,o as l,s as c,B as d,a6 as _,I as e,a7 as u,$ as m,a1 as f,a as s,ao as h,ap as g,aq as w,U as a}from"./vendor-e1483ee8.js";const B=a("TresPerspectiveCamera",{position:[0,3,10]},null,-1),C=a("TresGridHelper",{args:[100,100]},null,-1),T=a("TresAmbientLight",{intensity:1},null,-1),M=p({__name:"firstPersonControls",setup(b){const n={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:m,toneMapping:f},r=o=>console.log(o);return(o,t)=>(l(),c(e(u),_(n,{"window-size":""}),{default:d(()=>[s(e(h)),B,s(e(g),{"make-default":"",onIsLock:t[0]||(t[0]=i=>r(i))}),s(e(w),{"head-bobbing":""}),C,T]),_:1},16))}});export{M as default};

View File

@ -1 +1 @@
import{Y as _,j as u,a2 as r,w as d,o as h,s as f,B as n,a6 as M,I as s,a7 as g,$ as m,a0 as T,a1 as x,U as e,a,aD as i,as as w,ax as y,aE as B,aa as C}from"./vendor-524e5929.js";const R=e("TresPerspectiveCamera",{position:[3,3,3]},null,-1),k={"position-x":3},v=e("TresTorusKnotGeometry",{args:[1,.4,256,20]},null,-1),G={position:[0,0,-1]},S=e("TresPlaneGeometry",{args:[3,3]},null,-1),b=["side"],D=e("TresGridHelper",{args:[10,10]},null,-1),P=e("TresAmbientLight",{intensity:1},null,-1),N=e("TresDirectionalLight",{intensity:1,position:[2,2,2]},null,-1),V=_({__name:"glassMaterial",setup(z){const c={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:m,outputColorSpace:T,toneMapping:x},p=u(),t=r(),o=r();return d(t,l=>{o.value.value.material.dispose(),o.value.value.material=l.MeshGlassMaterialClass}),(l,I)=>(h(),f(s(g),M(c,{ref_key:"context",ref:p,"window-size":""}),{default:n(()=>[R,e("TresMesh",k,[v,a(s(i),{ref_key:"glassMaterialRef",ref:t},null,512)]),a(s(w),{scale:.5},{default:n(()=>[a(s(i))]),_:1}),a(s(y),{ref_key:"boxRef",ref:o,"position-x":-3},null,512),e("TresMesh",G,[S,e("TresMeshBasicMaterial",{side:s(B),color:16716049},null,8,b)]),D,P,N,a(s(C))]),_:1},16))}});export{V as default};
import{Y as _,j as u,a2 as r,w as d,o as h,s as f,B as n,a6 as M,I as s,a7 as g,$ as m,a0 as T,a1 as x,U as e,a,aD as i,as as w,ax as y,aE as B,aa as C}from"./vendor-e1483ee8.js";const R=e("TresPerspectiveCamera",{position:[3,3,3]},null,-1),k={"position-x":3},v=e("TresTorusKnotGeometry",{args:[1,.4,256,20]},null,-1),G={position:[0,0,-1]},S=e("TresPlaneGeometry",{args:[3,3]},null,-1),b=["side"],D=e("TresGridHelper",{args:[10,10]},null,-1),P=e("TresAmbientLight",{intensity:1},null,-1),N=e("TresDirectionalLight",{intensity:1,position:[2,2,2]},null,-1),V=_({__name:"glassMaterial",setup(z){const c={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:m,outputColorSpace:T,toneMapping:x},p=u(),t=r(),o=r();return d(t,l=>{o.value.value.material.dispose(),o.value.value.material=l.MeshGlassMaterialClass}),(l,I)=>(h(),f(s(g),M(c,{ref_key:"context",ref:p,"window-size":""}),{default:n(()=>[R,e("TresMesh",k,[v,a(s(i),{ref_key:"glassMaterialRef",ref:t},null,512)]),a(s(w),{scale:.5},{default:n(()=>[a(s(i))]),_:1}),a(s(y),{ref_key:"boxRef",ref:o,"position-x":-3},null,512),e("TresMesh",G,[S,e("TresMeshBasicMaterial",{side:s(B),color:16716049},null,8,b)]),D,P,N,a(s(C))]),_:1},16))}});export{V as default};

View File

@ -1 +1 @@
import{Y as n,Z as o,ae as s,o as i,c as r,a as e,B as m,C as p,a6 as l}from"./vendor-524e5929.js";import{_}from"./heatmapJS.vue_vue_type_script_setup_true_lang-eb9daff6.js";import{_ as c}from"./loading.vue_vue_type_script_setup_true_lang-fa08807f.js";import{_ as d}from"./pagesShow.vue_vue_type_style_index_0_lang-4a631ac6.js";import"./heatmap-d02141de.js";import"./_commonjsHelpers-725317a4.js";const v=n({__name:"heatmap",setup(f){const a=o({show2dCanvas:!0,heightRatio:20,position:[0,20,0],Plane:[1e3,1e3,1e3,1e3]}),t=new s({title:"参数",expanded:!0});return t.addBinding(a,"show2dCanvas",{label:"显示二维图"}),t.addBinding(a,"heightRatio",{label:"高度",min:10,max:100,step:10}),(h,u)=>(i(),r(p,null,[e(c),e(d,null,{ability:m(()=>[e(_,l({ref:"heatmapJSRef"},a),null,16)]),_:1})],64))}});export{v as default};
import{Y as n,Z as o,ae as s,o as i,c as r,a as e,B as m,C as p,a6 as l}from"./vendor-e1483ee8.js";import{_}from"./heatmapJS.vue_vue_type_script_setup_true_lang-7eea1619.js";import{_ as c}from"./loading.vue_vue_type_script_setup_true_lang-5ac30ba9.js";import{_ as d}from"./pagesShow.vue_vue_type_style_index_0_lang-394dddd1.js";import"./heatmap-d02141de.js";import"./_commonjsHelpers-725317a4.js";const v=n({__name:"heatmap",setup(f){const a=o({show2dCanvas:!0,heightRatio:20,position:[0,20,0],Plane:[1e3,1e3,1e3,1e3]}),t=new s({title:"参数",expanded:!0});return t.addBinding(a,"show2dCanvas",{label:"显示二维图"}),t.addBinding(a,"heightRatio",{label:"高度",min:10,max:100,step:10}),(h,u)=>(i(),r(p,null,[e(c),e(d,null,{ability:m(()=>[e(_,l({ref:"heatmapJSRef"},a),null,16)]),_:1})],64))}});export{v as default};

View File

@ -1 +1 @@
import{aG as _,Y as y,aH as x,a4 as g,o as b,c as w,aE as B,j as C,az as A,Z as d,ae as M,s as S,B as U,a as h,a6 as v,I as f}from"./vendor-524e5929.js";import{C as D,_ as L,l as P,b as T}from"./pagesShow.vue_vue_type_style_index_0_lang-4a631ac6.js";import{h as X}from"./heatmap-d02141de.js";import"./_commonjsHelpers-725317a4.js";const p=(a,t)=>Math.round((Math.random()*(a-t+1)+t)*10)/10,Y=(a,t)=>{if(!t){let e=0;for(t=[];e<2e3;)t.push({x:p(1,a._config.width),y:p(1,a._config.height),value:p(1,6)}),e++}a.setData({max:12,data:t})},E=(a=250,t=250,o=!0)=>{const e=document.createElement("heatmap-canvas");return e.style.position="absolute",o||(e.style.display="none"),e.style.top="0",e.style.left="0",document.body.appendChild(e),X.create({container:e,width:a,height:t,blur:".8",radius:10})},F=a=>{a.computeBoundingBox();const{max:t,min:o}=a.boundingBox;a.deleteAttribute("uv");const e=t.x-o.x,n=t.y-o.y,i=[];for(let r=0;r<a.attributes.position.count;r++)i.push((a.attributes.position.getX(r)-o.x)/e),i.push((a.attributes.position.getY(r)-o.y)/n);const s=new Float32Array(i);a.setAttribute("uv",new _(s,2))},k=(a,t)=>{t.computeBoundingBox(),t.deleteAttribute("uv"),a.computeBoundingBox();const{max:o,min:e}=a.boundingBox,n=o.x-e.x,i=o.y-e.y,s=[];for(let c=0;c<t.attributes.position.count;c++)s.push((t.attributes.position.getX(c)-e.x)/n),s.push((t.attributes.position.getY(c)-e.y)/i);const r=new Float32Array(s);t.setAttribute("uv",new _(r,2))},N=["object"],O=y({__name:"buildingsHeatmap",props:{model:{},opacity:{default:1}},setup(a){const t=a,o=E();Y(o);const e=new x(o._renderer.canvas);e.needsUpdate=!0;const n=(u,l)=>new D({baseMaterial:u,vertexShader:"\n varying vec2 vUv;\n void main() {\n csm_Position = position * vec3(1.0);\n vUv = uv;\n }\n ",fragmentShader:"\n uniform sampler2D heightMap;\n uniform float uOpacity;\n varying vec2 vUv;\n void main() {\n csm_DiffuseColor = vec4(texture2D(heightMap, vUv.xy).rgb, uOpacity);\n }\n ",silent:!0,uniforms:{uOpacity:{value:t.opacity},heightMap:{type:"t",value:l}},depthWrite:!0,depthTest:!0,transparent:!0,side:B}),i=t.model.city,s=t.model.land,r=()=>{const{geometry:u}=s;F(u);const l=n(s.material,e);s.material.dispose(),s.material=l},c=()=>{const u=s.geometry,{geometry:l}=i;k(u,l);const m=n(i.material,e);i.material.dispose(),i.material=m};return r(),c(),g(()=>{t.opacity&&(s.material.uniforms.uOpacity.value=t.opacity)}),(u,l)=>(b(),w("primitive",{object:t.model.model.clone()},null,8,N))}}),$=y({__name:"heatmap2",async setup(a){let t,o;const e=C(!1),n=([t,o]=A(()=>P()),t=await t,o(),t);e.value=!0;const i=d({width:1,color:"#000",opacity:1,show:!0}),s=d({opacity:.9});return new M({title:"参数",expanded:!0}).addBinding(s,"opacity",{label:"透明度",min:0,max:1,step:.1}),(c,u)=>(b(),S(L,{showBuildings:!1},{ability:U(()=>[h(O,v({model:f(n)},s),null,16,["model"]),h(T,v(i,{builds:f(n).city}),null,16,["builds"])]),_:1}))}});export{$ as default};
import{aG as _,Y as y,aH as x,a4 as g,o as b,c as w,aE as B,j as C,az as A,Z as d,ae as M,s as S,B as U,a as h,a6 as v,I as f}from"./vendor-e1483ee8.js";import{C as D,_ as L,l as P,b as T}from"./pagesShow.vue_vue_type_style_index_0_lang-394dddd1.js";import{h as X}from"./heatmap-d02141de.js";import"./_commonjsHelpers-725317a4.js";const p=(a,t)=>Math.round((Math.random()*(a-t+1)+t)*10)/10,Y=(a,t)=>{if(!t){let e=0;for(t=[];e<2e3;)t.push({x:p(1,a._config.width),y:p(1,a._config.height),value:p(1,6)}),e++}a.setData({max:12,data:t})},E=(a=250,t=250,o=!0)=>{const e=document.createElement("heatmap-canvas");return e.style.position="absolute",o||(e.style.display="none"),e.style.top="0",e.style.left="0",document.body.appendChild(e),X.create({container:e,width:a,height:t,blur:".8",radius:10})},F=a=>{a.computeBoundingBox();const{max:t,min:o}=a.boundingBox;a.deleteAttribute("uv");const e=t.x-o.x,n=t.y-o.y,i=[];for(let r=0;r<a.attributes.position.count;r++)i.push((a.attributes.position.getX(r)-o.x)/e),i.push((a.attributes.position.getY(r)-o.y)/n);const s=new Float32Array(i);a.setAttribute("uv",new _(s,2))},k=(a,t)=>{t.computeBoundingBox(),t.deleteAttribute("uv"),a.computeBoundingBox();const{max:o,min:e}=a.boundingBox,n=o.x-e.x,i=o.y-e.y,s=[];for(let c=0;c<t.attributes.position.count;c++)s.push((t.attributes.position.getX(c)-e.x)/n),s.push((t.attributes.position.getY(c)-e.y)/i);const r=new Float32Array(s);t.setAttribute("uv",new _(r,2))},N=["object"],O=y({__name:"buildingsHeatmap",props:{model:{},opacity:{default:1}},setup(a){const t=a,o=E();Y(o);const e=new x(o._renderer.canvas);e.needsUpdate=!0;const n=(u,l)=>new D({baseMaterial:u,vertexShader:"\n varying vec2 vUv;\n void main() {\n csm_Position = position * vec3(1.0);\n vUv = uv;\n }\n ",fragmentShader:"\n uniform sampler2D heightMap;\n uniform float uOpacity;\n varying vec2 vUv;\n void main() {\n csm_DiffuseColor = vec4(texture2D(heightMap, vUv.xy).rgb, uOpacity);\n }\n ",silent:!0,uniforms:{uOpacity:{value:t.opacity},heightMap:{type:"t",value:l}},depthWrite:!0,depthTest:!0,transparent:!0,side:B}),i=t.model.city,s=t.model.land,r=()=>{const{geometry:u}=s;F(u);const l=n(s.material,e);s.material.dispose(),s.material=l},c=()=>{const u=s.geometry,{geometry:l}=i;k(u,l);const m=n(i.material,e);i.material.dispose(),i.material=m};return r(),c(),g(()=>{t.opacity&&(s.material.uniforms.uOpacity.value=t.opacity)}),(u,l)=>(b(),w("primitive",{object:t.model.model.clone()},null,8,N))}}),$=y({__name:"heatmap2",async setup(a){let t,o;const e=C(!1),n=([t,o]=A(()=>P()),t=await t,o(),t);e.value=!0;const i=d({width:1,color:"#000",opacity:1,show:!0}),s=d({opacity:.9});return new M({title:"参数",expanded:!0}).addBinding(s,"opacity",{label:"透明度",min:0,max:1,step:.1}),(c,u)=>(b(),S(L,{showBuildings:!1},{ability:U(()=>[h(O,v({model:f(n)},s),null,16,["model"]),h(T,v(i,{builds:f(n).city}),null,16,["builds"])]),_:1}))}});export{$ as default};

View File

@ -1 +1 @@
import{Y as c,j as f,a3 as u,Z as d,ae as h,o as _,s as m,B as g,a6 as r,I as i,a7 as C,a0 as w,b5 as S,a as l,aa as v,U as a}from"./vendor-524e5929.js";import{_ as x}from"./heatmapJS.vue_vue_type_script_setup_true_lang-eb9daff6.js";import"./heatmap-d02141de.js";import"./_commonjsHelpers-725317a4.js";const y=a("TresPerspectiveCamera",{position:[21,34,55],fov:60,near:1,far:1e3},null,-1),B=a("TresAmbientLight",{color:"#cccccc",intensity:.4},null,-1),R=a("TresPointLight",{color:"#ffffff",intensity:.8},null,-1),L=a("TresGridHelper",{args:[50,25],position:[0,0,0]},null,-1),J=c({__name:"heatmapExample",setup(P){const p={clearColor:"#030311",shadows:!0,alpha:!1,outputColorSpace:w,shadowMapType:S,useLegacyLights:!0,antialias:!0},t=f();let e=!0;u().onLoop(({elapsed:s})=>{!e&&parseInt(s)%2==1&&(e=!0,t.value&&t.value.setData()),e&&parseInt(s)%2==0&&(e=!1)});const o=d({show2dCanvas:!0,heightRatio:6}),n=new h({title:"参数",expanded:!0});return n.addBinding(o,"show2dCanvas",{label:"显示二维图"}),n.addBinding(o,"heightRatio",{label:"高度",min:1,max:10,step:1}),(s,T)=>(_(),m(i(C),r(p,{"window-size":""}),{default:g(()=>[y,l(i(v),{autoRotate:!0,autoRotateSpeed:2}),B,R,L,l(x,r({ref_key:"heatmapJSRef",ref:t},o),null,16)]),_:1},16))}});export{J as default};
import{Y as c,j as f,a3 as u,Z as d,ae as h,o as _,s as m,B as g,a6 as r,I as i,a7 as C,a0 as w,b5 as S,a as l,aa as v,U as a}from"./vendor-e1483ee8.js";import{_ as x}from"./heatmapJS.vue_vue_type_script_setup_true_lang-7eea1619.js";import"./heatmap-d02141de.js";import"./_commonjsHelpers-725317a4.js";const y=a("TresPerspectiveCamera",{position:[21,34,55],fov:60,near:1,far:1e3},null,-1),B=a("TresAmbientLight",{color:"#cccccc",intensity:.4},null,-1),R=a("TresPointLight",{color:"#ffffff",intensity:.8},null,-1),L=a("TresGridHelper",{args:[50,25],position:[0,0,0]},null,-1),J=c({__name:"heatmapExample",setup(P){const p={clearColor:"#030311",shadows:!0,alpha:!1,outputColorSpace:w,shadowMapType:S,useLegacyLights:!0,antialias:!0},t=f();let e=!0;u().onLoop(({elapsed:s})=>{!e&&parseInt(s)%2==1&&(e=!0,t.value&&t.value.setData()),e&&parseInt(s)%2==0&&(e=!1)});const o=d({show2dCanvas:!0,heightRatio:6}),n=new h({title:"参数",expanded:!0});return n.addBinding(o,"show2dCanvas",{label:"显示二维图"}),n.addBinding(o,"heightRatio",{label:"高度",min:1,max:10,step:1}),(s,T)=>(_(),m(i(C),r(p,{"window-size":""}),{default:g(()=>[y,l(i(v),{autoRotate:!0,autoRotateSpeed:2}),B,R,L,l(x,r({ref_key:"heatmapJSRef",ref:t},o),null,16)]),_:1},16))}});export{J as default};

View File

@ -1 +1 @@
import{Y as d,aH as m,aE as g,a4 as f,o as y,c as x,U as u,a8 as _,a9 as M}from"./vendor-524e5929.js";import{h as R}from"./heatmap-d02141de.js";const w=["position"],b=["args","rotate-x"],C=d({__name:"heatmapJS",props:{position:{default:[0,0,0]},Plane:{default:[50,50,1e3,1e3]},show2dCanvas:{type:Boolean,default:!0},heightRatio:{default:6}},setup(p,{expose:c}){const a=p;let i=null;const s=(t,o)=>Math.round((Math.random()*(t-o+1)+o)*10)/10;let e=null;const v=()=>(e=document.createElement("heatmap-canvas"),e.width=100,e.height=100,e.style.position="absolute",e.style.top="0",e.style.left="0",document.body.appendChild(e),i=R.create({container:e,width:256,height:256,blur:".8",radius:10}),i),r=t=>{if(!t){let h=0;for(t=[];h<2e3;)t.push({x:s(1,256),y:s(1,256),value:s(1,6)}),h++}i.setData({max:12,data:t}),n.needsUpdate=!0},n=new m(v()._renderer.canvas);r();const l={transparent:!0,side:g,vertexShader:"\n uniform sampler2D heightMap;\n uniform float heightRatio;\n varying vec2 vUv;\n varying float hValue;\n varying vec3 cl;\n void main() {\n vUv = uv;\n vec3 pos = position;\n cl = texture2D(heightMap, vUv).rgb;\n hValue = texture2D(heightMap, vUv).r;\n pos.y = hValue * heightRatio;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(pos,1.0);\n }",fragmentShader:"\n varying float hValue;\n varying vec3 cl;\n void main() {\n float v = abs(hValue - 1.);\n gl_FragColor = vec4(cl, .8 - v * v*1.1) ; \n }",uniforms:{heightMap:{type:"t",value:n},heightRatio:{value:a.heightRatio}}};return f(()=>{e.style.display="".concat(a.show2dCanvas?"block":"none"),a.heightRatio&&(l.uniforms.heightRatio.value=a.heightRatio)}),c({setData:r}),(t,o)=>(y(),x("TresMesh",{position:a.position},[u("TresPlaneGeometry",{args:a.Plane,"rotate-x":-Math.PI*.5},null,8,b),u("TresShaderMaterial",_(M(l)),null,16)],8,w))}});export{C as _};
import{Y as d,aH as m,aE as g,a4 as f,o as y,c as x,U as u,a8 as _,a9 as M}from"./vendor-e1483ee8.js";import{h as R}from"./heatmap-d02141de.js";const w=["position"],b=["args","rotate-x"],C=d({__name:"heatmapJS",props:{position:{default:[0,0,0]},Plane:{default:[50,50,1e3,1e3]},show2dCanvas:{type:Boolean,default:!0},heightRatio:{default:6}},setup(p,{expose:c}){const a=p;let i=null;const s=(t,o)=>Math.round((Math.random()*(t-o+1)+o)*10)/10;let e=null;const v=()=>(e=document.createElement("heatmap-canvas"),e.width=100,e.height=100,e.style.position="absolute",e.style.top="0",e.style.left="0",document.body.appendChild(e),i=R.create({container:e,width:256,height:256,blur:".8",radius:10}),i),r=t=>{if(!t){let h=0;for(t=[];h<2e3;)t.push({x:s(1,256),y:s(1,256),value:s(1,6)}),h++}i.setData({max:12,data:t}),n.needsUpdate=!0},n=new m(v()._renderer.canvas);r();const l={transparent:!0,side:g,vertexShader:"\n uniform sampler2D heightMap;\n uniform float heightRatio;\n varying vec2 vUv;\n varying float hValue;\n varying vec3 cl;\n void main() {\n vUv = uv;\n vec3 pos = position;\n cl = texture2D(heightMap, vUv).rgb;\n hValue = texture2D(heightMap, vUv).r;\n pos.y = hValue * heightRatio;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(pos,1.0);\n }",fragmentShader:"\n varying float hValue;\n varying vec3 cl;\n void main() {\n float v = abs(hValue - 1.);\n gl_FragColor = vec4(cl, .8 - v * v*1.1) ; \n }",uniforms:{heightMap:{type:"t",value:n},heightRatio:{value:a.heightRatio}}};return f(()=>{e.style.display="".concat(a.show2dCanvas?"block":"none"),a.heightRatio&&(l.uniforms.heightRatio.value=a.heightRatio)}),c({setData:r}),(t,o)=>(y(),x("TresMesh",{position:a.position},[u("TresPlaneGeometry",{args:a.Plane,"rotate-x":-Math.PI*.5},null,8,b),u("TresShaderMaterial",_(M(l)),null,16)],8,w))}});export{C as _};

View File

@ -1 +1 @@
import{Y as u,j as c,Z as h,o as f,s as m,B as a,a6 as r,I as o,a7 as T,$ as M,a0 as x,a1 as w,a as l,aa as y,U as e,af as p,at as B,au as S,_ as g}from"./vendor-524e5929.js";const s=t=>(B("data-v-f4d85785"),t=t(),S(),t),v=s(()=>e("TresPerspectiveCamera",{position:[3,0,8]},null,-1)),C={position:[1,1,1]},I=s(()=>e("TresBoxGeometry",null,null,-1)),N=s(()=>e("TresMeshNormalMaterial",null,null,-1)),R=s(()=>e("h1",{class:"bg-white text-xs p-0.5 rounded"}," I'm a Box 📦 ",-1)),k=s(()=>e("TresSphereGeometry",null,null,-1)),G=s(()=>e("TresMeshNormalMaterial",null,null,-1)),b=s(()=>e("h1",{class:"bg-white text-xs p-0.5 rounded"}," I'm a Sphere ⭕️ ",-1)),P=s(()=>e("TresTorusGeometry",null,null,-1)),V=s(()=>e("TresMeshNormalMaterial",null,null,-1)),j=[P,V],z=s(()=>e("TresAmbientLight",{intensity:1},null,-1)),A=u({__name:"htmls",setup(t){const i={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:M,outputColorSpace:x,toneMapping:w},n=c(null),d=c(null),_=h({wrapperClass:"wrapper",as:"div",center:!0});return(D,L)=>(f(),m(o(T),r(i,{"window-size":""}),{default:a(()=>[v,l(o(y)),e("TresMesh",C,[I,N,l(o(p),r(_,{transform:"",occlude:[n.value]}),{default:a(()=>[R]),_:1},16,["occlude"])]),e("TresMesh",{ref_key:"sphereRef",ref:n,position:[4,1,1]},[k,G,l(o(p),r(_,{transform:""}),{default:a(()=>[b]),_:1},16)],512),e("TresMesh",{ref_key:"torusRef",ref:d,position:[7,1,1]},j,512),z]),_:1},16))}});const Y=g(A,[["__scopeId","data-v-f4d85785"]]);export{Y as default};
import{Y as u,j as c,Z as h,o as f,s as m,B as a,a6 as r,I as o,a7 as T,$ as M,a0 as x,a1 as w,a as l,aa as y,U as e,af as p,at as B,au as S,_ as g}from"./vendor-e1483ee8.js";const s=t=>(B("data-v-f4d85785"),t=t(),S(),t),v=s(()=>e("TresPerspectiveCamera",{position:[3,0,8]},null,-1)),C={position:[1,1,1]},I=s(()=>e("TresBoxGeometry",null,null,-1)),N=s(()=>e("TresMeshNormalMaterial",null,null,-1)),R=s(()=>e("h1",{class:"bg-white text-xs p-0.5 rounded"}," I'm a Box 📦 ",-1)),k=s(()=>e("TresSphereGeometry",null,null,-1)),G=s(()=>e("TresMeshNormalMaterial",null,null,-1)),b=s(()=>e("h1",{class:"bg-white text-xs p-0.5 rounded"}," I'm a Sphere ⭕️ ",-1)),P=s(()=>e("TresTorusGeometry",null,null,-1)),V=s(()=>e("TresMeshNormalMaterial",null,null,-1)),j=[P,V],z=s(()=>e("TresAmbientLight",{intensity:1},null,-1)),A=u({__name:"htmls",setup(t){const i={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:M,outputColorSpace:x,toneMapping:w},n=c(null),d=c(null),_=h({wrapperClass:"wrapper",as:"div",center:!0});return(D,L)=>(f(),m(o(T),r(i,{"window-size":""}),{default:a(()=>[v,l(o(y)),e("TresMesh",C,[I,N,l(o(p),r(_,{transform:"",occlude:[n.value]}),{default:a(()=>[R]),_:1},16,["occlude"])]),e("TresMesh",{ref_key:"sphereRef",ref:n,position:[4,1,1]},[k,G,l(o(p),r(_,{transform:""}),{default:a(()=>[b]),_:1},16)],512),e("TresMesh",{ref_key:"torusRef",ref:d,position:[7,1,1]},j,512),z]),_:1},16))}});const Y=g(A,[["__scopeId","data-v-f4d85785"]]);export{Y as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{Y as r,az as l,w as _,o as d,s as p,B as u,b6 as y,b7 as h,G as f,H as w,I as a,U as i,E as v,t as x,a as g,b8 as m}from"./vendor-524e5929.js";const b={style:{"background-color":"black"},class:"absolute bg-grey-600 t-0 l-0 w-full h-full z-20 flex justify-center items-center text-black font-mono"},k={class:"w-200px text-white"},N=r({__name:"loading",async setup(B){let t,e;const{hasFinishLoading:c,progress:s}=([t,e]=l(()=>h()),t=await t,e(),t);return _(()=>s.value,async(o,n)=>{console.log(o,n)}),(o,n)=>(d(),p(y,{name:"fade-overlay","enter-active-class":"opacity-1 transition-opacity duration-100","leave-active-class":"opacity-0 transition-opacity duration-200"},{default:u(()=>[f(i("div",b,[i("div",k,[v(" 载入中... "+x(a(s))+" % ",1),g(a(m),{class:"text-yellow"})])],512),[[w,!a(c)]])]),_:1}))}});export{N as _};
import{Y as r,az as l,w as _,o as d,s as p,B as u,b6 as y,b7 as h,G as f,H as w,I as a,U as i,E as v,t as x,a as g,b8 as m}from"./vendor-e1483ee8.js";const b={style:{"background-color":"black"},class:"absolute bg-grey-600 t-0 l-0 w-full h-full z-20 flex justify-center items-center text-black font-mono"},k={class:"w-200px text-white"},N=r({__name:"loading",async setup(B){let t,e;const{hasFinishLoading:c,progress:s}=([t,e]=l(()=>h()),t=await t,e(),t);return _(()=>s.value,async(o,n)=>{console.log(o,n)}),(o,n)=>(d(),p(y,{name:"fade-overlay","enter-active-class":"opacity-1 transition-opacity duration-100","leave-active-class":"opacity-0 transition-opacity duration-200"},{default:u(()=>[f(i("div",b,[i("div",k,[v(" 载入中... "+x(a(s))+" % ",1),g(a(m),{class:"text-yellow"})])],512),[[w,!a(c)]])]),_:1}))}});export{N as _};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{Y as M,az as S,aA as b,a3 as y,w as P,o as _,c as f,I as p,a2 as v,U as w,a as u,C as x,D as L,B as z,a6 as B,a7 as k,a0 as $,b5 as j,aa as A,s as W,aC as F,av as I}from"./vendor-524e5929.js";import{_ as T}from"./loading.vue_vue_type_script_setup_true_lang-fa08807f.js";const N=["object"],R=.2,D=M({__name:"airplane",props:{planet:{}},async setup(h){let e,i;const n=h,{scene:a}=([e,i]=S(()=>b("./plugins/earthSample/model/lowpolyPlanet/airplane.gltf")),e=await e,i(),e),t=a;t.rotation.set(0,Math.PI,0),a.traverse(s=>{s.isMesh&&(s.castShadow=!0)}),t.updateMatrixWorld();const{onLoop:c}=y();P(()=>n.planet,s=>{var d;if(!s)return;s.geometry.computeBoundingSphere();const r=Math.abs(((d=s.geometry.boundingSphere)==null?void 0:d.radius)|1);t.position.set(r,0,0),t.lookAt(s.position)});let o=0;return c(({delta:s})=>{if(!t||!n.planet)return;const r=Math.abs(n.planet.geometry.boundingSphere.radius)+.5;o+=s*R;const d=r*Math.cos(o),l=r*Math.sin(o);t.position.x=d,t.position.z=l,t.rotation.z=-Math.PI/2,t.rotation.y=-o,t.updateMatrixWorld()}),(s,r)=>(_(),f("primitive",{object:p(t)},null,8,N))}}),E=["object"],Q=M({__name:"cloud",props:{planet:{}},async setup(h){let e,i;const n=h,{scene:a}=([e,i]=S(()=>b("./plugins/earthSample/model/lowpolyPlanet/cloud.gltf")),e=await e,i(),e);v();const t=a.children[0];t.castShadow=!0;function c(l,m){const g=Math.random()*(m-l)+l;return Math.random()<.5?-g:g}t.position.set(c(-8,8),c(.5,1),c(-8,8));const o=c(.5,1);t.scale.set(o,o,o),t.updateMatrixWorld(),P(()=>n.planet,l=>{l&&(t.lookAt(l.position),t.updateMatrixWorld())});const{onLoop:s}=y();let r=c(-1,1)*Math.PI;const d=Math.random()/10;return s(({delta:l})=>{if(!t)return;const m=Math.abs(n.planet.geometry.boundingSphere.radius-.5);r+=l*d;const g=m*Math.cos(r),C=m*Math.sin(r);t.position.x=g,t.position.z=C,t.rotation.y=-r,t.lookAt(n.planet.position),t.updateMatrixWorld()}),(l,m)=>(_(),f("primitive",{object:p(a),"cast-shadow":""},null,8,E))}}),V=["object"],G=M({__name:"planet",async setup(h){let e,i;const{nodes:n}=([e,i]=S(()=>b("./plugins/earthSample/model/lowpolyPlanet/planet.gltf")),e=await e,i(),e),a=n.Planet,t=n.Icosphere;a.traverse(o=>{o.isMesh&&(o.receiveShadow=!0)});const{onLoop:c}=y();return c(({delta:o})=>{a&&(a.rotation.y+=o*.04,a.rotation.z+=o*.02,a.rotation.x+=o*.05,a.updateMatrixWorld())}),(o,s)=>(_(),f(x,null,[w("primitive",{object:p(a)},null,8,V),u(D,{planet:p(t)},null,8,["planet"]),(_(),f(x,null,L([1,2,3,4,5,6,7,8,9],r=>u(Q,{key:r,planet:p(t)},null,8,["planet"])),64))],64))}}),U=w("TresPerspectiveCamera",{position:[0,1,5],fov:75,near:.1,far:1e3},null,-1),Y=w("TresAmbientLight",{color:"#484068",intensity:1},null,-1),q=w("TresPointLight",{color:"#1BFFEF",position:[0,0,-8],intensity:80,"cast-shadow":""},null,-1),H=w("TresDirectionalLight",{position:[0,2,4],intensity:3,"cast-shadow":"","shadow-mapSize-width":2048,"shadow-mapSize-height":2048},null,-1),O=M({__name:"lowpolyPlanet",setup(h){const e={clearColor:"#11101B",shadows:!0,alpha:!1,outputColorSpace:$,shadowMapType:j,useLegacyLights:!0},i=v(0);return y().onLoop(({delta:n})=>{i.value+=.02*n}),(n,a)=>(_(),f(x,null,[u(T),u(p(k),B(e,{"window-size":""}),{default:z(()=>[U,u(p(A)),Y,(_(),W(F,null,{default:z(()=>[u(G)]),_:1})),u(p(I),{rotation:[0,i.value,0],radius:50,depth:50,count:5e3,size:.3,"size-attenuation":!0},null,8,["rotation"]),q,H]),_:1},16)],64))}});export{O as default};
import{Y as M,az as S,aA as b,a3 as y,w as P,o as _,c as f,I as p,a2 as v,U as w,a as u,C as x,D as L,B as z,a6 as B,a7 as k,a0 as $,b5 as j,aa as A,s as W,aC as F,av as I}from"./vendor-e1483ee8.js";import{_ as T}from"./loading.vue_vue_type_script_setup_true_lang-5ac30ba9.js";const N=["object"],R=.2,D=M({__name:"airplane",props:{planet:{}},async setup(h){let e,i;const n=h,{scene:a}=([e,i]=S(()=>b("./plugins/earthSample/model/lowpolyPlanet/airplane.gltf")),e=await e,i(),e),t=a;t.rotation.set(0,Math.PI,0),a.traverse(s=>{s.isMesh&&(s.castShadow=!0)}),t.updateMatrixWorld();const{onLoop:c}=y();P(()=>n.planet,s=>{var d;if(!s)return;s.geometry.computeBoundingSphere();const r=Math.abs(((d=s.geometry.boundingSphere)==null?void 0:d.radius)|1);t.position.set(r,0,0),t.lookAt(s.position)});let o=0;return c(({delta:s})=>{if(!t||!n.planet)return;const r=Math.abs(n.planet.geometry.boundingSphere.radius)+.5;o+=s*R;const d=r*Math.cos(o),l=r*Math.sin(o);t.position.x=d,t.position.z=l,t.rotation.z=-Math.PI/2,t.rotation.y=-o,t.updateMatrixWorld()}),(s,r)=>(_(),f("primitive",{object:p(t)},null,8,N))}}),E=["object"],Q=M({__name:"cloud",props:{planet:{}},async setup(h){let e,i;const n=h,{scene:a}=([e,i]=S(()=>b("./plugins/earthSample/model/lowpolyPlanet/cloud.gltf")),e=await e,i(),e);v();const t=a.children[0];t.castShadow=!0;function c(l,m){const g=Math.random()*(m-l)+l;return Math.random()<.5?-g:g}t.position.set(c(-8,8),c(.5,1),c(-8,8));const o=c(.5,1);t.scale.set(o,o,o),t.updateMatrixWorld(),P(()=>n.planet,l=>{l&&(t.lookAt(l.position),t.updateMatrixWorld())});const{onLoop:s}=y();let r=c(-1,1)*Math.PI;const d=Math.random()/10;return s(({delta:l})=>{if(!t)return;const m=Math.abs(n.planet.geometry.boundingSphere.radius-.5);r+=l*d;const g=m*Math.cos(r),C=m*Math.sin(r);t.position.x=g,t.position.z=C,t.rotation.y=-r,t.lookAt(n.planet.position),t.updateMatrixWorld()}),(l,m)=>(_(),f("primitive",{object:p(a),"cast-shadow":""},null,8,E))}}),V=["object"],G=M({__name:"planet",async setup(h){let e,i;const{nodes:n}=([e,i]=S(()=>b("./plugins/earthSample/model/lowpolyPlanet/planet.gltf")),e=await e,i(),e),a=n.Planet,t=n.Icosphere;a.traverse(o=>{o.isMesh&&(o.receiveShadow=!0)});const{onLoop:c}=y();return c(({delta:o})=>{a&&(a.rotation.y+=o*.04,a.rotation.z+=o*.02,a.rotation.x+=o*.05,a.updateMatrixWorld())}),(o,s)=>(_(),f(x,null,[w("primitive",{object:p(a)},null,8,V),u(D,{planet:p(t)},null,8,["planet"]),(_(),f(x,null,L([1,2,3,4,5,6,7,8,9],r=>u(Q,{key:r,planet:p(t)},null,8,["planet"])),64))],64))}}),U=w("TresPerspectiveCamera",{position:[0,1,5],fov:75,near:.1,far:1e3},null,-1),Y=w("TresAmbientLight",{color:"#484068",intensity:1},null,-1),q=w("TresPointLight",{color:"#1BFFEF",position:[0,0,-8],intensity:80,"cast-shadow":""},null,-1),H=w("TresDirectionalLight",{position:[0,2,4],intensity:3,"cast-shadow":"","shadow-mapSize-width":2048,"shadow-mapSize-height":2048},null,-1),O=M({__name:"lowpolyPlanet",setup(h){const e={clearColor:"#11101B",shadows:!0,alpha:!1,outputColorSpace:$,shadowMapType:j,useLegacyLights:!0},i=v(0);return y().onLoop(({delta:n})=>{i.value+=.02*n}),(n,a)=>(_(),f(x,null,[u(T),u(p(k),B(e,{"window-size":""}),{default:z(()=>[U,u(p(A)),Y,(_(),W(F,null,{default:z(()=>[u(G)]),_:1})),u(p(I),{rotation:[0,i.value,0],radius:50,depth:50,count:5e3,size:.3,"size-attenuation":!0},null,8,["rotation"]),q,H]),_:1},16)],64))}});export{O as default};

View File

@ -1 +1 @@
import{Y as r,o as n,s as l,B as s,a6 as p,I as a,a7 as i,a0 as c,a1 as _,a as o,ar as u,as as d,U as e}from"./vendor-524e5929.js";const m=e("TresPerspectiveCamera",{position:[3,3,3]},null,-1),h=e("TresMeshNormalMaterial",null,null,-1),f=e("TresGridHelper",{args:[10,10]},null,-1),C=e("TresAmbientLight",{intensity:1},null,-1),N=r({__name:"mapControls",setup(g){const t={clearColor:"#82DBC5",alpha:!1,outputColorSpace:c,toneMapping:_};return(B,T)=>(n(),l(a(i),p(t,{"window-size":""}),{default:s(()=>[m,o(a(u)),o(a(d),{scale:.5},{default:s(()=>[h]),_:1}),f,C]),_:1},16))}});export{N as default};
import{Y as r,o as n,s as l,B as s,a6 as p,I as a,a7 as i,a0 as c,a1 as _,a as o,ar as u,as as d,U as e}from"./vendor-e1483ee8.js";const m=e("TresPerspectiveCamera",{position:[3,3,3]},null,-1),h=e("TresMeshNormalMaterial",null,null,-1),f=e("TresGridHelper",{args:[10,10]},null,-1),C=e("TresAmbientLight",{intensity:1},null,-1),N=r({__name:"mapControls",setup(g){const t={clearColor:"#82DBC5",alpha:!1,outputColorSpace:c,toneMapping:_};return(B,T)=>(n(),l(a(i),p(t,{"window-size":""}),{default:s(()=>[m,o(a(u)),o(a(d),{scale:.5},{default:s(()=>[h]),_:1}),f,C]),_:1},16))}});export{N as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{Y as b,Z as h,al as x,r as B,o as _,c as P,a as o,B as A,a6 as s,I as m,a7 as M,C as f,$ as C,a0 as S,a1 as F,aa as I,U as i}from"./vendor-524e5929.js";const z=i("TresPerspectiveCamera",{position:[3,3,3]},null,-1),Z=i("TresGridHelper",null,null,-1),D=i("TresAmbientLight",{intensity:1},null,-1),L=b({__name:"orbitControls",setup(T){const r={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:C,outputColorSpace:S,toneMapping:F},a=h({enableDamping:!0,dampingFactor:.05,enableZoom:!0,autoRotate:!1,autoRotateSpeed:2,maxPolarAngle:Math.PI,minPolarAngle:0,maxAzimuthAngle:Math.PI,minAzimuthAngle:-Math.PI,enablePan:!0,maxDistance:100,minDistance:0,minZoom:0,maxZoom:100,zoomSpeed:1,enableRotate:!0,rotateSpeed:1}),{pane:e}=x();e.addBinding(a,"enableDamping",{label:"启用阻尼"}),e.addBinding(a,"dampingFactor",{label:"阻尼系数",step:.01,min:0,max:1}),e.addBinding(a,"enableZoom",{label:"启用缩放"}),e.addBinding(a,"enablePan",{label:"启用移动"});const l=e.addFolder({title:"旋转"});l.addBinding(a,"autoRotate",{label:"自动旋转"}),l.addBinding(a,"autoRotateSpeed",{label:"自动旋转速度",step:.01,min:0,max:Math.PI});const n=e.addFolder({title:"角度"});n.addBinding(a,"maxPolarAngle",{label:"max极角",step:.01,min:0,max:Math.PI}),n.addBinding(a,"minPolarAngle",{label:"min极角",step:.01,min:0,max:Math.PI}),n.addBinding(a,"maxAzimuthAngle",{label:"max方位角",step:.01,min:0,max:2*Math.PI}),n.addBinding(a,"minAzimuthAngle",{label:"min方位角",step:.01,min:0,max:2*Math.PI});const d=e.addFolder({title:"距离"});d.addBinding(a,"maxDistance",{label:"最大距离",step:.01,min:0,max:100}),d.addBinding(a,"minDistance",{label:"最小距离",step:.01,min:0,max:100});const t=e.addFolder({title:"缩放"});t.addBinding(a,"enableZoom",{label:"开启"}),t.addBinding(a,"minZoom",{label:"最小",step:.01,min:0,max:10}),t.addBinding(a,"maxZoom",{label:"最大",step:.01,min:0,max:100}),t.addBinding(a,"zoomSpeed",{label:"速度",step:.01,min:0,max:20});function p(){}function c(){}function g(){}return(w,R)=>{const u=B("TresLeches");return _(),P(f,null,[o(u),o(m(M),s(r,{"window-size":""}),{default:A(()=>[z,o(m(I),s(a,{onChange:p,onStart:c,onEnd:g}),null,16),Z,D]),_:1},16)],64)}}});export{L as default};
import{Y as b,Z as h,al as x,r as B,o as _,c as P,a as o,B as A,a6 as s,I as m,a7 as M,C as f,$ as C,a0 as S,a1 as F,aa as I,U as i}from"./vendor-e1483ee8.js";const z=i("TresPerspectiveCamera",{position:[3,3,3]},null,-1),Z=i("TresGridHelper",null,null,-1),D=i("TresAmbientLight",{intensity:1},null,-1),L=b({__name:"orbitControls",setup(T){const r={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:C,outputColorSpace:S,toneMapping:F},a=h({enableDamping:!0,dampingFactor:.05,enableZoom:!0,autoRotate:!1,autoRotateSpeed:2,maxPolarAngle:Math.PI,minPolarAngle:0,maxAzimuthAngle:Math.PI,minAzimuthAngle:-Math.PI,enablePan:!0,maxDistance:100,minDistance:0,minZoom:0,maxZoom:100,zoomSpeed:1,enableRotate:!0,rotateSpeed:1}),{pane:e}=x();e.addBinding(a,"enableDamping",{label:"启用阻尼"}),e.addBinding(a,"dampingFactor",{label:"阻尼系数",step:.01,min:0,max:1}),e.addBinding(a,"enableZoom",{label:"启用缩放"}),e.addBinding(a,"enablePan",{label:"启用移动"});const l=e.addFolder({title:"旋转"});l.addBinding(a,"autoRotate",{label:"自动旋转"}),l.addBinding(a,"autoRotateSpeed",{label:"自动旋转速度",step:.01,min:0,max:Math.PI});const n=e.addFolder({title:"角度"});n.addBinding(a,"maxPolarAngle",{label:"max极角",step:.01,min:0,max:Math.PI}),n.addBinding(a,"minPolarAngle",{label:"min极角",step:.01,min:0,max:Math.PI}),n.addBinding(a,"maxAzimuthAngle",{label:"max方位角",step:.01,min:0,max:2*Math.PI}),n.addBinding(a,"minAzimuthAngle",{label:"min方位角",step:.01,min:0,max:2*Math.PI});const d=e.addFolder({title:"距离"});d.addBinding(a,"maxDistance",{label:"最大距离",step:.01,min:0,max:100}),d.addBinding(a,"minDistance",{label:"最小距离",step:.01,min:0,max:100});const t=e.addFolder({title:"缩放"});t.addBinding(a,"enableZoom",{label:"开启"}),t.addBinding(a,"minZoom",{label:"最小",step:.01,min:0,max:10}),t.addBinding(a,"maxZoom",{label:"最大",step:.01,min:0,max:100}),t.addBinding(a,"zoomSpeed",{label:"速度",step:.01,min:0,max:20});function p(){}function c(){}function g(){}return(w,R)=>{const u=B("TresLeches");return _(),P(f,null,[o(u),o(m(M),s(r,{"window-size":""}),{default:A(()=>[z,o(m(I),s(a,{onChange:p,onStart:c,onEnd:g}),null,16),Z,D]),_:1},16)],64)}}});export{L as default};

View File

@ -1 +1 @@
import{Y as i,j as _,ae as c,o as d,s as u,B as a,I as t,a7 as p,U as e,a as l,af as h,aa as m,ag as x}from"./vendor-524e5929.js";const f=e("TresPerspectiveCamera",{"look-at":[0,4,0]},null,-1),B=["blocks-pointer-events"],g=e("TresBoxGeometry",{args:[1,1,1]},null,-1),T=e("TresMeshNormalMaterial",null,null,-1),v=[g,T],b=e("TresBoxGeometry",{args:[1,1,1]},null,-1),k=e("TresMeshNormalMaterial",null,null,-1),M=e("h1",{class:"bg-white text-xs p-0.5 rounded -mt-10"}," Box2 📦 ",-1),w=e("TresGridHelper",null,null,-1),C=e("TresAmbientLight",{intensity:1},null,-1),E=i({__name:"penetrateEvent",setup(N){const r=s=>{console.log(s),x.info(s)},o=_(!0);return new c({title:"穿透事件",expanded:!0}).addBinding(o,"value",{label:"Box2📦可点"}),(s,n)=>(d(),u(t(p),{"window-size":""},{default:a(()=>[f,e("TresMesh",{position:[0,1,0],"blocks-pointer-events":!o.value},v,8,B),e("TresMesh",{position:[-2,0,-2],name:"box 2",onClick:n[0]||(n[0]=G=>r("点击了 Box2 📦"))},[b,k,l(t(h),{center:!0,transform:""},{default:a(()=>[M]),_:1})]),l(t(m)),w,C]),_:1}))}});export{E as default};
import{Y as i,j as _,ae as c,o as d,s as u,B as a,I as t,a7 as p,U as e,a as l,af as h,aa as m,ag as x}from"./vendor-e1483ee8.js";const f=e("TresPerspectiveCamera",{"look-at":[0,4,0]},null,-1),B=["blocks-pointer-events"],g=e("TresBoxGeometry",{args:[1,1,1]},null,-1),T=e("TresMeshNormalMaterial",null,null,-1),v=[g,T],b=e("TresBoxGeometry",{args:[1,1,1]},null,-1),k=e("TresMeshNormalMaterial",null,null,-1),M=e("h1",{class:"bg-white text-xs p-0.5 rounded -mt-10"}," Box2 📦 ",-1),w=e("TresGridHelper",null,null,-1),C=e("TresAmbientLight",{intensity:1},null,-1),E=i({__name:"penetrateEvent",setup(N){const r=s=>{console.log(s),x.info(s)},o=_(!0);return new c({title:"穿透事件",expanded:!0}).addBinding(o,"value",{label:"Box2📦可点"}),(s,n)=>(d(),u(t(p),{"window-size":""},{default:a(()=>[f,e("TresMesh",{position:[0,1,0],"blocks-pointer-events":!o.value},v,8,B),e("TresMesh",{position:[-2,0,-2],name:"box 2",onClick:n[0]||(n[0]=G=>r("点击了 Box2 📦"))},[b,k,l(t(h),{center:!0,transform:""},{default:a(()=>[M]),_:1})]),l(t(m)),w,C]),_:1}))}});export{E as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{Y as v,j as n,a4 as m,a3 as h,o as g,c as C,a,B as p,a6 as x,I as s,a7 as R,C as S,a0 as w,a1 as y,at as I,au as k,U as e,av as B,aw as V,as as N,ax as T,_ as b}from"./vendor-524e5929.js";const c=l=>(I("data-v-3a9657c1"),l=l(),k(),l),j=c(()=>e("TresPerspectiveCamera",{position:[0,2,5]},null,-1)),z=c(()=>e("TresGridHelper",{args:[10,10]},null,-1)),E=c(()=>e("main",null,[e("section",null,[e("h1",null,"First section")]),e("section",null,[e("h2",null,"Second section")])],-1)),F=v({__name:"scrollControls",setup(l){const u=n(),i=n(),t=n(),o=n(0);m(()=>{console.log("jaime ~ progress:",o.value)});const _={clearColor:"#333",alpha:!0,outputColorSpace:w,toneMapping:y},{onLoop:d}=h();return d(()=>{t.value&&(t.value.value.rotation.x=o.value*10,t.value.value.rotation.y=o.value*2)}),(G,r)=>(g(),C(S,null,[a(s(R),x(_,{"window-size":"",class:"canvas-class"}),{default:p(()=>[j,a(s(B),{radius:1}),z,a(s(V),{ref_key:"scRef",ref:u,modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=f=>o.value=f),distance:10,"smooth-scroll":.1,"html-scroll":""},{default:p(()=>[a(s(N),{ref_key:"sphereRef",ref:i,scale:.1,position:[1,2,0]},null,512),a(s(T),{ref_key:"boxRef",ref:t,scale:.5,color:16711935,position:[-1,1,0]},null,512)]),_:1},8,["modelValue"])]),_:1},16),E],64))}});const P=b(F,[["__scopeId","data-v-3a9657c1"]]);export{P as default};
import{Y as v,j as n,a4 as m,a3 as h,o as g,c as C,a,B as p,a6 as x,I as s,a7 as R,C as S,a0 as w,a1 as y,at as I,au as k,U as e,av as B,aw as V,as as N,ax as T,_ as b}from"./vendor-e1483ee8.js";const c=l=>(I("data-v-3a9657c1"),l=l(),k(),l),j=c(()=>e("TresPerspectiveCamera",{position:[0,2,5]},null,-1)),z=c(()=>e("TresGridHelper",{args:[10,10]},null,-1)),E=c(()=>e("main",null,[e("section",null,[e("h1",null,"First section")]),e("section",null,[e("h2",null,"Second section")])],-1)),F=v({__name:"scrollControls",setup(l){const u=n(),i=n(),t=n(),o=n(0);m(()=>{console.log("jaime ~ progress:",o.value)});const _={clearColor:"#333",alpha:!0,outputColorSpace:w,toneMapping:y},{onLoop:d}=h();return d(()=>{t.value&&(t.value.value.rotation.x=o.value*10,t.value.value.rotation.y=o.value*2)}),(G,r)=>(g(),C(S,null,[a(s(R),x(_,{"window-size":"",class:"canvas-class"}),{default:p(()=>[j,a(s(B),{radius:1}),z,a(s(V),{ref_key:"scRef",ref:u,modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=f=>o.value=f),distance:10,"smooth-scroll":.1,"html-scroll":""},{default:p(()=>[a(s(N),{ref_key:"sphereRef",ref:i,scale:.1,position:[1,2,0]},null,512),a(s(T),{ref_key:"boxRef",ref:t,scale:.5,color:16711935,position:[-1,1,0]},null,512)]),_:1},8,["modelValue"])]),_:1},16),E],64))}});const P=b(F,[["__scopeId","data-v-3a9657c1"]]);export{P as default};

View File

@ -1 +1 @@
import{Y as c,Z as d,a3 as u,o as m,s as f,B as h,a6 as p,I as t,a7 as _,a as v,aa as P,U as o,a8 as g,a9 as w,ah as x}from"./vendor-524e5929.js";const T=o("TresPerspectiveCamera",{position:[5,5,5],fov:45,near:.1,far:1e3,"look-at":[-8,3,-3]},null,-1),S=o("TresAmbientLight",{intensity:.5},null,-1),C={position:[-2,-2,-2]},M=["position","a-scale"],y=o("TresDirectionalLight",{position:[0,2,4],intensity:1,"cast-shadow":""},null,-1),z=o("TresGridHelper",null,null,-1),a=3e3,b=c({__name:"shaderParticles",setup(A){const r=d({clearColor:"black",shadows:!0,alpha:!1}),n={transparent:!0,blending:x,depthWrite:!1,vertexShader:"\n uniform float uPixelRatio;\n uniform float uSize;\n uniform float uTime;\n attribute float aScale;\n\n void main()\n {\n vec4 modelPosition = modelMatrix * vec4(position, 1.0);\n modelPosition.y += sin(uTime + modelPosition.x * 100.0) * aScale * 0.2;\n vec4 viewPosition = viewMatrix * modelPosition;\n vec4 projectionPosition = projectionMatrix * viewPosition;\n\n gl_Position = projectionPosition;\n gl_PointSize = aScale * uSize * uPixelRatio;\n gl_PointSize *= (1.0 / - viewPosition.z);\n }\n ",fragmentShader:"\n void main()\n {\n float distanceToCenter = distance(gl_PointCoord, vec2(0.5));\n float strength = 0.05 / distanceToCenter - 0.1;\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, strength);\n }\n ",uniforms:{uSize:{value:100},uPixelRatio:{value:Math.min(window.devicePixelRatio,2)},uTime:{value:0}}},i=new Float32Array(a*3),s=new Float32Array(a);for(let e=0;e<a;e++)i[e*3+0]=Math.random()*4,i[e*3+1]=Math.random()*4,i[e*3+2]=Math.random()*4,s[e]=Math.random();const{onLoop:l}=u();return l(({elapsed:e})=>{n.uniforms.uTime.value=e}),(e,B)=>(m(),f(t(_),p(r,{"window-size":""}),{default:h(()=>[T,v(t(P)),S,o("TresPoints",C,[o("TresBufferGeometry",{position:[t(i),3],"a-scale":[t(s),1]},null,8,M),o("TresShaderMaterial",g(w(n)),null,16)]),y,z]),_:1},16))}});export{b as default};
import{Y as c,Z as d,a3 as u,o as m,s as f,B as h,a6 as p,I as t,a7 as _,a as v,aa as P,U as o,a8 as g,a9 as w,ah as x}from"./vendor-e1483ee8.js";const T=o("TresPerspectiveCamera",{position:[5,5,5],fov:45,near:.1,far:1e3,"look-at":[-8,3,-3]},null,-1),S=o("TresAmbientLight",{intensity:.5},null,-1),C={position:[-2,-2,-2]},M=["position","a-scale"],y=o("TresDirectionalLight",{position:[0,2,4],intensity:1,"cast-shadow":""},null,-1),z=o("TresGridHelper",null,null,-1),a=3e3,b=c({__name:"shaderParticles",setup(A){const r=d({clearColor:"black",shadows:!0,alpha:!1}),n={transparent:!0,blending:x,depthWrite:!1,vertexShader:"\n uniform float uPixelRatio;\n uniform float uSize;\n uniform float uTime;\n attribute float aScale;\n\n void main()\n {\n vec4 modelPosition = modelMatrix * vec4(position, 1.0);\n modelPosition.y += sin(uTime + modelPosition.x * 100.0) * aScale * 0.2;\n vec4 viewPosition = viewMatrix * modelPosition;\n vec4 projectionPosition = projectionMatrix * viewPosition;\n\n gl_Position = projectionPosition;\n gl_PointSize = aScale * uSize * uPixelRatio;\n gl_PointSize *= (1.0 / - viewPosition.z);\n }\n ",fragmentShader:"\n void main()\n {\n float distanceToCenter = distance(gl_PointCoord, vec2(0.5));\n float strength = 0.05 / distanceToCenter - 0.1;\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, strength);\n }\n ",uniforms:{uSize:{value:100},uPixelRatio:{value:Math.min(window.devicePixelRatio,2)},uTime:{value:0}}},i=new Float32Array(a*3),s=new Float32Array(a);for(let e=0;e<a;e++)i[e*3+0]=Math.random()*4,i[e*3+1]=Math.random()*4,i[e*3+2]=Math.random()*4,s[e]=Math.random();const{onLoop:l}=u();return l(({elapsed:e})=>{n.uniforms.uTime.value=e}),(e,B)=>(m(),f(t(_),p(r,{"window-size":""}),{default:h(()=>[T,v(t(P)),S,o("TresPoints",C,[o("TresBufferGeometry",{position:[t(i),3],"a-scale":[t(s),1]},null,8,M),o("TresShaderMaterial",g(w(n)),null,16)]),y,z]),_:1},16))}});export{b as default};

View File

@ -1 +1 @@
import{aH as d,bp as h,Y as u,a3 as m,aE as f,o as g,s as v,B as y,a6 as S,I as c,a7 as C,a0 as w,b5 as M,a as _,aa as x,U as i,a8 as b,a9 as P}from"./vendor-524e5929.js";const l={segments:30,w:256,h:256},T=()=>{const e=new Array;for(let o=0;o<l.segments;o++)e[o]=parseInt(Math.random()*25+10);return e},G=(e,o)=>{let{x:r,y:t,radius:a,weight:n}=o;a=parseInt(a*n);const s=e.createRadialGradient(r,t,0,r,t,a);s.addColorStop(0,"rgba(255, 255, 0, 1)"),s.addColorStop(1,"rgba(255, 0, 0, 0)"),e.fillStyle=s,e.globalAlpha=n,e.beginPath(),e.arc(r,t,a,0,2*Math.PI),e.closePath(),e.fill()},U=()=>{const e={1:"#f00",.8:"#e2fa00",.6:"#33f900",.3:"#0349df",0:"#fff"},o=256,r=10,t=document.createElement("canvas");t.width=o,t.height=r,t.style.position="absolute",t.style.top="0",t.style.right="0";const a=t.getContext("2d"),n=a.createLinearGradient(0,0,o,0);for(const p in e)n.addColorStop(p,e[p]);a.fillStyle=n,a.fillRect(0,0,o,r),document.body.appendChild(t);const s=new d(t);return s.minFilter=h,s.needsUpdate=!0,s},L=()=>{const e=document.createElement("canvas");e.width=l.w,e.height=l.h,e.style.position="absolute",e.style.top="20px",e.style.right="0";const o=e.getContext("2d"),r=T();for(let a=0;a<l.segments;a++){const n=r[a]/35,s=Math.random()*l.w,p=Math.random()*l.h;G(o,{x:s,y:p,radius:80,weight:n})}document.body.appendChild(e);const t=new d(e);return t.minFilter=h,t.needsUpdate=!0,t},R=i("TresPerspectiveCamera",{position:[0,0,3e3],fov:40,near:.1,far:1e4},null,-1),A=i("TresAmbientLight",{color:"#eef0ff",intensity:1},null,-1),B=i("TresPlaneGeometry",{args:[1500,1500]},null,-1),E=u({__name:"simpleExample",setup(e){const o={clearColor:"#030311",shadows:!0,alpha:!1,outputColorSpace:w,shadowMapType:M,useLegacyLights:!0};m().onLoop(({delta:a})=>{});const r={transparent:!0,side:f,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }",fragmentShader:"\n #ifdef GL_ES\n precision highp float;\n #endif\n varying vec2 vUv;\n uniform sampler2D alphaScaleMap;\n uniform sampler2D paletteMap;\n void main() {\n vec4 alphaColor = texture2D(alphaScaleMap, vUv);\n vec4 color = texture2D(paletteMap, vec2(alphaColor.a, 0.0));\n gl_FragColor = vec4(color.r, color.g, color.b, alphaColor.a);\n }",uniforms:{alphaScaleMap:{type:"t",value:L()},paletteMap:{type:"t",value:U()}}};function t(a){a&&console.log(a)}return(a,n)=>(g(),v(c(C),S(o,{"window-size":""}),{default:y(()=>[R,_(c(x),{autoRotate:!0,autoRotateSpeed:2}),A,i("TresMesh",{position:[0,0,10],onPointerMove:t},[B,i("TresShaderMaterial",b(P(r)),null,16)],32)]),_:1},16))}});export{E as default};
import{aH as d,bp as h,Y as u,a3 as m,aE as f,o as g,s as v,B as y,a6 as S,I as c,a7 as C,a0 as w,b5 as M,a as _,aa as x,U as i,a8 as b,a9 as P}from"./vendor-e1483ee8.js";const l={segments:30,w:256,h:256},T=()=>{const e=new Array;for(let o=0;o<l.segments;o++)e[o]=parseInt(Math.random()*25+10);return e},G=(e,o)=>{let{x:r,y:t,radius:a,weight:n}=o;a=parseInt(a*n);const s=e.createRadialGradient(r,t,0,r,t,a);s.addColorStop(0,"rgba(255, 255, 0, 1)"),s.addColorStop(1,"rgba(255, 0, 0, 0)"),e.fillStyle=s,e.globalAlpha=n,e.beginPath(),e.arc(r,t,a,0,2*Math.PI),e.closePath(),e.fill()},U=()=>{const e={1:"#f00",.8:"#e2fa00",.6:"#33f900",.3:"#0349df",0:"#fff"},o=256,r=10,t=document.createElement("canvas");t.width=o,t.height=r,t.style.position="absolute",t.style.top="0",t.style.right="0";const a=t.getContext("2d"),n=a.createLinearGradient(0,0,o,0);for(const p in e)n.addColorStop(p,e[p]);a.fillStyle=n,a.fillRect(0,0,o,r),document.body.appendChild(t);const s=new d(t);return s.minFilter=h,s.needsUpdate=!0,s},L=()=>{const e=document.createElement("canvas");e.width=l.w,e.height=l.h,e.style.position="absolute",e.style.top="20px",e.style.right="0";const o=e.getContext("2d"),r=T();for(let a=0;a<l.segments;a++){const n=r[a]/35,s=Math.random()*l.w,p=Math.random()*l.h;G(o,{x:s,y:p,radius:80,weight:n})}document.body.appendChild(e);const t=new d(e);return t.minFilter=h,t.needsUpdate=!0,t},R=i("TresPerspectiveCamera",{position:[0,0,3e3],fov:40,near:.1,far:1e4},null,-1),A=i("TresAmbientLight",{color:"#eef0ff",intensity:1},null,-1),B=i("TresPlaneGeometry",{args:[1500,1500]},null,-1),E=u({__name:"simpleExample",setup(e){const o={clearColor:"#030311",shadows:!0,alpha:!1,outputColorSpace:w,shadowMapType:M,useLegacyLights:!0};m().onLoop(({delta:a})=>{});const r={transparent:!0,side:f,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }",fragmentShader:"\n #ifdef GL_ES\n precision highp float;\n #endif\n varying vec2 vUv;\n uniform sampler2D alphaScaleMap;\n uniform sampler2D paletteMap;\n void main() {\n vec4 alphaColor = texture2D(alphaScaleMap, vUv);\n vec4 color = texture2D(paletteMap, vec2(alphaColor.a, 0.0));\n gl_FragColor = vec4(color.r, color.g, color.b, alphaColor.a);\n }",uniforms:{alphaScaleMap:{type:"t",value:L()},paletteMap:{type:"t",value:U()}}};function t(a){a&&console.log(a)}return(a,n)=>(g(),v(c(C),S(o,{"window-size":""}),{default:y(()=>[R,_(c(x),{autoRotate:!0,autoRotateSpeed:2}),A,i("TresMesh",{position:[0,0,10],onPointerMove:t},[B,i("TresShaderMaterial",b(P(r)),null,16)],32)]),_:1},16))}});export{E as default};

View File

@ -1 +1 @@
import{_ as o,r as s,o as t,s as r,B as a,aC as n,a as c}from"./vendor-524e5929.js";const _={};function u(p,f){const e=s("router-view");return t(),r(n,null,{default:a(()=>[c(e)]),_:1})}const i=o(_,[["render",u]]);export{i as default};
import{_ as o,r as s,o as t,s as r,B as a,aC as n,a as c}from"./vendor-e1483ee8.js";const _={};function u(p,f){const e=s("router-view");return t(),r(n,null,{default:a(()=>[c(e)]),_:1})}const i=o(_,[["render",u]]);export{i as default};

View File

@ -1 +1 @@
import{Y as d,Z as i,$ as _,a0 as m,a1 as f,j as l,a2 as T,a3 as M,a4 as g,a5 as w,o as P,s as v,B as y,a6 as S,I as c,a7 as R,a as x,a8 as D,a9 as b,aa as k,U as e}from"./vendor-524e5929.js";const A=e("TresPerspectiveCamera",{position:[15,15,15],fov:45,near:.1,far:1e3,"look-at":[0,0,0]},null,-1),B=e("TresAmbientLight",{intensity:.5},null,-1),L=e("TresSphereGeometry",{args:[2,32,32]},null,-1),z=e("TresMeshToonMaterial",{color:"#006060"},null,-1),C=[L,z],G=e("TresSphereGeometry",{args:[2,32,32]},null,-1),I=e("TresMeshToonMaterial",{color:"#006060"},null,-1),F=[G,I],Z=["rotation"],N=e("TresPlaneGeometry",{args:[20,20,20,20]},null,-1),j=e("TresMeshToonMaterial",null,null,-1),E=[N,j],V=e("TresDirectionalLight",{position:[10,2,4],intensity:1,"cast-shadow":""},null,-1),H=e("TresGridHelper",null,null,-1),q=d({__name:"theBasic",setup(U){const h=i({clearColor:"#201919",shadows:!0,alpha:!1,shadowMapType:_,outputColorSpace:m,toneMapping:f}),u=i({enableDamping:!0,dampingFactor:.05,enableZoom:!0,autoRotate:!1,autoRotateSpeed:2,maxPolarAngle:Math.PI,minPolarAngle:0,maxAzimuthAngle:Math.PI,minAzimuthAngle:-Math.PI,enablePan:!0,keyPanSpeed:7,maxDistance:100,minDistance:0,minZoom:0,maxZoom:100,zoomSpeed:1,enableRotate:!0,rotateSpeed:1}),t=l(),s=l(),o=T(),{onLoop:p}=M();p(({elapsed:a})=>{t.value&&(t.value.position.y+=Math.sin(a)*.01,s.value.position.y+=Math.sin(a)*.01)});function n(a){a&&a.object.material.color.set("#DFFF45")}function r(a){a&&a.material.color.set("#006060")}return g(()=>{o.value&&(o.value.shadow.mapSize.set(1e3,1e3),o.value.shadow.camera.near=.5,o.value.shadow.camera.top=20,o.value.shadow.camera.right=20,o.value.shadow.camera.left=-20,o.value.shadow.camera.bottom=-20)}),w(()=>{}),(a,Y)=>(P(),v(c(R),S(h,{"window-size":""}),{default:y(()=>[A,x(c(k),D(b(u)),null,16),B,e("TresMesh",{ref_key:"sphereRef",ref:t,position:[0,4,0],"cast-shadow":"",onPointerEnter:n,onPointerLeave:r},C,544),e("TresMesh",{ref_key:"sphereRef2",ref:s,position:[4,4,0],"cast-shadow":"",onPointerEnter:n,onPointerLeave:r},F,544),e("TresMesh",{rotation:[-Math.PI/2,0,0],"receive-shadow":""},E,8,Z),e("TresDirectionalLight",{ref_key:"TDirectionalLight",ref:o,position:[10,8,4],intensity:1,"cast-shadow":""},null,512),V,H]),_:1},16))}});export{q as default};
import{Y as d,Z as i,$ as _,a0 as m,a1 as f,j as l,a2 as T,a3 as M,a4 as g,a5 as w,o as P,s as v,B as y,a6 as S,I as c,a7 as R,a as x,a8 as D,a9 as b,aa as k,U as e}from"./vendor-e1483ee8.js";const A=e("TresPerspectiveCamera",{position:[15,15,15],fov:45,near:.1,far:1e3,"look-at":[0,0,0]},null,-1),B=e("TresAmbientLight",{intensity:.5},null,-1),L=e("TresSphereGeometry",{args:[2,32,32]},null,-1),z=e("TresMeshToonMaterial",{color:"#006060"},null,-1),C=[L,z],G=e("TresSphereGeometry",{args:[2,32,32]},null,-1),I=e("TresMeshToonMaterial",{color:"#006060"},null,-1),F=[G,I],Z=["rotation"],N=e("TresPlaneGeometry",{args:[20,20,20,20]},null,-1),j=e("TresMeshToonMaterial",null,null,-1),E=[N,j],V=e("TresDirectionalLight",{position:[10,2,4],intensity:1,"cast-shadow":""},null,-1),H=e("TresGridHelper",null,null,-1),q=d({__name:"theBasic",setup(U){const h=i({clearColor:"#201919",shadows:!0,alpha:!1,shadowMapType:_,outputColorSpace:m,toneMapping:f}),u=i({enableDamping:!0,dampingFactor:.05,enableZoom:!0,autoRotate:!1,autoRotateSpeed:2,maxPolarAngle:Math.PI,minPolarAngle:0,maxAzimuthAngle:Math.PI,minAzimuthAngle:-Math.PI,enablePan:!0,keyPanSpeed:7,maxDistance:100,minDistance:0,minZoom:0,maxZoom:100,zoomSpeed:1,enableRotate:!0,rotateSpeed:1}),t=l(),s=l(),o=T(),{onLoop:p}=M();p(({elapsed:a})=>{t.value&&(t.value.position.y+=Math.sin(a)*.01,s.value.position.y+=Math.sin(a)*.01)});function n(a){a&&a.object.material.color.set("#DFFF45")}function r(a){a&&a.material.color.set("#006060")}return g(()=>{o.value&&(o.value.shadow.mapSize.set(1e3,1e3),o.value.shadow.camera.near=.5,o.value.shadow.camera.top=20,o.value.shadow.camera.right=20,o.value.shadow.camera.left=-20,o.value.shadow.camera.bottom=-20)}),w(()=>{}),(a,Y)=>(P(),v(c(R),S(h,{"window-size":""}),{default:y(()=>[A,x(c(k),D(b(u)),null,16),B,e("TresMesh",{ref_key:"sphereRef",ref:t,position:[0,4,0],"cast-shadow":"",onPointerEnter:n,onPointerLeave:r},C,544),e("TresMesh",{ref_key:"sphereRef2",ref:s,position:[4,4,0],"cast-shadow":"",onPointerEnter:n,onPointerLeave:r},F,544),e("TresMesh",{rotation:[-Math.PI/2,0,0],"receive-shadow":""},E,8,Z),e("TresDirectionalLight",{ref_key:"TDirectionalLight",ref:o,position:[10,8,4],intensity:1,"cast-shadow":""},null,512),V,H]),_:1},16))}});export{q as default};

View File

@ -1 +1 @@
import{Y as f,Z as M,$ as T,a0 as b,a1 as m,j as a,a5 as x,ae as g,ai as B,aj as y,w as V,ak as v,o as t,s as w,B as k,a6 as C,I as i,a7 as G,U as e,c as r,V as n,a as P,aa as L}from"./vendor-524e5929.js";const N=e("TresPerspectiveCamera",{position:[11,11,11],fov:45,near:.1,far:1e3,"look-at":[-8,3,-3]},null,-1),R=e("TresDirectionalLight",{position:[0,8,4],intensity:.2,"cast-shadow":""},null,-1),S=["material"],j=e("TresBoxGeometry",{args:[1,1,1]},null,-1),E=[j],I={key:0,position:[4,0,0]},U=e("TresBoxGeometry",{args:[1,1,1]},null,-1),$=e("TresMeshToonMaterial",{color:"#efefef"},null,-1),z=[U,$],A={key:1,position:[4,1,0]},D=e("TresBoxGeometry",{args:[1,1,1]},null,-1),Y=e("TresMeshToonMaterial",{color:"#efefef"},null,-1),Z=[D,Y],q={key:2,position:[0,-4,-5]},F=e("TresGroup",null,[e("TresMesh",{position:[0,0,0]},[e("TresBoxGeometry",{args:[1,1,1]}),e("TresMeshBasicMaterial",{color:"#efef11"})]),e("TresMesh",{position:[0,2,0]},[e("TresBoxGeometry",{args:[1,1,1]}),e("TresMeshBasicMaterial",{color:"#ef11ef"})])],-1),H=[F],J=e("TresAmbientLight",{intensity:.5},null,-1),Q=f({__name:"theConditional",setup(K){const p=M({clearColor:"#000000",shadows:!0,alpha:!1,shadowMapType:T,outputColorSpace:b,toneMapping:m,useLegacyLights:!1}),s=a({groupVisible:!0,boxPropMaterialVisible:!0}),_=a(null),l=a(!0);let o=null,c=null;x(()=>{o||(o=new g({title:"显隐参数",expanded:!0}),o.addBinding(l,"value",{label:"boxVisible"}),o.addBinding(s.value,"boxPropMaterialVisible"),o.addBinding(s.value,"groupVisible")),c=B().proxy}),y(()=>{o&&(o.dispose(),o=null)}),V(()=>l,(u,d)=>{d!==void 0&&(c.$refs.boxRef.visible=u.value)},{deep:!0});const h=new v({color:"#ff0000"});return(u,d)=>(t(),w(i(G),C(p,{"window-size":""}),{default:k(()=>[N,R,e("TresMesh",{ref_key:"boxRef",ref:_,position:[0,0,0],material:i(h)},E,8,S),s.value.boxPropMaterialVisible?(t(),r("TresMesh",I,z)):n("",!0),s.value.boxPropMaterialVisible?(t(),r("TresMesh",A,Z)):n("",!0),s.value.groupVisible?(t(),r("TresGroup",q,H)):n("",!0),P(i(L)),J]),_:1},16))}});export{Q as default};
import{Y as f,Z as M,$ as T,a0 as b,a1 as m,j as a,a5 as x,ae as g,ai as B,aj as y,w as V,ak as v,o as t,s as w,B as k,a6 as C,I as i,a7 as G,U as e,c as r,V as n,a as P,aa as L}from"./vendor-e1483ee8.js";const N=e("TresPerspectiveCamera",{position:[11,11,11],fov:45,near:.1,far:1e3,"look-at":[-8,3,-3]},null,-1),R=e("TresDirectionalLight",{position:[0,8,4],intensity:.2,"cast-shadow":""},null,-1),S=["material"],j=e("TresBoxGeometry",{args:[1,1,1]},null,-1),E=[j],I={key:0,position:[4,0,0]},U=e("TresBoxGeometry",{args:[1,1,1]},null,-1),$=e("TresMeshToonMaterial",{color:"#efefef"},null,-1),z=[U,$],A={key:1,position:[4,1,0]},D=e("TresBoxGeometry",{args:[1,1,1]},null,-1),Y=e("TresMeshToonMaterial",{color:"#efefef"},null,-1),Z=[D,Y],q={key:2,position:[0,-4,-5]},F=e("TresGroup",null,[e("TresMesh",{position:[0,0,0]},[e("TresBoxGeometry",{args:[1,1,1]}),e("TresMeshBasicMaterial",{color:"#efef11"})]),e("TresMesh",{position:[0,2,0]},[e("TresBoxGeometry",{args:[1,1,1]}),e("TresMeshBasicMaterial",{color:"#ef11ef"})])],-1),H=[F],J=e("TresAmbientLight",{intensity:.5},null,-1),Q=f({__name:"theConditional",setup(K){const p=M({clearColor:"#000000",shadows:!0,alpha:!1,shadowMapType:T,outputColorSpace:b,toneMapping:m,useLegacyLights:!1}),s=a({groupVisible:!0,boxPropMaterialVisible:!0}),_=a(null),l=a(!0);let o=null,c=null;x(()=>{o||(o=new g({title:"显隐参数",expanded:!0}),o.addBinding(l,"value",{label:"boxVisible"}),o.addBinding(s.value,"boxPropMaterialVisible"),o.addBinding(s.value,"groupVisible")),c=B().proxy}),y(()=>{o&&(o.dispose(),o=null)}),V(()=>l,(u,d)=>{d!==void 0&&(c.$refs.boxRef.visible=u.value)},{deep:!0});const h=new v({color:"#ff0000"});return(u,d)=>(t(),w(i(G),C(p,{"window-size":""}),{default:k(()=>[N,R,e("TresMesh",{ref_key:"boxRef",ref:_,position:[0,0,0],material:i(h)},E,8,S),s.value.boxPropMaterialVisible?(t(),r("TresMesh",I,z)):n("",!0),s.value.boxPropMaterialVisible?(t(),r("TresMesh",A,Z)):n("",!0),s.value.groupVisible?(t(),r("TresGroup",q,H)):n("",!0),P(i(L)),J]),_:1},16))}});export{Q as default};

View File

@ -1 +1 @@
import{Y as d,o,s as m,B as C,a6 as g,I as c,a7 as T,$ as B,a0 as M,a1 as k,a as w,aa as P,c as n,D as a,C as s,U as t}from"./vendor-524e5929.js";const x=t("TresPerspectiveCamera",{position:[11,11,11],"look-at":[0,0,0]},null,-1),y=["position"],L=t("TresBoxGeometry",{args:[1,1,1]},null,-1),S=t("TresMeshToonMaterial",{color:"#efefef"},null,-1),b=[L,S],E=t("TresDirectionalLight",{intensity:1},null,-1),F=t("TresAmbientLight",{intensity:1},null,-1),G=d({__name:"theEvents",setup(N){const u={clearColor:"#202020",shadows:!0,alpha:!1,shadowMapType:B,outputColorSpace:M,toneMapping:k};function p(e){e&&e.object.material.color.set("#008080")}function _(e){e&&e.object.material.color.set("#CCFF03")}function f(e){e&&e.material.color.set("#efefef")}function h(e){e&&console.log(e)}return(e,j)=>(o(),m(c(T),g(u,{"window-size":""}),{default:C(()=>[x,w(c(P)),(o(),n(s,null,a([-2.5,0,2.5],r=>(o(),n(s,null,[(o(),n(s,null,a([-2.5,0,2.5],i=>(o(),n(s,null,[(o(),n(s,null,a([-2.5,0,2.5],l=>t("TresMesh",{key:"".concat([r,i,l]),position:[r,i,l],onClick:p,onPointerEnter:_,onPointerLeave:f,onPointerMove:h},b,40,y)),64))],64))),64))],64))),64)),E,F]),_:1},16))}});export{G as default};
import{Y as d,o,s as m,B as C,a6 as g,I as c,a7 as T,$ as B,a0 as M,a1 as k,a as w,aa as P,c as n,D as a,C as s,U as t}from"./vendor-e1483ee8.js";const x=t("TresPerspectiveCamera",{position:[11,11,11],"look-at":[0,0,0]},null,-1),y=["position"],L=t("TresBoxGeometry",{args:[1,1,1]},null,-1),S=t("TresMeshToonMaterial",{color:"#efefef"},null,-1),b=[L,S],E=t("TresDirectionalLight",{intensity:1},null,-1),F=t("TresAmbientLight",{intensity:1},null,-1),G=d({__name:"theEvents",setup(N){const u={clearColor:"#202020",shadows:!0,alpha:!1,shadowMapType:B,outputColorSpace:M,toneMapping:k};function p(e){e&&e.object.material.color.set("#008080")}function _(e){e&&e.object.material.color.set("#CCFF03")}function f(e){e&&e.material.color.set("#efefef")}function h(e){e&&console.log(e)}return(e,j)=>(o(),m(c(T),g(u,{"window-size":""}),{default:C(()=>[x,w(c(P)),(o(),n(s,null,a([-2.5,0,2.5],r=>(o(),n(s,null,[(o(),n(s,null,a([-2.5,0,2.5],i=>(o(),n(s,null,[(o(),n(s,null,a([-2.5,0,2.5],l=>t("TresMesh",{key:"".concat([r,i,l]),position:[r,i,l],onClick:p,onPointerEnter:_,onPointerLeave:f,onPointerMove:h},b,40,y)),64))],64))),64))],64))),64)),E,F]),_:1},16))}});export{G as default};

View File

@ -1 +1 @@
import{Y as a,a3 as r,j as n,o as i,s as c,B as l,I as o,a7 as _,a as p,aa as h,U as e}from"./vendor-524e5929.js";const u=e("TresPerspectiveCamera",{position:[5,5,5],fov:75,aspect:1,near:.1,far:1e3},null,-1),d=e("TresAmbientLight",{color:16777215,intensity:.5},null,-1),f=e("TresMesh",{scale:1,position:[-4,0,0],"cast-shadow":""},[e("TresSphereGeometry",{args:[1,500,500]}),e("TresMeshToonMaterial",{color:"#FBB03B"})],-1),T=e("TresMesh",{scale:1,position:[4,0,0],"cast-shadow":""},[e("TresSphereGeometry",{args:[1,500,500]}),e("TresMeshToonMaterial",{color:"teal"})],-1),m=[f,T],B=e("TresDirectionalLight",{position:[0,2,4],intensity:2,"cast-shadow":""},null,-1),g=e("TresAxesHelper",null,null,-1),v=a({__name:"theGroups",setup(w){const{onLoop:t}=r(),s=n();return t(()=>{s.value&&(s.value.rotation.y+=.01)}),(y,M)=>(i(),c(o(_),{clearColor:"#000000","window-size":""},{default:l(()=>[u,p(o(h)),d,e("TresGroup",{ref_key:"groupRef",ref:s,position:[0,-4,-5]},m,512),B,g]),_:1}))}});export{v as default};
import{Y as a,a3 as r,j as n,o as i,s as c,B as l,I as o,a7 as _,a as p,aa as h,U as e}from"./vendor-e1483ee8.js";const u=e("TresPerspectiveCamera",{position:[5,5,5],fov:75,aspect:1,near:.1,far:1e3},null,-1),d=e("TresAmbientLight",{color:16777215,intensity:.5},null,-1),f=e("TresMesh",{scale:1,position:[-4,0,0],"cast-shadow":""},[e("TresSphereGeometry",{args:[1,500,500]}),e("TresMeshToonMaterial",{color:"#FBB03B"})],-1),T=e("TresMesh",{scale:1,position:[4,0,0],"cast-shadow":""},[e("TresSphereGeometry",{args:[1,500,500]}),e("TresMeshToonMaterial",{color:"teal"})],-1),m=[f,T],B=e("TresDirectionalLight",{position:[0,2,4],intensity:2,"cast-shadow":""},null,-1),g=e("TresAxesHelper",null,null,-1),v=a({__name:"theGroups",setup(w){const{onLoop:t}=r(),s=n();return t(()=>{s.value&&(s.value.rotation.y+=.01)}),(y,M)=>(i(),c(o(_),{clearColor:"#000000","window-size":""},{default:l(()=>[u,p(o(h)),d,e("TresGroup",{ref_key:"groupRef",ref:s,position:[0,-4,-5]},m,512),B,g]),_:1}))}});export{v as default};

View File

@ -1 +1 @@
import{Y as f,j as o,Z as m,al as b,o as c,s as p,B as w,a6 as v,I as r,a7 as B,$ as g,a0 as Y,a1 as Z,a as X,aa as C,U as a,ay as T,V as M}from"./vendor-524e5929.js";const k=a("TresPerspectiveCamera",{position:[3,3,3]},null,-1),y=a("TresBoxGeometry",null,null,-1),S=a("TresMeshNormalMaterial",null,null,-1),N=[y,S],R=a("TresSphereGeometry",null,null,-1),j=a("TresMeshNormalMaterial",null,null,-1),G=[R,j],V=a("TresAmbientLight",{intensity:1},null,-1),z=a("TresGridHelper",null,null,-1),A=f({__name:"transformControls",setup($){const h={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:g,outputColorSpace:Y,toneMapping:Z},i=o(),d=o(),n=o();function u(s){n.value=s}const _=o(),e=m({mode:"translate",enabled:!0,space:"world",axis:"XYZ",size:1,showX:!0,showY:!0,showZ:!0}),{pane:t}=b();return t.addBlade({view:"list",label:"模式",options:[{text:"移动",value:"translate"},{text:"旋转",value:"rotate"},{text:"缩放",value:"scale"}],value:e.mode}).on("change",s=>{e.mode=s.value}),t.addBinding(e,"enabled",{label:"开启"}),t.addBlade({view:"list",label:"Space",options:[{text:"世界坐标",value:"world"},{text:"本地坐标",value:"local"}],value:e.space}).on("change",s=>{e.space=s.value}),t.addBlade({view:"list",label:"轴",options:[{text:"X",value:"X"},{text:"Y",value:"Y"},{text:"Z",value:"Z"},{text:"XY",value:"XY"},{text:"YZ",value:"YZ"},{text:"XZ",value:"XZ"},{text:"XYZ",value:"XYZ"}],value:e.axis}),t.addBinding(e,"size",{label:"大小",step:.01,min:0,max:10}),t.addBinding(e,"showX",{label:"显示X轴"}),t.addBinding(e,"showY",{label:"显示Y轴"}),t.addBinding(e,"showZ",{label:"显示Z轴"}),(s,l)=>(c(),p(r(B),v(h,{ref_key:"context",ref:_,"window-size":""}),{default:w(()=>[k,X(r(C),{"make-default":""}),a("TresMesh",{ref_key:"boxRef",ref:i,position:[-2,1,0],onClick:l[0]||(l[0]=x=>u(i.value))},N,512),n.value?(c(),p(r(T),v({key:0,object:n.value},e),null,16,["object"])):M("",!0),a("TresMesh",{ref_key:"sphereRef",ref:d,position:[2,1,0],onClick:l[1]||(l[1]=x=>u(d.value))},G,512),V,z]),_:1},16))}});export{A as default};
import{Y as f,j as o,Z as m,al as b,o as c,s as p,B as w,a6 as v,I as r,a7 as B,$ as g,a0 as Y,a1 as Z,a as X,aa as C,U as a,ay as T,V as M}from"./vendor-e1483ee8.js";const k=a("TresPerspectiveCamera",{position:[3,3,3]},null,-1),y=a("TresBoxGeometry",null,null,-1),S=a("TresMeshNormalMaterial",null,null,-1),N=[y,S],R=a("TresSphereGeometry",null,null,-1),j=a("TresMeshNormalMaterial",null,null,-1),G=[R,j],V=a("TresAmbientLight",{intensity:1},null,-1),z=a("TresGridHelper",null,null,-1),A=f({__name:"transformControls",setup($){const h={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:g,outputColorSpace:Y,toneMapping:Z},i=o(),d=o(),n=o();function u(s){n.value=s}const _=o(),e=m({mode:"translate",enabled:!0,space:"world",axis:"XYZ",size:1,showX:!0,showY:!0,showZ:!0}),{pane:t}=b();return t.addBlade({view:"list",label:"模式",options:[{text:"移动",value:"translate"},{text:"旋转",value:"rotate"},{text:"缩放",value:"scale"}],value:e.mode}).on("change",s=>{e.mode=s.value}),t.addBinding(e,"enabled",{label:"开启"}),t.addBlade({view:"list",label:"Space",options:[{text:"世界坐标",value:"world"},{text:"本地坐标",value:"local"}],value:e.space}).on("change",s=>{e.space=s.value}),t.addBlade({view:"list",label:"轴",options:[{text:"X",value:"X"},{text:"Y",value:"Y"},{text:"Z",value:"Z"},{text:"XY",value:"XY"},{text:"YZ",value:"YZ"},{text:"XZ",value:"XZ"},{text:"XYZ",value:"XYZ"}],value:e.axis}),t.addBinding(e,"size",{label:"大小",step:.01,min:0,max:10}),t.addBinding(e,"showX",{label:"显示X轴"}),t.addBinding(e,"showY",{label:"显示Y轴"}),t.addBinding(e,"showZ",{label:"显示Z轴"}),(s,l)=>(c(),p(r(B),v(h,{ref_key:"context",ref:_,"window-size":""}),{default:w(()=>[k,X(r(C),{"make-default":""}),a("TresMesh",{ref_key:"boxRef",ref:i,position:[-2,1,0],onClick:l[0]||(l[0]=x=>u(i.value))},N,512),n.value?(c(),p(r(T),v({key:0,object:n.value},e),null,16,["object"])):M("",!0),a("TresMesh",{ref_key:"sphereRef",ref:d,position:[2,1,0],onClick:l[1]||(l[1]=x=>u(d.value))},G,512),V,z]),_:1},16))}});export{A as default};

File diff suppressed because one or more lines are too long

14
dist/static/vendor-e1483ee8.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
var B=Object.defineProperty;var m=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var _=(s,a,e)=>a in s?B(s,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[a]=e,c=(s,a)=>{for(var e in a||(a={}))R.call(a,e)&&_(s,e,a[e]);if(m)for(var e of m(a))z.call(a,e)&&_(s,e,a[e]);return s};import{Y as h,Z as r,az as b,aM as g,j as v,a4 as x,w as Y,o as u,s as C,I as k,aN as S,aO as y,ae as Z,c as $,a as d,B as w,C as X,a8 as M,a9 as P,aC as E}from"./vendor-524e5929.js";import{_ as F}from"./pagesShow.vue_vue_type_style_index_0_lang-4a631ac6.js";import{_ as N}from"./loading.vue_vue_type_script_setup_true_lang-fa08807f.js";import"./_commonjsHelpers-725317a4.js";const j=h({__name:"precipitation",props:{speed:{default:12},randomness:{default:0},count:{default:6e3},size:{default:7},areaX:{default:1500},areaY:{default:1e3},areaZ:{default:1500},type:{default:"snow"},color:{default:"#fff"}},async setup(s){let a,e;const t=s,n={snow:"./plugins/digitalCity/image/snow.png",rain:"./plugins/digitalCity/image/rain.png",cilcle:"./plugins/digitalCity/image/cilcle.png"},i=r({});n[t.type]&&(i.value=([a,e]=b(()=>g({map:n[t.type]})),a=await a,e(),a));const o=v();return x(async()=>{}),Y(()=>t.type,async(p,l)=>{var f;p!=l&&((f=i.value)!=null&&f.map&&i.value.map.dispose(),i.value=await g({map:n[p]?n[p]:n.cilcle}))}),(p,l)=>(u(),C(k(S),{ref_key:"precipitationRef",ref:o,position:[0,t.areaY/2,0],speed:t.speed,color:t.color,alphaTest:.5,area:[t.areaX,t.areaY,t.areaZ],count:t.count,depthWrite:!0,randomness:t.randomness,size:t.size,opacity:1,map:i.value.map,alphaMap:i.value.map},null,8,["position","speed","color","area","count","randomness","size","map","alphaMap"]))}}),V=h({__name:"weather",setup(s){const a=v();x(()=>{a.value&&a.value.$refs.perspectiveCameraRef.position.set(750,500,800)});const e=r({speed:12,size:10,count:6e3,color:"#fff",type:"snow"}),t=r({areaX:1500,areaY:1e3,areaZ:1500}),n=r(c(c({},y(e)),y(t))),o=new Z({title:"天气",expanded:!0}).addFolder({title:"下落物"});return o.addBinding(e,"speed",{label:"速度",min:0,max:30,step:1}),o.addBinding(e,"color",{label:"颜色"}),o.addBinding(e,"size",{label:"大小",min:0,max:26,step:1}),o.addBinding(e,"count",{label:"数量",min:1e3,max:1e4,step:100}),o.addBinding(e,"type",{view:"list",label:"类型",options:[{text:"雪",value:"snow"},{text:"雨",value:"rain"},{text:"点",value:"point"}]}),(p,l)=>(u(),$(X,null,[d(N),d(F,{ref_key:"pagesShowRef",ref:a,autoRotate:!1},{ability:w(()=>[(u(),C(E,null,{default:w(()=>[d(j,M(P(n)),null,16)]),_:1}))]),_:1},512)],64))}});export{V as default};
var B=Object.defineProperty;var m=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var _=(s,a,e)=>a in s?B(s,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[a]=e,c=(s,a)=>{for(var e in a||(a={}))R.call(a,e)&&_(s,e,a[e]);if(m)for(var e of m(a))z.call(a,e)&&_(s,e,a[e]);return s};import{Y as h,Z as r,az as b,aM as g,j as v,a4 as x,w as Y,o as u,s as C,I as k,aN as S,aO as y,ae as Z,c as $,a as d,B as w,C as X,a8 as M,a9 as P,aC as E}from"./vendor-e1483ee8.js";import{_ as F}from"./pagesShow.vue_vue_type_style_index_0_lang-394dddd1.js";import{_ as N}from"./loading.vue_vue_type_script_setup_true_lang-5ac30ba9.js";import"./_commonjsHelpers-725317a4.js";const j=h({__name:"precipitation",props:{speed:{default:12},randomness:{default:0},count:{default:6e3},size:{default:7},areaX:{default:1500},areaY:{default:1e3},areaZ:{default:1500},type:{default:"snow"},color:{default:"#fff"}},async setup(s){let a,e;const t=s,n={snow:"./plugins/digitalCity/image/snow.png",rain:"./plugins/digitalCity/image/rain.png",cilcle:"./plugins/digitalCity/image/cilcle.png"},i=r({});n[t.type]&&(i.value=([a,e]=b(()=>g({map:n[t.type]})),a=await a,e(),a));const o=v();return x(async()=>{}),Y(()=>t.type,async(p,l)=>{var f;p!=l&&((f=i.value)!=null&&f.map&&i.value.map.dispose(),i.value=await g({map:n[p]?n[p]:n.cilcle}))}),(p,l)=>(u(),C(k(S),{ref_key:"precipitationRef",ref:o,position:[0,t.areaY/2,0],speed:t.speed,color:t.color,alphaTest:.5,area:[t.areaX,t.areaY,t.areaZ],count:t.count,depthWrite:!0,randomness:t.randomness,size:t.size,opacity:1,map:i.value.map,alphaMap:i.value.map},null,8,["position","speed","color","area","count","randomness","size","map","alphaMap"]))}}),V=h({__name:"weather",setup(s){const a=v();x(()=>{a.value&&a.value.$refs.perspectiveCameraRef.position.set(750,500,800)});const e=r({speed:12,size:10,count:6e3,color:"#fff",type:"snow"}),t=r({areaX:1500,areaY:1e3,areaZ:1500}),n=r(c(c({},y(e)),y(t))),o=new Z({title:"天气",expanded:!0}).addFolder({title:"下落物"});return o.addBinding(e,"speed",{label:"速度",min:0,max:30,step:1}),o.addBinding(e,"color",{label:"颜色"}),o.addBinding(e,"size",{label:"大小",min:0,max:26,step:1}),o.addBinding(e,"count",{label:"数量",min:1e3,max:1e4,step:100}),o.addBinding(e,"type",{view:"list",label:"类型",options:[{text:"雪",value:"snow"},{text:"雨",value:"rain"},{text:"点",value:"point"}]}),(p,l)=>(u(),$(X,null,[d(N),d(F,{ref_key:"pagesShowRef",ref:a,autoRotate:!1},{ability:w(()=>[(u(),C(E,null,{default:w(()=>[d(j,M(P(n)),null,16)]),_:1}))]),_:1},512)],64))}});export{V as default};

View File

@ -1 +1 @@
import{Y as p,j as d,az as u,aA as m,o as r,s as n,B as t,U as s,a as c,I as e,af as h,aB as f,a6 as w,a7 as g,$ as b,a0 as x,a1 as C,aa as B,aC as y}from"./vendor-524e5929.js";const M=["object"],S=s("iframe",{class:"rounded-lg w-[1024px] h-[670px]",src:"https://www.icegl.cn",frameborder:"0"},null,-1),T=p({__name:"laptop",async setup(l){let a,o;const i=d(),{nodes:_}=([a,o]=u(()=>m("./plugins/basic/htmls/model/model.gltf",{draco:!0})),a=await a,o(),a);return(j,A)=>(r(),n(e(f),null,{default:t(()=>[s("primitive",{ref_key:"primitiveref",ref:i,object:e(_).Macbook},[c(e(h),{transform:"","wrapper-class":"webpage","distance-factor":11,position:[0,10.5,-13.6],occlude:"","rotation-x":-.256},{default:t(()=>[S]),_:1})],8,M)]),_:1}))}}),k=s("TresPerspectiveCamera",{position:[-5,4,3]},null,-1),v=s("TresAmbientLight",{intensity:1},null,-1),$=s("TresDirectionalLight",{intensity:2,position:[2,3,0],"cast-shadow":!0,"shadow-camera-far":50,"shadow-camera-left":-10,"shadow-camera-right":10,"shadow-camera-top":10,"shadow-camera-bottom":-10},null,-1),z=p({__name:"website",setup(l){const a={clearColor:"#241a1a",shadows:!0,alpha:!1,shadowMapType:b,outputColorSpace:x,toneMapping:C};return(o,i)=>(r(),n(e(g),w(a,{"window-size":""}),{default:t(()=>[k,c(e(B)),(r(),n(y,null,{default:t(()=>[c(T)]),_:1})),v,$]),_:1},16))}});export{z as default};
import{Y as p,j as d,az as u,aA as m,o as r,s as n,B as t,U as s,a as c,I as e,af as h,aB as f,a6 as w,a7 as g,$ as b,a0 as x,a1 as C,aa as B,aC as y}from"./vendor-e1483ee8.js";const M=["object"],S=s("iframe",{class:"rounded-lg w-[1024px] h-[670px]",src:"https://www.icegl.cn",frameborder:"0"},null,-1),T=p({__name:"laptop",async setup(l){let a,o;const i=d(),{nodes:_}=([a,o]=u(()=>m("./plugins/basic/htmls/model/model.gltf",{draco:!0})),a=await a,o(),a);return(j,A)=>(r(),n(e(f),null,{default:t(()=>[s("primitive",{ref_key:"primitiveref",ref:i,object:e(_).Macbook},[c(e(h),{transform:"","wrapper-class":"webpage","distance-factor":11,position:[0,10.5,-13.6],occlude:"","rotation-x":-.256},{default:t(()=>[S]),_:1})],8,M)]),_:1}))}}),k=s("TresPerspectiveCamera",{position:[-5,4,3]},null,-1),v=s("TresAmbientLight",{intensity:1},null,-1),$=s("TresDirectionalLight",{intensity:2,position:[2,3,0],"cast-shadow":!0,"shadow-camera-far":50,"shadow-camera-left":-10,"shadow-camera-right":10,"shadow-camera-top":10,"shadow-camera-bottom":-10},null,-1),z=p({__name:"website",setup(l){const a={clearColor:"#241a1a",shadows:!0,alpha:!1,shadowMapType:b,outputColorSpace:x,toneMapping:C};return(o,i)=>(r(),n(e(g),w(a,{"window-size":""}),{default:t(()=>[k,c(e(B)),(r(),n(y,null,{default:t(()=>[c(T)]),_:1})),v,$]),_:1},16))}});export{z as default};

View File

@ -1 +1 @@
import{Y as l,j as s,ae as i,o as c,s as p,B as d,a6 as u,I as a,a7 as _,$ as h,a0 as f,a1 as m,U as e,a as t,aF as C,aa as T}from"./vendor-524e5929.js";const g=e("TresPerspectiveCamera",{position:[3,3,3]},null,-1),w=e("TresTorusGeometry",null,null,-1),B=e("TresGridHelper",{args:[10,10]},null,-1),x=e("TresAmbientLight",{intensity:1},null,-1),M=e("TresDirectionalLight",{intensity:1,position:[2,2,2]},null,-1),G=l({__name:"wobbleMaterial",setup(y){const n={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:h,outputColorSpace:f,toneMapping:m},r=s(),o=s("#5384ff");return new i({title:"流体波动",expanded:!0}).addBinding(o,"value",{label:"颜色"}),(S,k)=>(c(),p(a(_),u(n,{ref_key:"context",ref:r,"window-size":""}),{default:d(()=>[g,e("TresMesh",null,[w,t(a(C),{color:o.value,speed:3,factor:8},null,8,["color"])]),B,x,M,t(a(T))]),_:1},16))}});export{G as default};
import{Y as l,j as s,ae as i,o as c,s as p,B as d,a6 as u,I as a,a7 as _,$ as h,a0 as f,a1 as m,U as e,a as t,aF as C,aa as T}from"./vendor-e1483ee8.js";const g=e("TresPerspectiveCamera",{position:[3,3,3]},null,-1),w=e("TresTorusGeometry",null,null,-1),B=e("TresGridHelper",{args:[10,10]},null,-1),x=e("TresAmbientLight",{intensity:1},null,-1),M=e("TresDirectionalLight",{intensity:1,position:[2,2,2]},null,-1),G=l({__name:"wobbleMaterial",setup(y){const n={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:h,outputColorSpace:f,toneMapping:m},r=s(),o=s("#5384ff");return new i({title:"流体波动",expanded:!0}).addBinding(o,"value",{label:"颜色"}),(S,k)=>(c(),p(a(_),u(n,{ref_key:"context",ref:r,"window-size":""}),{default:d(()=>[g,e("TresMesh",null,[w,t(a(C),{color:o.value,speed:3,factor:8},null,8,["color"])]),B,x,M,t(a(T))]),_:1},16))}});export{G as default};

View File

@ -20,23 +20,23 @@
},
"dependencies": {
"@fesjs/builder-vite": "^3.0.3",
"@fesjs/fes": "^3.0.0",
"@fesjs/fes": "^3.1.5",
"@fesjs/fes-design": "^0.8.10",
"@fesjs/plugin-access": "^3.0.0",
"@fesjs/plugin-enums": "^3.0.0",
"@fesjs/plugin-layout": "^5.0.0",
"@fesjs/plugin-model": "^3.0.0",
"@tresjs/cientos": "^3.6.0",
"@tresjs/core": "^3.4.1",
"@tresjs/core": "^3.5.0",
"cannon-es": "^0.20.0",
"core-js": "^3.29.1",
"gsap": "^3.12.2",
"heatmap.js-fix": "^1.0.0",
"three": "^0.157.0",
"three": "^0.158.0",
"unocss": "^0.56.5",
"vanta": "^0.5.24",
"vite-plugin-glsl": "^1.1.2",
"vue": "^3.2.47"
"vue": "^3.3.8"
},
"private": true
}
}

View File

@ -0,0 +1,125 @@
<!--
* @Description:
* @Version: 1.668
* @Autor: 地虎降天龙
* @Date: 2023-11-17 10:02:35
* @LastEditors: 地虎降天龙
* @LastEditTime: 2023-11-17 16:25:59
-->
<template>
<TresPoints ref="TresMeshRef">
<TresBufferGeometry ref="BufferGeometryRef"></TresBufferGeometry>
<TresShaderMaterial v-bind="customMaterial"></TresShaderMaterial>
</TresPoints>
</template>
<script setup lang="ts">
import * as THREE from 'three';
import { ref, watchEffect } from 'vue';
import * as BufferGeometryUtils from 'three/addons/utils/BufferGeometryUtils.js';
import glowVertex from '../shaders/glow.vert?raw';
import glowFrag from '../shaders/glow.frag?raw';
import { useRenderLoop } from '@tresjs/core';
const props = withDefaults(
defineProps<{
model: THREE.Group;
color?: string;
opacity?: number;
}>(),
{
color: '#FFF',
opacity: 1.0,
},
);
const memorySelected = ['afective', 'semantic', 'episodic', 'process', 'amigdala', 'brainstem', 'bridge', 'cerebellum', 'analitic']
const memories = {};
props.model.traverse((child) => {
if (child instanceof THREE.Mesh) {
memorySelected.map((m) => {
if (child.name.includes(m)) {
if (memories[m]) {
const tmpGeometry = [memories[m], child.geometry];
memories[m] = BufferGeometryUtils.mergeGeometries(tmpGeometry);
return memories;
}
return (memories[m] = child.geometry);
}
return [];
});
}
});
const BufferGeometryRef = ref();
const initBufferGeometry = () => {
const particles = 20000;
const sizes = [];
const positions = [];
const colors = [] as any;
const delay = [];
const duration = 2.5;
const maxPointDelay = 1.5;
const bubbles = [];
for (let i = 0; i < particles - memorySelected.length * 3; i += 1) {
const r = THREE.MathUtils.randInt(0, memorySelected.length - 1); //Math.floor(Math.random() * memorySelected.length)
const mSelector = memorySelected[r];
const x = memories[mSelector].attributes.position.array[i * 3 + 0] || 0;
const y = memories[mSelector].attributes.position.array[i * 3 + 1] || 0;
const z = memories[mSelector].attributes.position.array[i * 3 + 2] || 0;
positions.push(x, y, z);
sizes[i] = THREE.MathUtils.randFloat(10.0, 20.0);
if (i % 100 === 0) {
const altitude = THREE.MathUtils.randInt(100, 250) + y;
bubbles.push(x, altitude, z, 1.0);
} else {
bubbles.push(x, y, z, 0.0);
}
delay[i * 2 + 0] = THREE.MathUtils.randFloat(0.5, maxPointDelay);
delay[i * 2 + 1] = duration;
}
BufferGeometryRef.value.setAttribute('aDelayDuration', new THREE.Float32BufferAttribute(delay, 2));
BufferGeometryRef.value.setAttribute('bubbles', new THREE.Float32BufferAttribute(bubbles, 4));
BufferGeometryRef.value.setAttribute('position', new THREE.Float32BufferAttribute(positions, 3));
BufferGeometryRef.value.setAttribute('color', new THREE.Float32BufferAttribute(colors, 3));
BufferGeometryRef.value.setAttribute('size', new THREE.Float32BufferAttribute(sizes, 1));
BufferGeometryRef.value.computeBoundingSphere();
};
const customMaterial = new THREE.ShaderMaterial({
uniforms: {
glowColor: { type: 'c', value: new THREE.Color(props.color) },
uTime: { type: 'f', value: 0.0 },
uSlowTime: { type: 'f', value: 0.0 },
uBubblesUp: { type: 'f', value: 1.0 },
uOpacity: { type: 'f', value: props.opacity },
},
vertexShader: glowVertex,
fragmentShader: glowFrag,
blending: THREE.AdditiveBlending,
side: THREE.DoubleSide,
depthTest: false,
vertexColors: false,
transparent: true,
});
watchEffect(() => {
if (BufferGeometryRef.value) {
initBufferGeometry();
}
});
const TresMeshRef = ref();
const { onLoop } = useRenderLoop();
onLoop(({ delta }) => {
if (TresMeshRef.value) {
TresMeshRef.value.material.uniforms.uTime.value += 1 / 20;
TresMeshRef.value.material.uniforms.uSlowTime.value += 1 / 400;
}
if (props.color) {
customMaterial.uniforms.glowColor.value = new THREE.Color(props.color)
}
if (props.opacity) {
customMaterial.uniforms.uOpacity.value = props.opacity
}
});
</script>

View File

@ -4,7 +4,7 @@
* @Autor: 地虎降天龙
* @Date: 2023-11-14 10:06:40
* @LastEditors: 地虎降天龙
* @LastEditTime: 2023-11-14 16:30:45
* @LastEditTime: 2023-11-17 10:24:46
-->
<template>
<TresMesh ref="TresMeshRef">
@ -16,8 +16,8 @@
<script setup lang="ts">
import * as THREE from 'three'
import { useTexture, useRenderLoop, useTresContext } from '@tresjs/core'
// import xRayVertex from '../shaders/xRay.vert';
// import xRayFrag from '../shaders/xRay.frag';
import xRayVertex from '../shaders/xRay.vert?raw';
import xRayFrag from '../shaders/xRay.frag?raw';
import * as BufferGeometryUtils from 'three/addons/utils/BufferGeometryUtils.js';
import { ref, watchEffect } from 'vue';
@ -30,39 +30,9 @@ const props = withDefaults(defineProps<{
opacity: 1.0,
})
const xRayVertex = `
uniform float c;
uniform float p;
uniform float uTime;
varying float intensity;
varying vec2 vUv;
void main(){
vUv = uv;
vec3 vNormal = normalize( normalMatrix * normal );
intensity = pow(c - abs(dot(vNormal, vec3(0, 0, 1))), p);
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
`
const xRayFrag = `
uniform vec3 glowColor;
uniform sampler2D lightningTexture;
varying float intensity;
varying vec2 vUv;
uniform float offsetY;
uniform float uTime;
uniform float uOpacity;
void main(){
vec2 uv=vUv;
uv.y+=offsetY;
vec3 glow=glowColor*intensity;
vec3 color=vec3(step(.1,uv.y)-step(.2,uv.y))-vec3(texture2D(lightningTexture,uv));
float alpha=clamp(cos(uTime*3.),.5,1.);
gl_FragColor=vec4(glow+color,alpha*uOpacity);
}
`
const TresMeshRef = ref()
const brainBufferGeometries = [] as Array<THREE.BufferGeometry>
props.model.traverse((child) => {
if (child instanceof THREE.Mesh) {
child.geometry.verticesNeedUpdate = true

View File

@ -4,7 +4,7 @@
* @Autor: 地虎降天龙
* @Date: 2023-11-10 16:13:11
* @LastEditors: 地虎降天龙
* @LastEditTime: 2023-11-14 17:02:03
* @LastEditTime: 2023-11-17 16:20:31
-->
<template>
<TresCanvas v-bind="state" window-size>
@ -17,6 +17,8 @@
<Suspense>
<xRayEffect v-if="xRayState.show" :model="model" v-bind="xRayState" />
</Suspense>
<bubblesEffect v-if="bubblesState.show" :model="model" v-bind="bubblesState" />
</TresGroup>
</TresCanvas>
</template>
@ -32,6 +34,7 @@ import { Pane } from 'tweakpane';
import { loadOBJ } from '../common/util'
import cloudPoints from '../components/cloudPoints.vue'
import xRayEffect from '../components/xRayEffect.vue'
import bubblesEffect from '../components/bubblesEffect.vue'
const cloudPointsState = reactive({
color: '#fff',
@ -51,13 +54,27 @@ const xRayState = reactive({
show: true,
opacity: 1.0
})
paneControl.addBinding(xRayState, 'show', { label: '脑组织显示' })
paneControl.addBinding(xRayState, 'color', { label: '脑组织颜色' })
paneControl.addBinding(xRayState, 'show', { label: '脑轮廓显示' })
paneControl.addBinding(xRayState, 'color', { label: '脑轮廓颜色' })
paneControl.addBinding(xRayState, 'opacity', {
label: '脑轮廓透明度', min: 0,
max: 1,
step: 0.1,
})
const bubblesState = reactive({
color: '#9e00af',
show: true,
opacity: 1.0
})
paneControl.addBinding(bubblesState, 'show', { label: '脑组织显示' })
paneControl.addBinding(bubblesState, 'color', { label: '脑组织颜色' })
paneControl.addBinding(bubblesState, 'opacity', {
label: '脑组织透明度', min: 0,
max: 1,
step: 0.1,
})
const path = './plugins/medical/model/brainparts.OBJ';
const loader = new OBJLoader()
const model = await loadOBJ(path, loader)

View File

@ -0,0 +1,15 @@
uniform vec3 glowColor;
varying float intensity;
varying float alpha;
uniform float uOpacity;
void main()
{
float distanceToCenter=distance(gl_PointCoord,vec2(.5));
float pct=1.-smoothstep(0.,.5,distanceToCenter);
vec3 color=vec3(1.)*gl_FragColor.rgb;
vec3 glow=glowColor*intensity;
gl_FragColor=vec4(glow,clamp(alpha,0.,1.));
gl_FragColor=vec4(glow,pct*gl_FragColor.a);
gl_FragColor=vec4(gl_FragColor.rgb,gl_FragColor.a*uOpacity);
// gl_FragColor=vec4(1.,1.,0.,1.);
}

View File

@ -0,0 +1,65 @@
uniform float p;
uniform float uTime;
uniform float uSlowTime;
uniform float uBubblesUp;
varying float intensity;
attribute vec2 aDelayDuration;
attribute float size;
attribute vec4 bubbles;
varying float alpha;
float easeExpoInOut(float p){
return((p*=2.)<1.)?.5*pow(2.,10.*(p-1.)):.5*(2.-pow(2.,-10.*(p-1.)));
}
void main()
{
intensity=.9;
vec4 mvPosition=modelViewMatrix*vec4(position,1.);
gl_PointSize=size*(300./-mvPosition.z);
float m=mod(size,sin(uSlowTime*.12+size));
alpha=step(.5,abs(m));
if(m>.5&&m<.7){
gl_PointSize=.9*size;
}
if(m>.8){
gl_PointSize=.9*size;
}
gl_Position=projectionMatrix*mvPosition;
if(bubbles.w>0.&&bubbles.w<2.&&bubbles.x!=0.&&bubbles.y!=0.){
gl_PointSize=size+15.;
alpha=clamp(abs(sin(uTime-bubbles.y)),.3,1.);
float tProgress=smoothstep(0.,aDelayDuration.x,uBubblesUp);
vec3 tranlated=mix(position,bubbles.xyz,tProgress);
vec4 bPosition=modelViewMatrix*vec4(tranlated,1.);
gl_PointSize=uBubblesUp*gl_PointSize;
gl_Position+=projectionMatrix*bPosition;
alpha=5.;
}
if(bubbles.w==2.){
alpha=clamp(abs(sin(uTime-bubbles.y)),.3,.6);
gl_PointSize=size+60.;
gl_PointSize=uBubblesUp*gl_PointSize;
float normalized=clamp(uBubblesUp,0.,2.)*2.;
vec3 tranlated=mix(position,bubbles.xyz,normalized);
vec4 bPosition=modelViewMatrix*vec4(tranlated,1.);
gl_Position+=projectionMatrix*bPosition;
}
if(bubbles.w==3.){
alpha=clamp(abs(sin(uTime-bubbles.y)),.3,1.);
gl_PointSize=size+90.;
gl_PointSize=uBubblesUp*gl_PointSize;
float normalized=clamp(uBubblesUp,0.,2.)*2.;
vec3 tranlated=mix(position,bubbles.xyz,normalized);
vec4 bPosition=modelViewMatrix*vec4(tranlated,1.);
gl_Position+=projectionMatrix*bPosition;
}
}

View File

@ -4,6 +4,7 @@ varying float intensity;
varying vec2 vUv;
uniform float offsetY;
uniform float uTime;
uniform float uOpacity;
void main(){
vec2 uv=vUv;
@ -11,5 +12,5 @@ void main(){
vec3 glow=glowColor*intensity;
vec3 color=vec3(step(.1,uv.y)-step(.2,uv.y))-vec3(texture2D(lightningTexture,uv));
float alpha=clamp(cos(uTime*3.),.5,1.);
gl_FragColor=vec4(glow+color,alpha);
gl_FragColor=vec4(glow+color,alpha*uOpacity);
}

View File

@ -1,14 +1,11 @@
uniform vec3 viewVector;
uniform float c;
uniform float p;
uniform float uTime;
varying float intensity;
varying vec2 vUv;
void main(){
vUv=uv;
vec3 vNormal=normalize(normalMatrix*normal);
vec3 vNormel=normalize(normalMatrix*viewVector);
intensity=pow(c-abs(dot(vNormal,vec3(0,0,1))),p);
gl_Position=projectionMatrix*modelViewMatrix*vec4(position,1.);
}

926
yarn.lock

File diff suppressed because it is too large Load Diff