2021-04-07 03:46:35 +08:00
|
|
|
import{defineComponent as e,h as t,toRef as r,watch as s,createApp as i}from"https://unpkg.com/vue@3.0.11/dist/vue.esm-browser.prod.js";import{Vector3 as a,Raycaster as n,Plane as o,Vector2 as h,InstancedMesh as d,WebGLRenderer as l,OrthographicCamera as m,PerspectiveCamera as u,Group as c,Scene as p,Color as f,BoxGeometry as g,CircleGeometry as y,ConeGeometry as b,CylinderGeometry as v,DodecahedronGeometry as S,IcosahedronGeometry as x,LatheGeometry as w,OctahedronGeometry as P,PlaneGeometry as N,PolyhedronGeometry as M,RingGeometry as C,SphereGeometry as L,TetrahedronGeometry as _,TorusGeometry as j,TorusKnotGeometry as k,TubeGeometry as z,Curve as I,CatmullRomCurve3 as O,AmbientLight as G,DirectionalLight as E,HemisphereLight as R,PointLight as A,RectAreaLight as T,SpotLight as B,FrontSide as F,MeshBasicMaterial as D,MeshLambertMaterial as U,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,FontLoader as ne,TextGeometry as oe,DoubleSide as he,SpriteMaterial as de,Sprite as le}from"https://unpkg.com/three@0.127.0/build/three.module.js";import{OrbitControls as me}from"https://unpkg.com/three@0.127.0/examples/jsm/controls/OrbitControls.js";import{RectAreaLightUniformsLib as ue}from"https://unpkg.com/three@0.127.0/examples/jsm/lights/RectAreaLightUniformsLib.js";import{RectAreaLightHelper as ce}from"https://unpkg.com/three@0.127.0/examples/jsm/helpers/RectAreaLightHelper.js";import{GLTFLoader as pe}from"https://unpkg.com/three@0.127.0/examples/jsm/loaders/GLTFLoader.js";import{FBXLoader as fe}from"https://unpkg.com/three@0.127.0/examples/jsm/loaders/FBXLoader.js";import{EffectComposer as ge}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as ye}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as be}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as ve}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as Se}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as xe}from"https://unpkg.com/three@0.127.0/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as we}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as Pe}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/SMAAPass.js";import{SSAOPass as Ne}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/SSAOPass.js";import{UnrealBloomPass as Me}from"https://unpkg.com/three@0.127.0/examples/jsm/postprocessing/UnrealBloomPass.js";function Ce(e){const{camera:t,domElement:r,intersectObjects:s,touch:i=!0,resetOnEnd:l=!1,resetPosition:m=new h(0,0),resetPositionV3:u=new a(0,0,0),onEnter:c=(()=>{}),onMove:p=(()=>{}),onLeave:f=(()=>{}),onIntersectEnter:g=(()=>{}),onIntersectOver:y=(()=>{}),onIntersectMove:b=(()=>{}),onIntersectLeave:v=(()=>{}),onIntersectClick:S=(()=>{})}=e,x=m.clone(),w=new h(0,0),P=function(e){const{camera:t,resetPosition:r=new a(0,0,0)}=e,s=new n,i=r.clone(),h=new o(new a(0,0,1),0);return{position:i,updatePosition:e=>{s.setFromCamera(e,t),t.getWorldDirection(h.normal),s.ray.intersectPlane(h,i)},intersect:(e,r)=>(s.setFromCamera(e,t),s.intersectObjects(r))}}({camera:t}),N=P.position,M={position:x,positionN:w,positionV3:N,intersectObjects:s,listeners:!1,addListeners:function(){r.addEventListener("mouseenter",_),r.addEventListener("mousemove",j),r.addEventListener("mouseleave",z),r.addEventListener("click",k),i&&(r.addEventListener("touchstart",_),r.addEventListener("touchmove",j),r.addEventListener("touchend",z));M.listeners=!0},removeListeners:function(){r.removeEventListener("mouseenter",_),r.removeEventListener("mousemove",j),r.removeEventListe
|