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

3 lines
54 KiB
JavaScript
Raw Normal View History

2021-04-05 04:02:11 +08:00
import{defineComponent as e,h as t,toRef as r,watch as s,createApp as i}from"vue";import{VRButton as a}from"three/examples/jsm/webxr/VRButton.js";import{Vector3 as n,Raycaster as o,Plane as h,Vector2 as d,InstancedMesh as m,WebGLRenderer as l,OrthographicCamera as u,PerspectiveCamera as c,Group as p,Scene as f,Color as g,BoxGeometry as y,CircleGeometry as b,ConeGeometry as v,CylinderGeometry as x,DodecahedronGeometry as S,IcosahedronGeometry as w,LatheGeometry as P,OctahedronGeometry as C,PolyhedronGeometry as N,RingGeometry as M,SphereGeometry as _,TetrahedronGeometry as L,TorusGeometry as j,TorusKnotGeometry as R,TubeGeometry as z,Curve as I,CatmullRomCurve3 as G,AmbientLight as k,DirectionalLight as B,HemisphereLight as O,PointLight as T,RectAreaLight as E,SpotLight as A,FrontSide as F,MeshBasicMaterial as U,MeshLambertMaterial as D,TextureLoader as $,MeshMatcapMaterial as W,MeshPhongMaterial as H,MeshStandardMaterial as X,MeshPhysicalMaterial as V,ShaderMaterial as K,ShaderChunk as Z,UniformsUtils as Y,ShaderLib as q,MeshToonMaterial as J,UVMapping as Q,ClampToEdgeWrapping as ee,LinearFilter as te,LinearMipmapLinearFilter as re,CubeTextureLoader as se,CubeRefractionMapping as ie,Mesh as ae,PlaneGeometry as ne,FontLoader as oe,TextGeometry as he,WebGLCubeRenderTarget as de,RGBFormat as me,CubeCamera as le,BackSide as ue,DoubleSide as ce,SpriteMaterial as pe,Sprite as fe}from"three";import{OrbitControls as ge}from"three/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as ye}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as be}from"three/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as ve}from"three/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as xe}from"three/examples/jsm/loaders/FBXLoader.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 Pe}from"three/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as Ce}from"three/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as Ne}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as Me}from"three/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as _e}from"three/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Le}from"three/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as je}from"three/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as Re}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function ze(e){const{camera:t,domElement:r,intersectObjects:s,touch:i=!0,resetOnEnd:a=!1,resetPosition:l=new d(0,0),resetPositionV3:u=new n(0,0,0),onEnter:c=(()=>{}),onMove:p=(()=>{}),onLeave:f=(()=>{}),onIntersectEnter:g=(()=>{}),onIntersectOver:y=(()=>{}),onIntersectMove:b=(()=>{}),onIntersectLeave:v=(()=>{}),onIntersectClick:x=(()=>{})}=e,S=l.clone(),w=new d(0,0),P=function(e){const{camera:t,resetPosition:r=new n(0,0,0)}=e,s=new o,i=r.clone(),a=new h(new n(0,0,1),0);return{position:i,updatePosition:e=>{s.setFromCamera(e,t),t.getWorldDirection(a.normal),s.ray.intersectPlane(a,i)},intersect:(e,r)=>(s.setFromCamera(e,t),s.intersectObjects(r))}}({camera:t}),C=P.position,N={position:S,positionN:w,positionV3:C,intersectObjects:s,listeners:!1,addListeners:function(){r.addEventListener("mouseenter",L),r.addEventListener("mousemove",j),r.addEventListener("mouseleave",z),r.addEventListener("click",R),i&&(r.addEventListener("touchstart",L),r.addEventListener("touchmove",j),r.addEventListener("touchend",z));N.listeners=!0},removeListeners:function(){r.removeEventListener("mouseenter",L),r.removeEventListener("mousemove",j),r.removeEventListener("mouseleave",z),r.removeEventListener("click",R),r.removeEventListener("touchstart",L),r.removeEventListener("touchmove",j),r.removeEventListener("touchend",z),N.listeners=!1},intersect:_};return N;function M(e){let t,s;e.touches&&e.touches.length>0?(t=e.touches[0].clientX,s=e.touches[0].clientY):(t=e.clientX,s=e.clientY);const i=r.getBoundingCl
2020-09-17 05:54:14 +08:00
//# sourceMappingURL=trois.module.min.js.map