1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-27 22:12:01 +08:00
trois/build/trois.module.min.js

3 lines
79 KiB
JavaScript
Raw Normal View History

2021-02-26 05:55:44 +08:00
import{h as e,toRef as t,watch as i,inject as r,resolveComponent as n,openBlock as s,createBlock as a,withCtx as o,createVNode as h,renderSlot as u}from"vue";import{Vector2 as m,Vector3 as d,Plane as c,Raycaster as l,WebGLRenderer as f,OrthographicCamera as p,PerspectiveCamera as v,Group as y,Scene as g,Color as x,BoxBufferGeometry as b,CircleBufferGeometry as S,ConeBufferGeometry as w,CylinderBufferGeometry as N,DodecahedronBufferGeometry as C,IcosahedronBufferGeometry as z,LatheBufferGeometry as _,OctahedronBufferGeometry as M,PolyhedronBufferGeometry as P,RingBufferGeometry as T,SphereBufferGeometry as G,TetrahedronBufferGeometry as I,TorusBufferGeometry as R,TorusKnotBufferGeometry as j,Curve as L,TubeBufferGeometry as B,AmbientLight as E,DirectionalLight as k,PointLight as A,SpotLight as D,FrontSide as O,MeshBasicMaterial as U,MeshLambertMaterial as F,TextureLoader as $,MeshMatcapMaterial as W,MeshPhongMaterial as Z,MeshStandardMaterial as H,MeshPhysicalMaterial as q,ShaderChunk as V,UniformsUtils as X,ShaderLib as Y,ShaderMaterial as K,MeshToonMaterial as Q,CubeTextureLoader as J,CubeRefractionMapping as ee,Mesh as te,PlaneBufferGeometry as ie,FontLoader as re,TextBufferGeometry as ne,WebGLCubeRenderTarget as se,RGBFormat as ae,LinearMipmapLinearFilter as oe,CubeCamera as he,BackSide as ue,DoubleSide as me,InstancedMesh as de,SpriteMaterial as ce,Sprite as le,WebGLRenderTarget as fe,ObjectSpaceNormalMap as pe,Object3D as ve,Face3 as ye,MathUtils as ge,InstancedBufferAttribute as xe}from"three";import{OrbitControls as be}from"three/examples/jsm/controls/OrbitControls.js";import{EffectComposer as Se}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as we}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as Ne}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as Ce}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as ze}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as _e}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as Me}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Pe}from"three/examples/jsm/postprocessing/SMAAPass.js";import{UnrealBloomPass as Te}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";import{Pass as Ge}from"three/examples/jsm/postprocessing/Pass.js";import{gsap as Ie,Power4 as Re}from"gsap";import{Geometry as je}from"three/examples/jsm/deprecated/Geometry.js";import{GLTFLoader as Le}from"three/examples/jsm/loaders/GLTFLoader.js";function Be(){var e={canvas:null,antialias:!0,alpha:!1,autoClear:!0,orbit_ctrl:!1,mouse_move:!1,mouse_raycast:!1,mouse_over:!1,click:!1,resize:!0,width:0,height:0},t={width:1,height:1,wWidth:1,wHeight:1,ratio:1},i=[],r=[],n=[],s=new m,a=new d,o=new c(new d(0,0,1),0),h=new l,u=[],p={conf:e,renderer:null,camera:null,cameraCtrl:null,materials:{},scene:null,size:t,mouse:s,mouseV3:a,init:function(t){t&&Object.entries(t).forEach((function(t){var i=t[0],r=t[1];e[i]=r}));if(!p.scene)return void console.error("Missing Scene");if(!p.camera)return void console.error("Missing Camera");p.renderer=new f({canvas:e.canvas,antialias:e.antialias,alpha:e.alpha}),p.renderer.autoClear=e.autoClear,e.orbit_ctrl&&(p.orbitCtrl=new be(p.camera,p.renderer.domElement),e.orbit_ctrl instanceof Object&&Object.entries(e.orbit_ctrl).forEach((function(e){var t=e[0],i=e[1];p.orbitCtrl[t]=i})));e.width&&e.height?S(e.width,e.height):e.resize&&(b(),window.addEventListener("resize",b));e.mouse_move=e.mouse_move||e.mouse_over,e.mouse_move&&("body"===e.mouse_move?p.mouse_move_element=document.body:p.mouse_move_element=p.renderer.domElement,p.mouse_move_element.addEventListener("mousemove",y),p.mouse_move_element.addEventListener("mouseleave",g));e.click&&p.renderer.domElement.addEventListener("click",v);return i.forEach((function(e){return e()})),!0},dispose:function(){n=[],window.removeEventListener("resize",b),p.mouse_move_element&&(p.mouse_move_element.removeEventListener("mousemove",y),p.mouse_move_element.removeEventListener("mouseleave",g));p.re
2020-09-17 05:54:14 +08:00
//# sourceMappingURL=trois.module.min.js.map