mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 12:22:03 +08:00
136 lines
54 KiB
JavaScript
136 lines
54 KiB
JavaScript
|
import{toRef as Le,watch as d,ref as Zr,defineComponent as a,watchEffect as Yr,inject as K,provide as Jr,getCurrentInstance as Qr,onUnmounted as es,createApp as ts}from"vue";import{Vector3 as ie,Raycaster as rs,Plane as ss,Vector2 as T,InstancedMesh as ye,WebGLRenderer as is,OrthographicCamera as ns,PerspectiveCamera as os,Scene as as,Color as Y,Texture as hs,Group as ds,WebGLCubeRenderTarget as us,RGBAFormat as cs,LinearMipmapLinearFilter as ls,CubeCamera as ms,Mesh as ps,BufferGeometry as fs,BufferAttribute as ys,BoxGeometry as Oe,CircleGeometry as gs,ConeGeometry as bs,CylinderGeometry as vs,DodecahedronGeometry as Ss,ExtrudeGeometry as Ps,IcosahedronGeometry as xs,LatheGeometry as ws,OctahedronGeometry as Cs,PlaneGeometry as Ne,PolyhedronGeometry as Ms,RingGeometry as Gs,SphereGeometry as Ls,ShapeGeometry as Os,TetrahedronGeometry as Ns,TorusGeometry as $s,TorusKnotGeometry as Es,CatmullRomCurve3 as $e,Curve as zs,TubeGeometry as Rs,SpotLight as ge,DirectionalLight as be,AmbientLight as js,HemisphereLight as ks,PointLight as Is,RectAreaLight as _s,MeshBasicMaterial as Ee,MeshLambertMaterial as Ts,MeshPhongMaterial as As,MeshPhysicalMaterial as Bs,PointsMaterial as Ds,ShadowMaterial as Fs,MeshStandardMaterial as Us,MeshToonMaterial as Hs,TextureLoader as J,MeshMatcapMaterial as Ks,ShaderMaterial as ve,ShaderChunk as V,UniformsUtils as ze,ShaderLib as Vs,CubeReflectionMapping as Xs,CubeTextureLoader as qs,VideoTexture as Ws,DoubleSide as Zs,SpriteMaterial as Ys,Sprite as Js,Points as Qs}from"three";import{OrbitControls as ei}from"three/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as ti}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as ri}from"three/examples/jsm/helpers/RectAreaLightHelper.js";import{TextGeometry as si}from"three/examples/jsm/geometries/TextGeometry.js";import{FontLoader as ii}from"three/examples/jsm/loaders/FontLoader.js";import{GLTFLoader as ni}from"three/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as oi}from"three/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as ai}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as hi}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as di}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as ui}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as ne}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as ci}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as li}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as mi}from"three/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as pi}from"three/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as fi}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function X(e,t,r){t instanceof Object&&Object.entries(t).forEach(([s,i])=>{r?r(e,s,i):e[s]=i})}function A(e,t,r,s=!0,i){s&&X(r,e[t],i);const n=Le(e,t);return d(n,o=>{X(r,o,i)})}function Re(e,t,r=!0,s){r&&X(t,e,s);const i=Zr(e);return d(i,n=>{X(t,n,s)},{deep:!0})}function q(e,t){t instanceof Object&&Object.entries(t).forEach(([r,s])=>{e[r]=s})}function je(e,t,r){t.forEach(s=>{m(e,s,r,s)})}function m(e,t,r,s){const i=s||t,n=Le(e,t);n.value instanceof Object?(q(r[i],n.value),d(n,o=>{q(r[i],o)},{deep:!0})):(n.value!==void 0&&(r[i]=e[t]),d(n,o=>{r[i]=o}))}function Q(e,t=[]){const r={};return Object.entries(e).forEach(([s,i])=>{(!t||!t.includes(s))&&(r[s]=i)}),r}function ke(e,t,r){return r=r<0?0:r,r=r>1?1:r,e+(t-e)*r}function Ie(e,t,r){return e<t?t:e>r?r:e}const yi="https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d",gi="0404E8_0404B5_0404CB_3333FC";function Se(e=gi,t=1024){const r=`${e}${bi(t)}.png`;return`${yi}/${t}/${r}`}function bi(e){switch(e){case 64:return"-64px";case 128:return"-128px";case 256:return"-256px";case 512:return"-512px";default:return""}}function vi(e){const{camera:t,resetPosition:r=new ie(0,0,0)}=e,s=new rs,i=r.clone(),n=new ss(new ie(0,0,1),0);return{position:i,u
|
||
|
varying vec2 vUv;
|
||
|
void main(){
|
||
|
vUv = uv;
|
||
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
|
||
|
}
|
||
|
`,Li=`
|
||
|
varying vec2 vUv;
|
||
|
void main() {
|
||
|
gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0);
|
||
|
}
|
||
|
`;var rr=I("ShaderMaterial",{props:{type:Object,default:()=>({uniforms:{},vertexShader:Gi,fragmentShader:Li})}},e=>new ve(Q(e,["color"])));function Oi(e,t,r){return e.split(t).join(r)}const Ni=V.meshphong_frag.slice(0,V.meshphong_frag.indexOf("void main() {")),$i=V.meshphong_frag.slice(V.meshphong_frag.indexOf("void main() {")),Ei={uniforms:ze.merge([Vs.phong.uniforms,{thicknessColor:{value:new Y(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),vertexShader:`
|
||
|
#define USE_UV
|
||
|
${V.meshphong_vert}
|
||
|
`,fragmentShader:`
|
||
|
#define USE_UV
|
||
|
#define SUBSURFACE
|
||
|
|
||
|
${Ni}
|
||
|
|
||
|
uniform float thicknessPower;
|
||
|
uniform float thicknessScale;
|
||
|
uniform float thicknessDistortion;
|
||
|
uniform float thicknessAmbient;
|
||
|
uniform float thicknessAttenuation;
|
||
|
uniform vec3 thicknessColor;
|
||
|
|
||
|
void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {
|
||
|
#ifdef USE_COLOR
|
||
|
vec3 thickness = vColor * thicknessColor;
|
||
|
#else
|
||
|
vec3 thickness = thicknessColor;
|
||
|
#endif
|
||
|
vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));
|
||
|
float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;
|
||
|
vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;
|
||
|
reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;
|
||
|
}
|
||
|
`+$i.replace("#include <lights_fragment_begin>",Oi(V.lights_fragment_begin,"RE_Direct( directLight, geometry, material, reflectedLight );",`
|
||
|
RE_Direct( directLight, geometry, material, reflectedLight );
|
||
|
#if defined( SUBSURFACE ) && defined( USE_UV )
|
||
|
RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);
|
||
|
#endif
|
||
|
`))};var sr=a({extends:ce,props:{uniforms:{type:Object,default:()=>({diffuse:"#ffffff",thicknessColor:"#ffffff",thicknessDistortion:.4,thicknessAmbient:.01,thicknessAttenuation:.7,thicknessPower:2,thicknessScale:4})}},methods:{createMaterial(){const e=Ei,t=ze.clone(e.uniforms);return A(this,"uniforms",t,!0,(r,s,i)=>{const n=r[s].value;n instanceof Y?n.set(i):r[s].value=i}),new ve({...e,lights:!0,...this.props,uniforms:t})}}}),le=a({inject:{material:ue},props:{name:{type:String,default:"map"},uniform:String,src:String,onLoad:Function,onProgress:Function,onError:Function,props:{type:Object,default:()=>({})}},setup(){return{}},created(){this.refreshTexture(),d(()=>this.src,this.refreshTexture)},unmounted(){var e,t;(e=this.material)==null||e.setTexture(null,this.name),(t=this.texture)==null||t.dispose()},methods:{createTexture(){if(this.src)return new J().load(this.src,this.onLoaded,this.onProgress,this.onError)},initTexture(){!this.texture||(A(this,"props",this.texture),this.material&&(this.material.setTexture(this.texture,this.name),this.material.material instanceof ve&&this.uniform&&(this.material.material.uniforms[this.uniform]={value:this.texture})))},refreshTexture(){var e;(e=this.texture)==null||e.dispose(),this.texture=this.createTexture(),this.initTexture()},onLoaded(e){var t;(t=this.onLoad)==null||t.call(this,e)}},render(){return[]}}),ir=a({extends:le,props:{name:{type:String,default:"envMap"},path:{type:String,required:!0},urls:{type:Array,default:()=>["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]},props:{type:Object,default:()=>({mapping:Xs})}},created(){d(()=>this.path,this.refreshTexture),d(()=>this.urls,this.refreshTexture)},methods:{createTexture(){return new qs().setPath(this.path).load(this.urls,this.onLoaded,this.onProgress,this.onError)}}}),nr=a({extends:le,props:{videoId:{type:String,required:!0}},created(){d(()=>this.videoId,this.refreshTexture)},methods:{createTexture(){const e=document.getElementById(this.videoId);return new Ws(e)}}}),or=S("Box",Ke,Ve),ar=S("Circle",qe,We),hr=S("Cone",Ye,Je),dr=S("Cylinder",et,tt),ur=S("Dodecahedron",st,it),cr=S("Icosahedron",at,ht),lr=S("Lathe",ut,ct),mr=S("Octahedron",mt,pt),pr=S("Plane",yt,gt),fr=S("Polyhedron",vt,St),yr=S("Ring",xt,wt),gr=S("Sphere",Mt,Gt),br=S("Tetrahedron",Nt,$t);const zi={text:{type:String,required:!0,default:"Text"},fontSrc:{type:String,required:!0},size:{type:Number,default:80},height:{type:Number,default:5},depth:{type:Number,default:1},curveSegments:{type:Number,default:12},bevelEnabled:{type:Boolean,default:!1},bevelThickness:{type:Number,default:10},bevelSize:{type:Number,default:8},bevelOffset:{type:Number,default:0},bevelSegments:{type:Number,default:5},align:{type:[Boolean,String],default:!1}};var vr=a({extends:H,props:zi,setup(){return{}},created(){if(!this.fontSrc){console.error('Missing required prop: "font-src"');return}["text","size","height","curveSegments","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","align"].forEach(t=>{d(()=>this[t],()=>{this.font&&this.refreshGeometry()})});const e=new ii;this.loading=!0,e.load(this.fontSrc,t=>{this.loading=!1,this.font=t,this.createGeometry(),this.initMesh()})},methods:{createGeometry(){this.geometry=new si(this.text,{font:this.font,size:this.size,height:this.height,depth:this.depth,curveSegments:this.curveSegments,bevelEnabled:this.bevelEnabled,bevelThickness:this.bevelThickness,bevelSize:this.bevelSize,bevelOffset:this.bevelOffset,bevelSegments:this.bevelSegments}),this.align==="center"&&this.geometry.center()}}}),Sr=S("Torus",zt,Rt),Pr=S("TorusKnot",kt,It),xr=a({extends:H,props:Pe,created(){this.createGeometry(),this.addGeometryWatchers(Pe)},methods:{createGeometry(){this.geometry=Tt(this)},updatePoints(e){Bt(this.geometry,e)}},__hmrId:"Tube"}),wr=a({emits:["loaded"],extends:H,props:{src:{type:String,required:!0},width:Number,height:Number,widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1},keepSize:Boolean},setup(){return{}},created(){!this.renderer||(this.geometry=new Ne(1,1,this.widthSegments,this.heightSegments),thi
|
||
|
varying vec2 vUv;
|
||
|
void main() {
|
||
|
vUv = uv;
|
||
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
||
|
}
|
||
|
`,fragmentShader:`
|
||
|
varying vec2 vUv;
|
||
|
void main() {
|
||
|
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
|
||
|
}
|
||
|
`},Fr={uniforms:{tDiffuse:{value:null},blurRadius:{value:0},gradientRadius:{value:0},start:{value:new T},end:{value:new T},delta:{value:new T},texSize:{value:new T}},vertexShader:Dr.vertexShader,fragmentShader:`
|
||
|
uniform sampler2D tDiffuse;
|
||
|
uniform float blurRadius;
|
||
|
uniform float gradientRadius;
|
||
|
uniform vec2 start;
|
||
|
uniform vec2 end;
|
||
|
uniform vec2 delta;
|
||
|
uniform vec2 texSize;
|
||
|
varying vec2 vUv;
|
||
|
|
||
|
float random(vec3 scale, float seed) {
|
||
|
/* use the fragment position for a different seed per-pixel */
|
||
|
return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);
|
||
|
}
|
||
|
|
||
|
void main() {
|
||
|
vec4 color = vec4(0.0);
|
||
|
float total = 0.0;
|
||
|
|
||
|
/* randomize the lookup values to hide the fixed number of samples */
|
||
|
float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);
|
||
|
|
||
|
vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));
|
||
|
float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientRadius) * blurRadius;
|
||
|
for (float t = -30.0; t <= 30.0; t++) {
|
||
|
float percent = (t + offset - 0.5) / 30.0;
|
||
|
float weight = 1.0 - abs(percent);
|
||
|
vec4 texel = texture2D(tDiffuse, vUv + delta / texSize * percent * radius);
|
||
|
// vec4 texel2 = texture2D(tDiffuse, vUv + vec2(-delta.y, delta.x) / texSize * percent * radius);
|
||
|
|
||
|
/* switch to pre-multiplied alpha to correctly blur transparent images */
|
||
|
texel.rgb *= texel.a;
|
||
|
// texel2.rgb *= texel2.a;
|
||
|
|
||
|
color += texel * weight;
|
||
|
total += 2.0 * weight;
|
||
|
}
|
||
|
|
||
|
gl_FragColor = color / total;
|
||
|
|
||
|
/* switch back from pre-multiplied alpha */
|
||
|
gl_FragColor.rgb /= gl_FragColor.a + 0.00001;
|
||
|
}
|
||
|
`};const Ri={blurRadius:{type:Number,default:10},gradientRadius:{type:Number,default:100},start:{type:Object,default:()=>({x:0,y:100})},end:{type:Object,default:()=>({x:10,y:100})}};var Ur=a({extends:M,props:Ri,setup(){return{uniforms1:{},uniforms2:{}}},created(){if(!this.composer)return;this.pass1=new ne(Fr),this.pass2=new ne(Fr);const e=this.uniforms1=this.pass1.uniforms,t=this.uniforms2=this.pass2.uniforms;t.blurRadius=e.blurRadius,t.gradientRadius=e.gradientRadius,t.start=e.start,t.end=e.end,t.texSize=e.texSize,m(this,"blurRadius",e.blurRadius,"value"),m(this,"gradientRadius",e.gradientRadius,"value"),this.updateFocusLine(),["start","end"].forEach(r=>{d(()=>this[r],this.updateFocusLine,{deep:!0})}),this.pass1.setSize=(r,s)=>{e.texSize.value.set(r,s)},this.initEffectPass(this.pass1),this.composer.addPass(this.pass2)},unmounted(){this.composer&&this.pass2&&this.composer.removePass(this.pass2)},methods:{updateFocusLine(){this.uniforms1.start.value.copy(this.start),this.uniforms1.end.value.copy(this.end);const e=new T().copy(this.end).sub(this.start).normalize();this.uniforms1.delta.value.copy(e),this.uniforms2.delta.value.set(-e.y,e.x)}},__hmrId:"TiltShiftPass"});const Hr={strength:{type:Number,default:1.5},radius:{type:Number,default:0},threshold:{type:Number,default:0}};var Kr=a({extends:M,props:Hr,created(){if(!this.renderer)return;const e=new T(this.renderer.size.width,this.renderer.size.height),t=new fi(e,this.strength,this.radius,this.threshold);Object.keys(Hr).forEach(r=>{d(()=>this[r],s=>{t.uniforms[r].value=s})}),this.initEffectPass(t)},__hmrId:"UnrealBloomPass"}),ji={uniforms:{tDiffuse:{value:null},center:{value:new T(.5,.5)},strength:{value:0}},vertexShader:Dr.vertexShader,fragmentShader:`
|
||
|
uniform sampler2D tDiffuse;
|
||
|
uniform vec2 center;
|
||
|
uniform float strength;
|
||
|
varying vec2 vUv;
|
||
|
|
||
|
float random(vec3 scale, float seed) {
|
||
|
/* use the fragment position for a different seed per-pixel */
|
||
|
return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);
|
||
|
}
|
||
|
|
||
|
void main() {
|
||
|
vec4 color = vec4(0.0);
|
||
|
float total = 0.0;
|
||
|
vec2 toCenter = center - vUv;
|
||
|
|
||
|
/* randomize the lookup values to hide the fixed number of samples */
|
||
|
float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);
|
||
|
|
||
|
for (float t = 0.0; t <= 40.0; t++) {
|
||
|
float percent = (t + offset) / 40.0;
|
||
|
float weight = 4.0 * (percent - percent * percent);
|
||
|
vec4 texel = texture2D(tDiffuse, vUv + toCenter * percent * strength);
|
||
|
|
||
|
/* switch to pre-multiplied alpha to correctly blur transparent images */
|
||
|
texel.rgb *= texel.a;
|
||
|
|
||
|
color += texel * weight;
|
||
|
total += weight;
|
||
|
}
|
||
|
|
||
|
gl_FragColor = color / total;
|
||
|
|
||
|
/* switch back from pre-multiplied alpha */
|
||
|
gl_FragColor.rgb /= gl_FragColor.a + 0.00001;
|
||
|
}
|
||
|
`},Vr=a({extends:M,props:{center:{type:Object,default:()=>({x:.5,y:.5})},strength:{type:Number,default:.5}},created(){const e=new ne(ji);m(this,"center",e.uniforms.center,"value"),m(this,"strength",e.uniforms.strength,"value"),this.initEffectPass(e)},__hmrId:"ZoomBlurPass"}),ki=Object.freeze({__proto__:null,Renderer:Te,RendererInjectionKey:$,OrthographicCamera:Be,PerspectiveCamera:ae,Camera:ae,Group:Fe,Scene:De,SceneInjectionKey:he,Object3D:B,Raycaster:Ue,CubeCamera:He,BufferGeometry:de,BoxGeometry:Xe,CircleGeometry:Ze,ConeGeometry:Qe,CylinderGeometry:rt,DodecahedronGeometry:nt,ExtrudeGeometry:ot,IcosahedronGeometry:dt,LatheGeometry:lt,OctahedronGeometry:ft,PlaneGeometry:bt,PolyhedronGeometry:Pt,RingGeometry:Ct,SphereGeometry:Lt,ShapeGeometry:Ot,TetrahedronGeometry:Et,TorusGeometry:jt,TorusKnotGeometry:_t,TubeGeometry:At,AmbientLight:Dt,DirectionalLight:Ft,HemisphereLight:Ut,PointLight:Ht,RectAreaLight:Kt,SpotLight:Vt,Material:ce,BasicMaterial:Xt,LambertMaterial:qt,PhongMaterial:Wt,PhysicalMaterial:Zt,PointsMaterial:Yt,ShadowMaterial:Jt,StandardMaterial:Qt,ToonMaterial:er,MaterialInjectionKey:ue,MatcapMaterial:tr,ShaderMaterial:rr,SubSurfaceMaterial:sr,Texture:le,CubeTexture:ir,VideoTexture:nr,Mesh:H,MeshInjectionKey:W,Box:or,Circle:ar,Cone:hr,Cylinder:dr,Dodecahedron:ur,Icosahedron:cr,Lathe:lr,Octahedron:mr,Plane:pr,Polyhedron:fr,Ring:yr,Sphere:gr,Tetrahedron:br,Text:vr,Torus:Sr,TorusKnot:Pr,Tube:xr,Image:wr,InstancedMesh:Cr,Sprite:Mr,Points:Gr,GltfModel:Or,FbxModel:Nr,EffectComposer:$r,ComposerInjectionKey:me,RenderPass:Er,EffectPass:M,BokehPass:Rr,FilmPass:kr,FXAAPass:Ir,HalftonePass:Tr,SMAAPass:Ar,SSAOPass:Br,TiltShiftPass:Ur,UnrealBloomPass:Kr,ZoomBlurPass:Vr,applyObjectProps:X,bindObjectProp:A,bindObjectProps:Re,setFromProp:q,bindProps:je,bindProp:m,propsValues:Q,lerp:ke,limit:Ie,getMatcapUrl:Se});const Xr={install(e){["Camera","OrthographicCamera","PerspectiveCamera","Raycaster","Renderer","Scene","Group","CubeCamera","AmbientLight","DirectionalLight","HemisphereLight","PointLight","RectAreaLight","SpotLight","BasicMaterial","LambertMaterial","MatcapMaterial","PhongMaterial","PhysicalMaterial","PointsMaterial","ShaderMaterial","StandardMaterial","SubSurfaceMaterial","ToonMaterial","Texture","CubeTexture","BufferGeometry","Mesh","Box","BoxGeometry","Circle","CircleGeometry","Cone","ConeGeometry","Cylinder","CylinderGeometry","Dodecahedron","DodecahedronGeometry","Icosahedron","IcosahedronGeometry","Lathe","LatheGeometry","Octahedron","OctahedronGeometry","Plane","PlaneGeometry","Polyhedron","PolyhedronGeometry","Ring","RingGeometry","Sphere","SphereGeometry","Tetrahedron","TetrahedronGeometry","Text","Torus","TorusGeometry","TorusKnot","TorusKnotGeometry","Tube","TubeGeometry","Image","InstancedMesh","Points","Sprite","FbxModel","GltfModel","BokehPass","EffectComposer","FilmPass","FXAAPass","HalftonePass","RenderPass","SAOPass","SMAAPass","SSAOPass","TiltShiftPass","UnrealBloomPass","ZoomBlurPass"].forEach(t=>{e.component(t,ki[t])})}};function Ii(e){return ts(e).use(Xr)}function _i(){const e={loader:new J,count:0,textures:[],loadProgress:0,loadTextures:t,dispose:s};return e;function t(i,n){e.count=i.length,e.textures.splice(0),e.loadProgress=0,Promise.all(i.map(r)).then(n)}function r(i,n){return new Promise(o=>{e.loader.load(i.src,c=>{e.loadProgress+=1/e.count,e.textures[n]=c,o(c)})})}function s(){e.textures.forEach(i=>i.dispose())}}export{Dt as AmbientLight,Xt as BasicMaterial,Rr as BokehPass,or as Box,Xe as BoxGeometry,de as BufferGeometry,ae as Camera,ar as Circle,Ze as CircleGeometry,me as ComposerInjectionKey,hr as Cone,Qe as ConeGeometry,He as CubeCamera,ir as CubeTexture,dr as Cylinder,rt as CylinderGeometry,Ft as DirectionalLight,ur as Dodecahedron,nt as DodecahedronGeometry,$r as EffectComposer,M as EffectPass,ot as ExtrudeGeometry,Ir as FXAAPass,Nr as FbxModel,kr as FilmPass,Or as GltfModel,Fe as Group,Tr as HalftonePass,Ut as HemisphereLight,cr as Icosahedron,dt as IcosahedronGeometry,wr as Image,Cr as InstancedMesh,qt as LambertMaterial,lr as Lathe,lt as LatheGeometry,tr as MatcapMaterial,ce as Mater
|
||
|
//# sourceMappingURL=trois.module.min.js.map
|