icegl-three-vue-tres/dist/static/spriteImage-787614e0.js
hawk86104 cc7a5a656a Merge branch 'master' into online
# Conflicts:
#	.fes.js
2023-12-04 19:58:17 +08:00

2 lines
1.3 KiB
JavaScript

import{Y as d,Z as _,az as m,ae as h,r as u,o as g,s as f,B as x,a5 as b,I as t,a6 as B,aP as T,a as l,a9 as w,U as s,ah as C}from"./vendor-76c85ed2.js";const M=s("TresPerspectiveCamera",{position:[3,3,3]},null,-1),S=s("TresAmbientLight",{intensity:1},null,-1),v=s("TresGridHelper",{args:[10,10]},null,-1),y=["scale"],P=s("TresSphereGeometry",{args:[.3,32,16]},null,-1),A=["color"],k=["scale"],L=d({__name:"spriteImage",async setup(z){let a,n;const i={clearColor:"#222"},e=_({color:"#ffff00",scale:1}),{map:c}=([a,n]=m(()=>T({map:"./plugins/basic/shine/image/round.png"})),a=await a,n(),a),o=new h({title:"参数",expanded:!0});return o.addBinding(e,"color",{label:"颜色"}),o.addBinding(e,"scale",{label:"大小",min:1,max:10,step:1}),o.addBlade({view:"text",label:"问题",parse:r=>String(r),value:"Mesh移动到摄像头偏远处 物体产生变形,而本身精灵不会。 解决方法 Mesh也换成 Sprite 后 用shader画圆可解决"}),(r,G)=>{const p=u("SpriteMaterial");return g(),f(t(B),b(i,{"window-size":""}),{default:x(()=>[M,S,l(t(w)),v,s("TresMesh",{position:[0,1,0],scale:e.scale},[P,s("TresMeshLambertMaterial",{color:e.color},null,8,A)],8,y),s("TresSprite",{position:[0,1,0],scale:[e.scale,e.scale,1]},[l(p,{color:e.color,blending:t(C),map:t(c)},null,8,["color","blending","map"])],8,k)]),_:1},16)}}});export{L as default};