2021-02-27 06:46:58 +08:00
|
|
|
import{h as e,toRef as t,watch as i,inject as r}from"https://unpkg.com/vue@3.0.5/dist/vue.esm-browser.prod.js";import{Vector2 as n,Vector3 as s,Plane as a,Raycaster as o,WebGLRenderer as h,OrthographicCamera as u,PerspectiveCamera as m,Group as d,Scene as c,Color as l,BoxBufferGeometry as f,CircleBufferGeometry as p,ConeBufferGeometry as v,CylinderBufferGeometry as y,DodecahedronBufferGeometry as g,IcosahedronBufferGeometry as x,LatheBufferGeometry as b,OctahedronBufferGeometry as S,PolyhedronBufferGeometry as w,RingBufferGeometry as N,SphereBufferGeometry as C,TetrahedronBufferGeometry as z,TorusBufferGeometry as _,TorusKnotBufferGeometry as M,Curve as P,TubeBufferGeometry as T,AmbientLight as G,DirectionalLight as I,PointLight as R,SpotLight as j,FrontSide as L,MeshBasicMaterial as k,MeshLambertMaterial as B,TextureLoader as E,MeshMatcapMaterial as A,MeshPhongMaterial as D,MeshStandardMaterial as O,MeshPhysicalMaterial as U,ShaderChunk as F,UniformsUtils as $,ShaderLib as W,ShaderMaterial as Z,MeshToonMaterial as H,CubeTextureLoader as q,CubeRefractionMapping as V,Mesh as X,PlaneBufferGeometry as Y,FontLoader as K,TextBufferGeometry as Q,WebGLCubeRenderTarget as J,RGBFormat as ee,LinearMipmapLinearFilter as te,CubeCamera as ie,BackSide as re,DoubleSide as ne,InstancedMesh as se,SpriteMaterial as ae,Sprite as oe,WebGLRenderTarget as he,ObjectSpaceNormalMap as ue,Object3D as me,Face3 as de,MathUtils as ce,InstancedBufferAttribute as le}from"https://unpkg.com/three@0.125.2/build/three.module.js";import{OrbitControls as fe}from"https://unpkg.com/three@0.125.2/examples/jsm/controls/OrbitControls.js";import{EffectComposer as pe}from"https://unpkg.com/three@0.125.2/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as ve}from"https://unpkg.com/three@0.125.2/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as ye}from"https://unpkg.com/three@0.125.2/examples/jsm/postprocessing/BokehPass.js";import{FilmPass as ge}from"https://unpkg.com/three@0.125.2/examples/jsm/postprocessing/FilmPass.js";import{ShaderPass as xe}from"https://unpkg.com/three@0.125.2/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as be}from"https://unpkg.com/three@0.125.2/examples/jsm/shaders/FXAAShader.js";import{HalftonePass as Se}from"https://unpkg.com/three@0.125.2/examples/jsm/postprocessing/HalftonePass.js";import{SMAAPass as we}from"https://unpkg.com/three@0.125.2/examples/jsm/postprocessing/SMAAPass.js";import{UnrealBloomPass as Ne}from"https://unpkg.com/three@0.125.2/examples/jsm/postprocessing/UnrealBloomPass.js";import{Pass as Ce}from"https://unpkg.com/three@0.125.2/examples/jsm/postprocessing/Pass.js";import{gsap as ze,Power4 as _e}from"https://unpkg.com/gsap@3.5.1/index.js";import{Geometry as Me}from"https://unpkg.com/three@0.125.2/examples/jsm/deprecated/Geometry.js";import{resolveComponent as Pe,openBlock as Te,createBlock as Ge,withCtx as Ie,createVNode as Re,renderSlot as je}from"https://unpkg.com/vue@3.0.5/dist/vue.esm-browser.prod.js";import{GLTFLoader as Le}from"https://unpkg.com/three@0.125.2/examples/jsm/loaders/GLTFLoader.js";function ke(){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=[],u=[],m=new n,d=new s,c=new a(new s(0,0,1),0),l=new o,f=[],p={conf:e,renderer:null,camera:null,cameraCtrl:null,materials:{},scene:null,size:t,mouse:m,mouseV3:d,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 h({canvas:e.canvas,antialias:e.antialias,alpha:e.alpha}),p.renderer.autoClear=e.autoClear,e.orbit_ctrl&&(p.orbitCtrl=new fe(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.mou
|