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

3 lines
56 KiB
JavaScript
Raw Normal View History

2021-03-08 04:17:46 +08:00
import{h as e,toRef as t,watch as r,createApp as i}from"vue";import{Vector2 as s,Vector3 as n,Plane as a,Raycaster as o,WebGLRenderer as h,OrthographicCamera as u,PerspectiveCamera as d,Group as m,Scene as c,Color as l,BoxGeometry as f,CircleGeometry as p,ConeGeometry as g,CylinderGeometry as y,DodecahedronGeometry as b,IcosahedronGeometry as v,LatheGeometry as S,OctahedronGeometry as x,PolyhedronGeometry as N,RingGeometry as w,SphereGeometry as _,TetrahedronGeometry as C,TorusGeometry as M,TorusKnotGeometry as G,Curve as z,TubeGeometry as I,AmbientLight as R,DirectionalLight as L,HemisphereLight as P,PointLight as k,RectAreaLight as B,SpotLight as j,FrontSide as E,MeshBasicMaterial as T,MeshLambertMaterial as A,TextureLoader as O,MeshMatcapMaterial as F,MeshPhongMaterial as U,MeshStandardMaterial as D,MeshPhysicalMaterial as $,ShaderChunk as H,UniformsUtils as W,ShaderLib as V,ShaderMaterial as X,MeshToonMaterial as q,UVMapping as Z,ClampToEdgeWrapping as K,LinearFilter as Y,LinearMipmapLinearFilter as J,CubeTextureLoader as Q,CubeRefractionMapping as ee,Mesh as te,BoxBufferGeometry as re,CircleBufferGeometry as ie,ConeBufferGeometry as se,CylinderBufferGeometry as ne,DodecahedronBufferGeometry as ae,IcosahedronBufferGeometry as oe,LatheBufferGeometry as he,OctahedronBufferGeometry as ue,PlaneBufferGeometry as de,PolyhedronBufferGeometry as me,RingBufferGeometry as ce,SphereBufferGeometry as le,TetrahedronBufferGeometry as fe,FontLoader as pe,TextBufferGeometry as ge,TorusBufferGeometry as ye,TorusKnotBufferGeometry as be,CatmullRomCurve3 as ve,WebGLCubeRenderTarget as Se,RGBFormat as xe,CubeCamera as Ne,BackSide as we,DoubleSide as _e,InstancedMesh as Ce,SpriteMaterial as Me,Sprite as Ge}from"three";import{OrbitControls as ze}from"three/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as Ie}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as Re}from"three/examples/jsm/helpers/RectAreaLightHelper.js";import{EffectComposer as Le}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as Pe}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as ke}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as Be}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as je}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as Ee}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as Te}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Ae}from"three/examples/jsm/postprocessing/SMAAPass.js";import{UnrealBloomPass as Oe}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function Fe(){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},r=[],i=[],u=[],d=new s,m=new n,c=new a(new n(0,0,1),0),l=new o,f=[],p={conf:e,renderer:null,camera:null,cameraCtrl:null,materials:{},scene:null,size:t,mouse:d,mouseV3:m,init:function(t){t&&Object.entries(t).forEach((function(t){var r=t[0],i=t[1];e[r]=i}));if(!p.scene)return void console.error("Missing Scene");if(!p.camera)return void console.error("Missing Camera");p.renderer=new h({canvas:e.canvas,antialias:e.antialias,alpha:e.alpha}),p.renderer.autoClear=e.autoClear,e.orbit_ctrl&&(p.orbitCtrl=new ze(p.camera,p.renderer.domElement),e.orbit_ctrl instanceof Object&&Object.entries(e.orbit_ctrl).forEach((function(e){var t=e[0],r=e[1];p.orbitCtrl[t]=r})));e.resize?(x(),window.addEventListener("resize",x)):N(300|e.width,150|e.height);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",b),p.mouse_move_element.addEventListener("mouseleave",v));e.click&&p.renderer.domElement.addEventListener("click",y);return r.forEach((function(e){return e()})),!0},dispose:function(){u=[],window.removeEventListener("resize",x),p.mouse_
2020-09-17 05:54:14 +08:00
//# sourceMappingURL=trois.module.min.js.map