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
58 KiB
JavaScript
Raw Normal View History

2021-03-14 02:34:34 +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 w,RingGeometry as N,SphereGeometry as _,TetrahedronGeometry as M,TorusGeometry as C,TorusKnotGeometry as G,Curve as z,TubeGeometry as L,AmbientLight as I,DirectionalLight as j,HemisphereLight as P,PointLight as R,RectAreaLight as k,SpotLight as B,FrontSide as E,MeshBasicMaterial as T,MeshLambertMaterial as O,TextureLoader as A,MeshMatcapMaterial as F,MeshPhongMaterial as U,MeshStandardMaterial as D,MeshPhysicalMaterial as $,ShaderMaterial as H,ShaderChunk as W,UniformsUtils as X,ShaderLib as V,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 we,BackSide as Ne,DoubleSide as _e,InstancedMesh as Me,SpriteMaterial as Ce,Sprite as Ge}from"three";import{OrbitControls as ze}from"three/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as Le}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as Ie}from"three/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as je}from"three/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as Pe}from"three/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as Re}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as ke}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as Be}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as Ee}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as Te}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as Oe}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as Ae}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Fe}from"three/examples/jsm/postprocessing/SMAAPass.js";import{UnrealBloomPass as Ue}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function De(){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)):w(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.addEven
2020-09-17 05:54:14 +08:00
//# sourceMappingURL=trois.module.min.js.map