├── .gitignore ├── README.md ├── babel.config.js ├── jsconfig.json ├── package-lock.json ├── package.json ├── public ├── draco │ ├── README.md │ ├── draco_decoder.js │ ├── draco_decoder.wasm │ ├── draco_encoder.js │ ├── draco_wasm_wrapper.js │ └── gltf │ │ ├── draco_decoder.js │ │ ├── draco_decoder.wasm │ │ ├── draco_encoder.js │ │ └── draco_wasm_wrapper.js ├── favicon.ico ├── index.html ├── model │ ├── city.glb │ ├── city2.glb │ ├── city3.glb │ ├── city4.glb │ ├── 热气球.rar │ ├── 红橙热气球.blend │ └── 红橙热气球.blend1 └── textures │ ├── 023.hdr │ ├── bg │ └── title.png │ └── tag │ ├── e.png │ ├── fire.png │ └── jingcha.png ├── src ├── App.vue ├── api │ └── api.js ├── assets │ ├── bg │ │ ├── bar.svg │ │ ├── bg_img03.png │ │ ├── bg_img04.png │ │ ├── border_bg01.png │ │ ├── box_title.png │ │ ├── comment.svg │ │ ├── danger.svg │ │ ├── data.svg │ │ ├── dianli.svg │ │ ├── fire.svg │ │ ├── jingcha.svg │ │ ├── line.svg │ │ ├── line_img.png │ │ ├── shebei.png │ │ ├── title.png │ │ ├── title_bg01.png │ │ ├── title_border.png │ │ └── warning.svg │ └── logo.png ├── components │ ├── BigScreen.vue │ ├── HelloWorld.vue │ └── Scene.vue ├── main.js ├── router │ └── index.js ├── shader │ ├── flyLine │ │ ├── fragment.glsl │ │ └── vertex.glsl │ ├── gradColor │ │ ├── fragment.glsl │ │ └── vertex.glsl │ ├── lightRadar │ │ ├── fragment.glsl │ │ └── vertex.glsl │ ├── lightWall │ │ ├── fragment.glsl │ │ └── vertex.glsl │ └── test │ │ └── Vertex.glsl ├── store │ └── index.js ├── three │ ├── animate.js │ ├── axesHelper.js │ ├── camera.js │ ├── controls.js │ ├── createMesh.js │ ├── gui.js │ ├── init.js │ ├── mesh │ │ ├── AlarmSprite.js │ │ ├── City.js │ │ ├── FlyLine.js │ │ ├── FlyLineShader.js │ │ ├── LightRadar.js │ │ ├── LightWall.js │ │ └── MeshEdges.js │ ├── modify │ │ ├── modifyCityMaterial.js │ │ └── modifyMaterial.js │ ├── renderer.js │ └── scene.js ├── utils │ └── eventHub.js └── views │ ├── AboutView.vue │ └── HomeView.vue ├── vue.config.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 智慧园区 2 | 3 | ## Project setup 4 | ``` 5 | yarn install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | yarn serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | yarn build 16 | ``` 17 | 18 | ### Customize configuration 19 | See [Configuration Reference](https://cli.vuejs.org/config/). 20 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "threeapp", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "axios": "^0.26.1", 11 | "core-js": "^3.8.3", 12 | "dat.gui": "^0.7.9", 13 | "gsap": "^3.9.1", 14 | "mitt": "^3.0.0", 15 | "three": "^0.138.3", 16 | "vue": "^3.2.13", 17 | "vue-router": "^4.0.3", 18 | "vuex": "^4.0.0" 19 | }, 20 | "devDependencies": { 21 | "@vue/cli-plugin-babel": "~5.0.0", 22 | "@vue/cli-plugin-router": "~5.0.0", 23 | "@vue/cli-plugin-vuex": "~5.0.0", 24 | "@vue/cli-service": "~5.0.0", 25 | "less": "^4.0.0", 26 | "less-loader": "^8.0.0", 27 | "webpack-glsl-loader": "^1.0.1" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /public/draco/README.md: -------------------------------------------------------------------------------- 1 | # Draco 3D Data Compression 2 | 3 | Draco is an open-source library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. 4 | 5 | [Website](https://google.github.io/draco/) | [GitHub](https://github.com/google/draco) 6 | 7 | ## Contents 8 | 9 | This folder contains three utilities: 10 | 11 | * `draco_decoder.js` — Emscripten-compiled decoder, compatible with any modern browser. 12 | * `draco_decoder.wasm` — WebAssembly decoder, compatible with newer browsers and devices. 13 | * `draco_wasm_wrapper.js` — JavaScript wrapper for the WASM decoder. 14 | 15 | Each file is provided in two variations: 16 | 17 | * **Default:** Latest stable builds, tracking the project's [master branch](https://github.com/google/draco). 18 | * **glTF:** Builds targeted by the [glTF mesh compression extension](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression), tracking the [corresponding Draco branch](https://github.com/google/draco/tree/gltf_2.0_draco_extension). 19 | 20 | Either variation may be used with `THREE.DRACOLoader`: 21 | 22 | ```js 23 | var dracoLoader = new THREE.DRACOLoader(); 24 | dracoLoader.setDecoderPath('path/to/decoders/'); 25 | dracoLoader.setDecoderConfig({type: 'js'}); // (Optional) Override detection of WASM support. 26 | ``` 27 | 28 | Further [documentation on GitHub](https://github.com/google/draco/tree/master/javascript/example#static-loading-javascript-decoder). 29 | 30 | ## License 31 | 32 | [Apache License 2.0](https://github.com/google/draco/blob/master/LICENSE) 33 | -------------------------------------------------------------------------------- /public/draco/draco_decoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/draco/draco_decoder.wasm -------------------------------------------------------------------------------- /public/draco/draco_wasm_wrapper.js: -------------------------------------------------------------------------------- 1 | var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(f){var m=0;return function(){return m=d);)++b;if(16k?d+=String.fromCharCode(k):(k-=65536,d+=String.fromCharCode(55296|k>>10,56320|k&1023))}}else d+=String.fromCharCode(k)}return d}function X(a,c){return a?h(ca,a,c):""}function e(a,c){0=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++b)&1023);127>=d?++c:c=2047>=d?c+2:65535>=d?c+3:c+4}c=Array(c+1);b=0;d=c.length;if(0=e){var f=a.charCodeAt(++k);e=65536+((e&1023)<<10)|f&1023}if(127>=e){if(b>=d)break;c[b++]=e}else{if(2047>=e){if(b+1>=d)break;c[b++]=192|e>>6}else{if(65535>=e){if(b+2>=d)break;c[b++]=224|e>>12}else{if(b+3>=d)break;c[b++]=240|e>>18;c[b++]=128|e>>12&63}c[b++]=128|e>>6&63}c[b++]=128| 18 | e&63}}c[b]=0}a=n.alloc(c,T);n.copy(c,T,a)}return a}function x(){throw"cannot construct a Status, no constructor in IDL";}function A(){this.ptr=Oa();u(A)[this.ptr]=this}function B(){this.ptr=Pa();u(B)[this.ptr]=this}function C(){this.ptr=Qa();u(C)[this.ptr]=this}function D(){this.ptr=Ra();u(D)[this.ptr]=this}function E(){this.ptr=Sa();u(E)[this.ptr]=this}function q(){this.ptr=Ta();u(q)[this.ptr]=this}function J(){this.ptr=Ua();u(J)[this.ptr]=this}function w(){this.ptr=Va();u(w)[this.ptr]=this}function F(){this.ptr= 19 | Wa();u(F)[this.ptr]=this}function r(){this.ptr=Xa();u(r)[this.ptr]=this}function G(){this.ptr=Ya();u(G)[this.ptr]=this}function H(){this.ptr=Za();u(H)[this.ptr]=this}function O(){this.ptr=$a();u(O)[this.ptr]=this}function K(){this.ptr=ab();u(K)[this.ptr]=this}function g(){this.ptr=bb();u(g)[this.ptr]=this}function y(){this.ptr=cb();u(y)[this.ptr]=this}function Q(){throw"cannot construct a VoidPtr, no constructor in IDL";}function I(){this.ptr=db();u(I)[this.ptr]=this}function L(){this.ptr=eb();u(L)[this.ptr]= 20 | this}m=m||{};var a="undefined"!==typeof m?m:{},Ga=!1,Ha=!1;a.onRuntimeInitialized=function(){Ga=!0;if(Ha&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ha=!0;if(Ga&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3=a[1]?!0:0!=a[0]||10>2]},getStr:function(){return X(R.get())}, 26 | get64:function(){var a=R.get();R.get();return a},getZero:function(){R.get()}},Ka={__cxa_allocate_exception:function(a){return ib(a)},__cxa_throw:function(a,c,b){"uncaught_exception"in ta?ta.uncaught_exceptions++:ta.uncaught_exceptions=1;throw a;},abort:function(){z()},emscripten_get_sbrk_ptr:function(){return 18416},emscripten_memcpy_big:function(a,c,b){ca.set(ca.subarray(c,c+b),a)},emscripten_resize_heap:function(a){if(2147418112= 27 | c?e(2*c,65536):Math.min(e((3*c+2147483648)/4,65536),2147418112);a:{try{ia.grow(c-ka.byteLength+65535>>16);l(ia.buffer);var b=1;break a}catch(d){}b=void 0}return b?!0:!1},environ_get:function(a,c){var b=0;ba().forEach(function(d,e){var f=c+b;e=P[a+4*e>>2]=f;for(f=0;f>0]=d.charCodeAt(f);T[e>>0]=0;b+=d.length+1});return 0},environ_sizes_get:function(a,c){var b=ba();P[a>>2]=b.length;var d=0;b.forEach(function(a){d+=a.length+1});P[c>>2]=d;return 0},fd_close:function(a){return 0},fd_seek:function(a, 28 | c,b,d,e){return 0},fd_write:function(a,c,b,d){try{for(var e=0,f=0;f>2],k=P[c+(8*f+4)>>2],h=0;h>2]=e;return 0}catch(ua){return"undefined"!==typeof FS&&ua instanceof FS.ErrnoError||z(ua),ua.errno}},memory:ia,setTempRet0:function(a){},table:gb},La=function(){function e(c,b){a.asm=c.exports;aa--;a.monitorRunDependencies&&a.monitorRunDependencies(aa);0==aa&&(null!==sa&&(clearInterval(sa),sa=null),ja&&(c=ja,ja=null,c()))}function c(a){e(a.instance)} 29 | function b(a){return Ma().then(function(a){return WebAssembly.instantiate(a,d)}).then(a,function(a){Y("failed to asynchronously prepare wasm: "+a);z(a)})}var d={env:Ka,wasi_unstable:Ka};aa++;a.monitorRunDependencies&&a.monitorRunDependencies(aa);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(Na){return Y("Module.instantiateWasm callback failed with error: "+Na),!1}(function(){if(da||"function"!==typeof WebAssembly.instantiateStreaming||va(U)||"function"!==typeof fetch)return b(c);fetch(U, 30 | {credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,d).then(c,function(a){Y("wasm streaming compile failed: "+a);Y("falling back to ArrayBuffer instantiation");b(c)})})})();return{}}();a.asm=La;var hb=a.___wasm_call_ctors=function(){return a.asm.__wasm_call_ctors.apply(null,arguments)},jb=a._emscripten_bind_Status_code_0=function(){return a.asm.emscripten_bind_Status_code_0.apply(null,arguments)},kb=a._emscripten_bind_Status_ok_0=function(){return a.asm.emscripten_bind_Status_ok_0.apply(null, 31 | arguments)},lb=a._emscripten_bind_Status_error_msg_0=function(){return a.asm.emscripten_bind_Status_error_msg_0.apply(null,arguments)},mb=a._emscripten_bind_Status___destroy___0=function(){return a.asm.emscripten_bind_Status___destroy___0.apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_DracoUInt16Array_0.apply(null,arguments)},nb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt16Array_GetValue_1.apply(null, 32 | arguments)},ob=a._emscripten_bind_DracoUInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_size_0.apply(null,arguments)},pb=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt16Array___destroy___0.apply(null,arguments)},Pa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm.emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},qb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm.emscripten_bind_PointCloud_num_attributes_0.apply(null, 33 | arguments)},rb=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm.emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},sb=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm.emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Qa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_DracoUInt8Array_0.apply(null,arguments)},tb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt8Array_GetValue_1.apply(null, 34 | arguments)},ub=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},vb=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},Ra=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_DracoUInt32Array_0.apply(null,arguments)},wb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt32Array_GetValue_1.apply(null, 35 | arguments)},xb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_size_0.apply(null,arguments)},yb=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt32Array___destroy___0.apply(null,arguments)},Sa=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},zb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1= 36 | function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},Ab=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,arguments)},Bb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},Ta=a._emscripten_bind_PointAttribute_PointAttribute_0= 37 | function(){return a.asm.emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Cb=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm.emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm.emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},Eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm.emscripten_bind_PointAttribute_attribute_type_0.apply(null, 38 | arguments)},Fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm.emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},Gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm.emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm.emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_stride_0.apply(null, 39 | arguments)},Jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Kb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm.emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},Lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm.emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Ua=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0= 40 | function(){return a.asm.emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},Mb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm.emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},Nb=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm.emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},Va=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0= 41 | function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},Ob=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},Pb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)}, 42 | Qb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},Rb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},Sb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)}, 43 | Wa=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return a.asm.emscripten_bind_DracoInt8Array_DracoInt8Array_0.apply(null,arguments)},Tb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt8Array_GetValue_1.apply(null,arguments)},Ub=a._emscripten_bind_DracoInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoInt8Array_size_0.apply(null,arguments)},Vb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt8Array___destroy___0.apply(null, 44 | arguments)},Xa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm.emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},Wb=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Xb=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Yb=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3= 45 | function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntryArray_3.apply(null,arguments)},Zb=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},$b=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm.emscripten_bind_MetadataQuerier_NumEntries_1.apply(null, 46 | arguments)},bc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm.emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},Ya=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return a.asm.emscripten_bind_DracoInt16Array_DracoInt16Array_0.apply(null,arguments)},dc=a._emscripten_bind_DracoInt16Array_GetValue_1= 47 | function(){return a.asm.emscripten_bind_DracoInt16Array_GetValue_1.apply(null,arguments)},ec=a._emscripten_bind_DracoInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoInt16Array_size_0.apply(null,arguments)},fc=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt16Array___destroy___0.apply(null,arguments)},Za=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null, 48 | arguments)},gc=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},hc=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},ic=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},$a=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm.emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null, 49 | arguments)},jc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm.emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},ab=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm.emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},kc=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm.emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},lc=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm.emscripten_bind_DecoderBuffer___destroy___0.apply(null, 50 | arguments)},bb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm.emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return a.asm.emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},nc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},oc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null, 51 | arguments)},pc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttribute_2= 52 | function(){return a.asm.emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm.emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null, 53 | arguments)},wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm.emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm.emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt16Array_3.apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3= 54 | function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt32Array_3.apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null, 55 | arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3.apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3.apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3.apply(null,arguments)}, 56 | Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3.apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3.apply(null,arguments)},Jc= 57 | a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return a.asm.emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5.apply(null,arguments)},Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm.emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},Lc=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm.emscripten_bind_Decoder___destroy___0.apply(null,arguments)},cb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm.emscripten_bind_Mesh_Mesh_0.apply(null, 58 | arguments)},Mc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm.emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},Nc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm.emscripten_bind_Mesh_num_attributes_0.apply(null,arguments)},Oc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm.emscripten_bind_Mesh_num_points_0.apply(null,arguments)},Pc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm.emscripten_bind_Mesh___destroy___0.apply(null,arguments)}, 59 | Qc=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm.emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},db=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm.emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,arguments)},Rc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},Sc=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoInt32Array_size_0.apply(null, 60 | arguments)},Tc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},eb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm.emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},Uc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm.emscripten_bind_Metadata___destroy___0.apply(null,arguments)},Vc=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm.emscripten_enum_draco_StatusCode_OK.apply(null, 61 | arguments)},Wc=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_DRACO_ERROR.apply(null,arguments)},Xc=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},Yc=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm.emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Zc=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION= 62 | function(){return a.asm.emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)},$c=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm.emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return a.asm.emscripten_enum_draco_DataType_DT_INVALID.apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT8.apply(null, 63 | arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT8.apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT16.apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT16.apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT32.apply(null, 64 | arguments)},gd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT32.apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT64.apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT64.apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT32.apply(null, 65 | arguments)},kd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT64.apply(null,arguments)},ld=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return a.asm.emscripten_enum_draco_DataType_DT_BOOL.apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return a.asm.emscripten_enum_draco_DataType_DT_TYPES_COUNT.apply(null,arguments)},nd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null, 66 | arguments)},od=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},pd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},qd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null, 67 | arguments)},rd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},sd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},td=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null, 68 | arguments)},ud=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},vd=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},wd=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},xd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR= 69 | function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},yd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},zd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)};a._setThrew=function(){return a.asm.setThrew.apply(null,arguments)};var ta=a.__ZSt18uncaught_exceptionv= 70 | function(){return a.asm._ZSt18uncaught_exceptionv.apply(null,arguments)};a._free=function(){return a.asm.free.apply(null,arguments)};var ib=a._malloc=function(){return a.asm.malloc.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.__growWasmMemory=function(){return a.asm.__growWasmMemory.apply(null,arguments)}; 71 | a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)}; 72 | a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_iidiiii=function(){return a.asm.dynCall_iidiiii.apply(null,arguments)};a.dynCall_jiji=function(){return a.asm.dynCall_jiji.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.asm=La;var fa;a.then=function(e){if(fa)e(a); 73 | else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();e(a)}}return a};ja=function c(){fa||ma();fa||(ja=c)};a.run=ma;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0=n.size?(t(0>=1;break;case 4:d>>=2;break;case 8:d>>=3}for(var c=0;c=d);)++b;if(16k?d+=String.fromCharCode(k):(k-=65536,d+=String.fromCharCode(55296|k>>10,56320|k&1023))}}else d+=String.fromCharCode(k)}return d}function X(a,c){return a?h(ca,a,c):""}function e(a,c){0=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++b)&1023);127>=d?++c:c=2047>=d?c+2:65535>=d?c+3:c+4}c=Array(c+1);b=0;d=c.length;if(0=e){var f=a.charCodeAt(++k);e=65536+((e&1023)<<10)|f&1023}if(127>=e){if(b>=d)break;c[b++]=e}else{if(2047>=e){if(b+1>=d)break;c[b++]=192|e>>6}else{if(65535>=e){if(b+2>=d)break;c[b++]=224|e>>12}else{if(b+3>=d)break;c[b++]=240|e>>18;c[b++]=128|e>>12&63}c[b++]=128|e>>6&63}c[b++]=128| 18 | e&63}}c[b]=0}a=n.alloc(c,T);n.copy(c,T,a)}return a}function x(){throw"cannot construct a Status, no constructor in IDL";}function A(){this.ptr=Oa();u(A)[this.ptr]=this}function B(){this.ptr=Pa();u(B)[this.ptr]=this}function C(){this.ptr=Qa();u(C)[this.ptr]=this}function D(){this.ptr=Ra();u(D)[this.ptr]=this}function E(){this.ptr=Sa();u(E)[this.ptr]=this}function q(){this.ptr=Ta();u(q)[this.ptr]=this}function J(){this.ptr=Ua();u(J)[this.ptr]=this}function w(){this.ptr=Va();u(w)[this.ptr]=this}function F(){this.ptr= 19 | Wa();u(F)[this.ptr]=this}function r(){this.ptr=Xa();u(r)[this.ptr]=this}function G(){this.ptr=Ya();u(G)[this.ptr]=this}function H(){this.ptr=Za();u(H)[this.ptr]=this}function O(){this.ptr=$a();u(O)[this.ptr]=this}function K(){this.ptr=ab();u(K)[this.ptr]=this}function g(){this.ptr=bb();u(g)[this.ptr]=this}function y(){this.ptr=cb();u(y)[this.ptr]=this}function Q(){throw"cannot construct a VoidPtr, no constructor in IDL";}function I(){this.ptr=db();u(I)[this.ptr]=this}function L(){this.ptr=eb();u(L)[this.ptr]= 20 | this}m=m||{};var a="undefined"!==typeof m?m:{},Ga=!1,Ha=!1;a.onRuntimeInitialized=function(){Ga=!0;if(Ha&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ha=!0;if(Ga&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3=a[1]?!0:0!=a[0]||10>2]},getStr:function(){return X(R.get())}, 26 | get64:function(){var a=R.get();R.get();return a},getZero:function(){R.get()}},Ka={__cxa_allocate_exception:function(a){return ib(a)},__cxa_throw:function(a,c,b){"uncaught_exception"in ta?ta.uncaught_exceptions++:ta.uncaught_exceptions=1;throw a;},abort:function(){z()},emscripten_get_sbrk_ptr:function(){return 13664},emscripten_memcpy_big:function(a,c,b){ca.set(ca.subarray(c,c+b),a)},emscripten_resize_heap:function(a){if(2147418112= 27 | c?e(2*c,65536):Math.min(e((3*c+2147483648)/4,65536),2147418112);a:{try{ia.grow(c-ka.byteLength+65535>>16);l(ia.buffer);var b=1;break a}catch(d){}b=void 0}return b?!0:!1},environ_get:function(a,c){var b=0;ba().forEach(function(d,e){var f=c+b;e=P[a+4*e>>2]=f;for(f=0;f>0]=d.charCodeAt(f);T[e>>0]=0;b+=d.length+1});return 0},environ_sizes_get:function(a,c){var b=ba();P[a>>2]=b.length;var d=0;b.forEach(function(a){d+=a.length+1});P[c>>2]=d;return 0},fd_close:function(a){return 0},fd_seek:function(a, 28 | c,b,d,e){return 0},fd_write:function(a,c,b,d){try{for(var e=0,f=0;f>2],k=P[c+(8*f+4)>>2],h=0;h>2]=e;return 0}catch(ua){return"undefined"!==typeof FS&&ua instanceof FS.ErrnoError||z(ua),ua.errno}},memory:ia,setTempRet0:function(a){},table:gb},La=function(){function e(c,b){a.asm=c.exports;aa--;a.monitorRunDependencies&&a.monitorRunDependencies(aa);0==aa&&(null!==sa&&(clearInterval(sa),sa=null),ja&&(c=ja,ja=null,c()))}function c(a){e(a.instance)} 29 | function b(a){return Ma().then(function(a){return WebAssembly.instantiate(a,d)}).then(a,function(a){Y("failed to asynchronously prepare wasm: "+a);z(a)})}var d={env:Ka,wasi_unstable:Ka};aa++;a.monitorRunDependencies&&a.monitorRunDependencies(aa);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(Na){return Y("Module.instantiateWasm callback failed with error: "+Na),!1}(function(){if(da||"function"!==typeof WebAssembly.instantiateStreaming||va(U)||"function"!==typeof fetch)return b(c);fetch(U, 30 | {credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,d).then(c,function(a){Y("wasm streaming compile failed: "+a);Y("falling back to ArrayBuffer instantiation");b(c)})})})();return{}}();a.asm=La;var hb=a.___wasm_call_ctors=function(){return a.asm.__wasm_call_ctors.apply(null,arguments)},jb=a._emscripten_bind_Status_code_0=function(){return a.asm.emscripten_bind_Status_code_0.apply(null,arguments)},kb=a._emscripten_bind_Status_ok_0=function(){return a.asm.emscripten_bind_Status_ok_0.apply(null, 31 | arguments)},lb=a._emscripten_bind_Status_error_msg_0=function(){return a.asm.emscripten_bind_Status_error_msg_0.apply(null,arguments)},mb=a._emscripten_bind_Status___destroy___0=function(){return a.asm.emscripten_bind_Status___destroy___0.apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_DracoUInt16Array_0.apply(null,arguments)},nb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt16Array_GetValue_1.apply(null, 32 | arguments)},ob=a._emscripten_bind_DracoUInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_size_0.apply(null,arguments)},pb=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt16Array___destroy___0.apply(null,arguments)},Pa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm.emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},qb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm.emscripten_bind_PointCloud_num_attributes_0.apply(null, 33 | arguments)},rb=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm.emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},sb=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm.emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Qa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_DracoUInt8Array_0.apply(null,arguments)},tb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt8Array_GetValue_1.apply(null, 34 | arguments)},ub=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},vb=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},Ra=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_DracoUInt32Array_0.apply(null,arguments)},wb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt32Array_GetValue_1.apply(null, 35 | arguments)},xb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_size_0.apply(null,arguments)},yb=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt32Array___destroy___0.apply(null,arguments)},Sa=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},zb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1= 36 | function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},Ab=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,arguments)},Bb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},Ta=a._emscripten_bind_PointAttribute_PointAttribute_0= 37 | function(){return a.asm.emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Cb=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm.emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm.emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},Eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm.emscripten_bind_PointAttribute_attribute_type_0.apply(null, 38 | arguments)},Fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm.emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},Gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm.emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm.emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_stride_0.apply(null, 39 | arguments)},Jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Kb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm.emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},Lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm.emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Ua=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0= 40 | function(){return a.asm.emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},Mb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm.emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},Nb=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm.emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},Va=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0= 41 | function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},Ob=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},Pb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)}, 42 | Qb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},Rb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},Sb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)}, 43 | Wa=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return a.asm.emscripten_bind_DracoInt8Array_DracoInt8Array_0.apply(null,arguments)},Tb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt8Array_GetValue_1.apply(null,arguments)},Ub=a._emscripten_bind_DracoInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoInt8Array_size_0.apply(null,arguments)},Vb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt8Array___destroy___0.apply(null, 44 | arguments)},Xa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm.emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},Wb=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Xb=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Yb=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3= 45 | function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntryArray_3.apply(null,arguments)},Zb=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},$b=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm.emscripten_bind_MetadataQuerier_NumEntries_1.apply(null, 46 | arguments)},bc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm.emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},Ya=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return a.asm.emscripten_bind_DracoInt16Array_DracoInt16Array_0.apply(null,arguments)},dc=a._emscripten_bind_DracoInt16Array_GetValue_1= 47 | function(){return a.asm.emscripten_bind_DracoInt16Array_GetValue_1.apply(null,arguments)},ec=a._emscripten_bind_DracoInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoInt16Array_size_0.apply(null,arguments)},fc=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt16Array___destroy___0.apply(null,arguments)},Za=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null, 48 | arguments)},gc=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},hc=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},ic=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},$a=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm.emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null, 49 | arguments)},jc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm.emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},ab=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm.emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},kc=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm.emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},lc=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm.emscripten_bind_DecoderBuffer___destroy___0.apply(null, 50 | arguments)},bb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm.emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return a.asm.emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},nc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},oc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null, 51 | arguments)},pc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttribute_2= 52 | function(){return a.asm.emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm.emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null, 53 | arguments)},wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm.emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm.emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt16Array_3.apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3= 54 | function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt32Array_3.apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null, 55 | arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3.apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3.apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3.apply(null,arguments)}, 56 | Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3.apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3.apply(null,arguments)},Jc= 57 | a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return a.asm.emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5.apply(null,arguments)},Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm.emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},Lc=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm.emscripten_bind_Decoder___destroy___0.apply(null,arguments)},cb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm.emscripten_bind_Mesh_Mesh_0.apply(null, 58 | arguments)},Mc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm.emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},Nc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm.emscripten_bind_Mesh_num_attributes_0.apply(null,arguments)},Oc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm.emscripten_bind_Mesh_num_points_0.apply(null,arguments)},Pc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm.emscripten_bind_Mesh___destroy___0.apply(null,arguments)}, 59 | Qc=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm.emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},db=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm.emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,arguments)},Rc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},Sc=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoInt32Array_size_0.apply(null, 60 | arguments)},Tc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},eb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm.emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},Uc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm.emscripten_bind_Metadata___destroy___0.apply(null,arguments)},Vc=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm.emscripten_enum_draco_StatusCode_OK.apply(null, 61 | arguments)},Wc=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_DRACO_ERROR.apply(null,arguments)},Xc=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},Yc=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm.emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Zc=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION= 62 | function(){return a.asm.emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)},$c=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm.emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return a.asm.emscripten_enum_draco_DataType_DT_INVALID.apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT8.apply(null, 63 | arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT8.apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT16.apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT16.apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT32.apply(null, 64 | arguments)},gd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT32.apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT64.apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT64.apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT32.apply(null, 65 | arguments)},kd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT64.apply(null,arguments)},ld=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return a.asm.emscripten_enum_draco_DataType_DT_BOOL.apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return a.asm.emscripten_enum_draco_DataType_DT_TYPES_COUNT.apply(null,arguments)},nd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null, 66 | arguments)},od=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},pd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},qd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null, 67 | arguments)},rd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},sd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},td=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null, 68 | arguments)},ud=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},vd=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},wd=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},xd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR= 69 | function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},yd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},zd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)};a._setThrew=function(){return a.asm.setThrew.apply(null,arguments)};var ta=a.__ZSt18uncaught_exceptionv= 70 | function(){return a.asm._ZSt18uncaught_exceptionv.apply(null,arguments)};a._free=function(){return a.asm.free.apply(null,arguments)};var ib=a._malloc=function(){return a.asm.malloc.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.__growWasmMemory=function(){return a.asm.__growWasmMemory.apply(null,arguments)}; 71 | a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)}; 72 | a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_iidiiii=function(){return a.asm.dynCall_iidiiii.apply(null,arguments)};a.dynCall_jiji=function(){return a.asm.dynCall_jiji.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.asm=La;var fa;a.then=function(e){if(fa)e(a); 73 | else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();e(a)}}return a};ja=function c(){fa||ma();fa||(ja=c)};a.run=ma;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0=n.size?(t(0>=1;break;case 4:d>>=2;break;case 8:d>>=3}for(var c=0;c 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 14 | 15 | 16 | 19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /public/model/city.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/model/city.glb -------------------------------------------------------------------------------- /public/model/city2.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/model/city2.glb -------------------------------------------------------------------------------- /public/model/city3.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/model/city3.glb -------------------------------------------------------------------------------- /public/model/city4.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/model/city4.glb -------------------------------------------------------------------------------- /public/model/热气球.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/model/热气球.rar -------------------------------------------------------------------------------- /public/model/红橙热气球.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/model/红橙热气球.blend -------------------------------------------------------------------------------- /public/model/红橙热气球.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/model/红橙热气球.blend1 -------------------------------------------------------------------------------- /public/textures/023.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/textures/023.hdr -------------------------------------------------------------------------------- /public/textures/bg/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/textures/bg/title.png -------------------------------------------------------------------------------- /public/textures/tag/e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/textures/tag/e.png -------------------------------------------------------------------------------- /public/textures/tag/fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/textures/tag/fire.png -------------------------------------------------------------------------------- /public/textures/tag/jingcha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/public/textures/tag/jingcha.png -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 27 | -------------------------------------------------------------------------------- /src/api/api.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | export function getSmartCityInfo() { 4 | return axios({ 5 | url: "http://127.0.0.1:4523/mock/806782/api/smartcity/info", 6 | method: "get", 7 | }); 8 | } 9 | 10 | export function getSmartCityList() { 11 | return axios({ 12 | url: "http://127.0.0.1:4523/mock/806782/api/smartcity/list", 13 | method: "get", 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /src/assets/bg/bar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | bar 4 | bar,column,cylinder,percent,progress 5 | cc-by 6 | p3ejy0 7 | 50 | -------------------------------------------------------------------------------- /src/assets/bg/bg_img03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/assets/bg/bg_img03.png -------------------------------------------------------------------------------- /src/assets/bg/bg_img04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/assets/bg/bg_img04.png -------------------------------------------------------------------------------- /src/assets/bg/border_bg01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/assets/bg/border_bg01.png -------------------------------------------------------------------------------- /src/assets/bg/box_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/assets/bg/box_title.png -------------------------------------------------------------------------------- /src/assets/bg/comment.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/assets/bg/danger.svg: -------------------------------------------------------------------------------- 1 | 2 | no horntraffic sign,road,caution,warning,no horn,transportationbykkff1g -------------------------------------------------------------------------------- /src/assets/bg/data.svg: -------------------------------------------------------------------------------- 1 | 2 | bar 3 | bar,column,cylinder,percent,progress 4 | by 5 | h2mqz6 6 | -------------------------------------------------------------------------------- /src/assets/bg/dianli.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/bg/fire.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/bg/jingcha.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/bg/line.svg: -------------------------------------------------------------------------------- 1 | 2 | messagereplay,hang out,online,pause,voice,record,hold,phone,call,message,communicationbyl5q2ib -------------------------------------------------------------------------------- /src/assets/bg/line_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/assets/bg/line_img.png -------------------------------------------------------------------------------- /src/assets/bg/shebei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/assets/bg/shebei.png -------------------------------------------------------------------------------- /src/assets/bg/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/assets/bg/title.png -------------------------------------------------------------------------------- /src/assets/bg/title_bg01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/assets/bg/title_bg01.png -------------------------------------------------------------------------------- /src/assets/bg/title_border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/assets/bg/title_border.png -------------------------------------------------------------------------------- /src/assets/bg/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | no horntraffic sign,road,caution,warning,no horn,transportationbykkff1g -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/BigScreen.vue: -------------------------------------------------------------------------------- 1 | 83 | 84 | 129 | 130 | 308 | -------------------------------------------------------------------------------- /src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 42 | 43 | 44 | 60 | -------------------------------------------------------------------------------- /src/components/Scene.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 51 | 52 | 62 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import store from './store' 5 | 6 | createApp(App).use(store).use(router).mount('#app') 7 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHashHistory } from 'vue-router' 2 | import HomeView from '../views/HomeView.vue' 3 | 4 | const routes = [ 5 | { 6 | path: '/', 7 | name: 'home', 8 | component: HomeView 9 | }, 10 | { 11 | path: '/about', 12 | name: 'about', 13 | // route level code-splitting 14 | // this generates a separate chunk (about.[hash].js) for this route 15 | // which is lazy-loaded when the route is visited. 16 | component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue') 17 | } 18 | ] 19 | 20 | const router = createRouter({ 21 | history: createWebHashHistory(), 22 | routes 23 | }) 24 | 25 | export default router 26 | -------------------------------------------------------------------------------- /src/shader/flyLine/fragment.glsl: -------------------------------------------------------------------------------- 1 | varying float vSize; 2 | 3 | uniform vec3 uColor; 4 | void main(){ 5 | float distanceToCenter = distance(gl_PointCoord,vec2(0.5)); 6 | float strength = 1.0 - (distanceToCenter*2.0); 7 | 8 | gl_FragColor = vec4(1,0,0,strength); 9 | if(vSize<=0.0){ 10 | gl_FragColor = vec4(1,0,0,0); 11 | }else{ 12 | gl_FragColor = vec4(uColor,strength); 13 | } 14 | } -------------------------------------------------------------------------------- /src/shader/flyLine/vertex.glsl: -------------------------------------------------------------------------------- 1 | attribute float aSize; 2 | varying float vSize; 3 | 4 | uniform float uTime; 5 | uniform float uLength; 6 | 7 | void main(){ 8 | vec4 viewPosition = viewMatrix * modelMatrix * vec4(position,1); 9 | gl_Position = projectionMatrix * viewPosition; 10 | 11 | // vSize =5.0 - (aSize*0.01+uTime-5.0)*3.0; 12 | // vSize = aSize-100.0-uTime; 13 | // if(vSize<0.0){ 14 | // vSize=uLength+vSize; 15 | // } 16 | 17 | // vSize = (vSize-500.0)*0.1; 18 | 19 | 20 | vSize = aSize; 21 | vSize = vSize - uTime; 22 | if(vSize<=0.0){ 23 | vSize = vSize + uLength; 24 | } 25 | vSize = (vSize-700.0)*0.3; 26 | gl_PointSize = - vSize/viewPosition.z; 27 | 28 | // gl_PointSize = 0.0; 29 | 30 | 31 | // gl_PointSize = -vSize*10.0/viewPosition.z; 32 | } -------------------------------------------------------------------------------- /src/shader/gradColor/fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform vec3 diffuse; 2 | uniform float opacity; 3 | #ifndef FLAT_SHADED 4 | varying vec3 vNormal; 5 | #endif 6 | #include 7 | 8 | uniform vec3 uTopColor; 9 | uniform float uHeight; 10 | varying vec3 vPosition; 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | void main() { 29 | #include 30 | vec4 diffuseColor = vec4( diffuse, opacity ); 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 38 | #ifdef USE_LIGHTMAP 39 | vec4 lightMapTexel= texture2D( lightMap, vUv2 ); 40 | reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity; 41 | #else 42 | reflectedLight.indirectDiffuse += vec3( 1.0 ); 43 | #endif 44 | #include 45 | reflectedLight.indirectDiffuse *= diffuseColor.rgb; 46 | vec3 outgoingLight = reflectedLight.indirectDiffuse; 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | // 目标的基础原色 55 | vec3 distColor = outgoingLight; 56 | // uTopColor渐变的色 57 | // 混合百分 58 | float indexMix = (vPosition.y+uHeight/2.0)/uHeight; 59 | // 混合颜色 60 | distColor = mix(distColor,uTopColor,indexMix); 61 | gl_FragColor = vec4(distColor,1); 62 | } -------------------------------------------------------------------------------- /src/shader/gradColor/vertex.glsl: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | varying vec3 vPosition; 4 | 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | void main() { 16 | 17 | vPosition = position; 18 | // gl_Position = projectionMatrix * viewMatrix * viewPosition; 19 | 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #endif 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | } -------------------------------------------------------------------------------- /src/shader/lightRadar/fragment.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | 3 | uniform float uTime; 4 | uniform vec3 uColor; 5 | 6 | mat2 rotate2d(float _angle){ 7 | return mat2(cos(_angle),-sin(_angle), 8 | sin(_angle),cos(_angle)); 9 | } 10 | void main(){ 11 | 12 | vec2 newUv = rotate2d(uTime*6.28)*(vUv-0.5); 13 | newUv = newUv + 0.5; 14 | 15 | 16 | // 画圆 17 | float distanceToCenter = distance(newUv,vec2(0.5)); 18 | float strength = step(0.5,distanceToCenter); 19 | strength = 1.0 - strength; 20 | // 按照角度画渐变 21 | float angle = atan(newUv.x-0.5,newUv.y-0.5); 22 | // -PI 到 PI => 0 - 2*PI 23 | 24 | angle = angle + 3.14; 25 | angle = angle / 6.28; 26 | 27 | gl_FragColor = vec4(uColor,angle*strength); 28 | } -------------------------------------------------------------------------------- /src/shader/lightRadar/vertex.glsl: -------------------------------------------------------------------------------- 1 | 2 | varying vec2 vUv; 3 | void main(){ 4 | vec4 viewPosition = viewMatrix * modelMatrix * vec4(position,1); 5 | gl_Position = projectionMatrix * viewPosition; 6 | vUv = uv; 7 | 8 | } -------------------------------------------------------------------------------- /src/shader/lightWall/fragment.glsl: -------------------------------------------------------------------------------- 1 | varying vec3 vPosition; 2 | uniform vec3 uColor; 3 | uniform float uHeight; 4 | 5 | 6 | void main(){ 7 | 8 | float strength = (vPosition.y+uHeight/2.0)/uHeight; 9 | 10 | gl_FragColor = vec4(uColor,1.0 - strength); 11 | } -------------------------------------------------------------------------------- /src/shader/lightWall/vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec3 vPosition; 2 | 3 | uniform float uTime; 4 | 5 | void main(){ 6 | // vec3 scalePosition = vec3(position.x+uTime,position.y,position.z+uTime); 7 | vec4 viewPosition = viewMatrix * modelMatrix * vec4(position,1); 8 | gl_Position = projectionMatrix * viewPosition; 9 | vPosition = position; 10 | 11 | } -------------------------------------------------------------------------------- /src/shader/test/Vertex.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yyp92/threejs-smart-park/24d3d33ae0d8cb71bda61c7f06a21efc2c9d7231/src/shader/test/Vertex.glsl -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: { 5 | }, 6 | getters: { 7 | }, 8 | mutations: { 9 | }, 10 | actions: { 11 | }, 12 | modules: { 13 | } 14 | }) 15 | -------------------------------------------------------------------------------- /src/three/animate.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import cameraModule from "./camera"; 3 | import renderer from "./renderer"; 4 | import controlsModule from "./controls"; 5 | import scene from "./scene"; 6 | import { updateMesh } from "@/three/createMesh"; 7 | 8 | const clock = new THREE.Clock(); 9 | function animate(t) { 10 | const time = clock.getDelta(); 11 | controlsModule.controls.update(time); 12 | updateMesh(time); 13 | requestAnimationFrame(animate); 14 | // 使用渲染器渲染相机看这个场景的内容渲染出来 15 | renderer.render(scene, cameraModule.activeCamera); 16 | } 17 | 18 | export default animate; 19 | -------------------------------------------------------------------------------- /src/three/axesHelper.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | // 加入辅助轴,帮助我们查看3维坐标轴 3 | const axesHelper = new THREE.AxesHelper(5); 4 | 5 | export default axesHelper; 6 | -------------------------------------------------------------------------------- /src/three/camera.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import eventHub from "@/utils/eventHub"; 3 | // 创建透视相机 4 | const camera = new THREE.PerspectiveCamera( 5 | 75, 6 | window.innerHeight / window.innerHeight, 7 | 1, 8 | 100000 9 | ); 10 | // 设置相机位置 11 | // object3d具有position,属性是1个3维的向量 12 | camera.position.set(1000, 1000, 1000); 13 | 14 | class CameraModule { 15 | constructor() { 16 | this.activeCamera = camera; 17 | this.collection = { 18 | default: camera, 19 | }; 20 | 21 | eventHub.on("toggleCamera", (name) => { 22 | this.setActive(name); 23 | }); 24 | } 25 | add(name, camera) { 26 | this.collection[name] = camera; 27 | } 28 | setActive(name) { 29 | this.activeCamera = this.collection[name]; 30 | } 31 | } 32 | 33 | export default new CameraModule(); 34 | -------------------------------------------------------------------------------- /src/three/controls.js: -------------------------------------------------------------------------------- 1 | import { OrbitControls } from "three/examples/jsm/controls/OrbitControls"; 2 | import { FlyControls } from "three/examples/jsm/controls/FlyControls"; 3 | import { FirstPersonControls } from "three/examples/jsm/controls/FirstPersonControls"; 4 | import cameraModule from "./camera"; 5 | import renderer from "./renderer"; 6 | import eventHub from "@/utils/eventHub"; 7 | 8 | class ControlsModule { 9 | constructor() { 10 | this.setOrbitControls(); 11 | eventHub.on("toggleControls", (name) => { 12 | this[`set${name}Controls`](); 13 | }); 14 | } 15 | setOrbitControls() { 16 | // 初始化控制器 17 | this.controls = new OrbitControls( 18 | cameraModule.activeCamera, 19 | renderer.domElement 20 | ); 21 | // 设置控制器阻尼 22 | this.controls.enableDamping = true; 23 | // 设置自动旋转 24 | // controls.autoRotate = true; 25 | 26 | this.controls.maxPolarAngle = Math.PI / 2; 27 | this.controls.minPolarAngle = 0; 28 | } 29 | setFlyControls() { 30 | this.controls = new FlyControls( 31 | cameraModule.activeCamera, 32 | renderer.domElement 33 | ); 34 | this.controls.movementSpeed = 100; 35 | this.controls.rollSpeed = Math.PI / 60; 36 | } 37 | setFirstPersonControls() { 38 | this.controls = new FirstPersonControls( 39 | cameraModule.activeCamera, 40 | renderer.domElement 41 | ); 42 | this.controls.movementSpeed = 100; 43 | this.controls.rollSpeed = Math.PI / 60; 44 | } 45 | } 46 | 47 | export default new ControlsModule(); 48 | -------------------------------------------------------------------------------- /src/three/createMesh.js: -------------------------------------------------------------------------------- 1 | import { RGBELoader } from "three/examples/jsm/loaders/RGBELoader.js"; 2 | import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader"; 3 | import * as THREE from "three"; 4 | import scene from "./scene"; 5 | import gsap from "gsap"; 6 | import City from "./mesh/City"; 7 | let city; 8 | export default function createMesh() { 9 | // 创建城市 10 | city = new City(scene); 11 | } 12 | 13 | export function updateMesh(time) { 14 | city.update(time); 15 | } 16 | -------------------------------------------------------------------------------- /src/three/gui.js: -------------------------------------------------------------------------------- 1 | import * as dat from "dat.gui"; 2 | //创建gui对象 3 | const gui = new dat.GUI(); 4 | 5 | export default gui; 6 | -------------------------------------------------------------------------------- /src/three/init.js: -------------------------------------------------------------------------------- 1 | import cameraModule from "./camera"; 2 | import renderer from "./renderer"; 3 | 4 | // 更新摄像头 5 | cameraModule.activeCamera.aspect = window.innerWidth / window.innerHeight; 6 | // 更新摄像机的投影矩阵 7 | cameraModule.activeCamera.updateProjectionMatrix(); 8 | 9 | // 监听屏幕大小改变的变化,设置渲染的尺寸 10 | window.addEventListener("resize", () => { 11 | // console.log("resize"); 12 | // 更新摄像头 13 | cameraModule.activeCamera.aspect = window.innerWidth / window.innerHeight; 14 | // 更新摄像机的投影矩阵 15 | cameraModule.activeCamera.updateProjectionMatrix(); 16 | 17 | // 更新渲染器 18 | renderer.setSize(window.innerWidth, window.innerHeight); 19 | // 设置渲染器的像素比例 20 | renderer.setPixelRatio(window.devicePixelRatio); 21 | }); 22 | -------------------------------------------------------------------------------- /src/three/mesh/AlarmSprite.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import gsap from "gsap"; 3 | import camera from "../camera"; 4 | 5 | export default class AlarmSprite { 6 | constructor(type = "火警", position = { x: -1.8, z: 3 }) { 7 | const textureLoader = new THREE.TextureLoader(); 8 | const typeObj = { 9 | 火警: "./textures/tag/fire.png", 10 | 治安: "./textures/tag/jingcha.png", 11 | 电力: "./textures/tag/e.png", 12 | }; 13 | const map = textureLoader.load(typeObj[type]); 14 | this.material = new THREE.SpriteMaterial({ 15 | map: map, 16 | }); 17 | this.mesh = new THREE.Sprite(this.material); 18 | 19 | // 精灵材质 20 | // 设置位置 21 | this.mesh.position.set(position.x, 3.5, position.z); 22 | 23 | gsap.to(this.mesh.position, { 24 | y: 3.8, 25 | duration: 0.5, 26 | ease: "none", 27 | yoyo: true, 28 | repeat: -1, 29 | }); 30 | 31 | gsap.to(this.mesh.scale, { 32 | x: 1.2, 33 | y: 1.2, 34 | z: 1.2, 35 | duration: 0.5, 36 | ease: "none", 37 | yoyo: true, 38 | repeat: -1, 39 | }); 40 | 41 | this.mouse = new THREE.Vector2(); 42 | 43 | this.raycaster = new THREE.Raycaster(); 44 | 45 | // 设置1个数组,存储当前物体的点击函数 46 | this.fns = []; 47 | 48 | // 事件监听 49 | window.addEventListener("click", (event) => { 50 | // console.log(event); 51 | // 对时间对象进行加工 52 | event.mesh = this; 53 | // 将鼠标位置归一化为设备坐标。x 和 y 方向的取值范围是 (-1 to +1) 54 | this.mouse.x = (event.clientX / window.innerWidth) * 2 - 1; 55 | this.mouse.y = -((event.clientY / window.innerHeight) * 2 - 1); 56 | 57 | //通过摄像机和鼠标位置更新射线 58 | this.raycaster.setFromCamera(this.mouse, camera); 59 | 60 | //进行检测 61 | const intersects = this.raycaster.intersectObject(this.mesh); 62 | // console.log(intersects); 63 | if (intersects.length > 0) { 64 | // 真正触发精灵的点击事件 65 | this.fns.forEach((fn) => { 66 | fn.call(this, event); 67 | }); 68 | } 69 | }); 70 | } 71 | onclick(fn) { 72 | this.fns.push(fn); 73 | } 74 | clearEvents() { 75 | this.fns = []; 76 | } 77 | removeClick(fn) { 78 | this.fns.forEach((item, i) => { 79 | if (item == fn) { 80 | this.fns.splice(i, 1); 81 | } 82 | }); 83 | } 84 | remove(scene) { 85 | // 移除物体 86 | this.mesh.removeFromParent(); 87 | // 移除材质 88 | this.material.dispose(); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/three/mesh/City.js: -------------------------------------------------------------------------------- 1 | import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader"; 2 | import * as THREE from "three"; 3 | import gsap from "gsap"; 4 | import { DRACOLoader } from "three/examples/jsm/loaders/DRACOLoader"; 5 | import eventHub from "@/utils/eventHub"; 6 | import cameraModule from "../camera"; 7 | 8 | export default class City { 9 | constructor(scene) { 10 | // 载入模型 11 | this.scene = scene; 12 | this.loader = new GLTFLoader(); 13 | const dracoLoader = new DRACOLoader(); 14 | dracoLoader.setDecoderPath("./draco/"); 15 | this.loader.setDRACOLoader(dracoLoader); 16 | this.loader.load("./model/city4.glb", (gltf) => { 17 | console.log(gltf); 18 | scene.add(gltf.scene); 19 | 20 | // 场景子元素遍历 21 | this.gltf = gltf; 22 | gltf.scene.traverse((child) => { 23 | if (child.name === "热气球") { 24 | // console.log(child); 25 | this.mixer = new THREE.AnimationMixer(child); 26 | this.clip = gltf.animations[1]; 27 | this.action = this.mixer.clipAction(this.clip); 28 | this.action.play(); 29 | } 30 | 31 | if (child.name === "汽车园区轨迹") { 32 | // console.log(child); 33 | const line = child; 34 | line.visible = false; 35 | // 根据点创建曲线 36 | const points = []; 37 | for ( 38 | let i = line.geometry.attributes.position.count - 1; 39 | i >= 0; 40 | i-- 41 | ) { 42 | points.push( 43 | new THREE.Vector3( 44 | line.geometry.attributes.position.getX(i), 45 | line.geometry.attributes.position.getY(i), 46 | line.geometry.attributes.position.getZ(i) 47 | ) 48 | ); 49 | } 50 | 51 | this.curve = new THREE.CatmullRomCurve3(points); 52 | this.curveProgress = 0; 53 | this.carAnimation(); 54 | } 55 | 56 | if (child.name === "redcar") { 57 | console.log(child); 58 | this.redcar = child; 59 | } 60 | }); 61 | 62 | gltf.cameras.forEach((camera) => { 63 | // scene.add(camera); 64 | cameraModule.add(camera.name, camera); 65 | }); 66 | }); 67 | 68 | eventHub.on("actionClick", (i) => { 69 | console.log(i); 70 | this.action.reset(); 71 | this.clip = this.gltf.animations[i]; 72 | this.action = this.mixer.clipAction(this.clip); 73 | this.action.play(); 74 | }); 75 | 76 | // 如何切换控制器聚焦位置和拉近视角 77 | // eventHub.on('focusDance', () => { 78 | // this.womenPosition = this.women.position.clone() 79 | 80 | // gsap.to(ControlsModule.controls.target, { 81 | // x: this.womenPosition.x, 82 | // y: this.womenPosition.y, 83 | // z: this.womenPosition.z, 84 | // duration: 1, 85 | // onComplete: () => { 86 | // gsap.to(cameraModule.activeCamera.position, { 87 | // x: this.womenPosition.x + 3, 88 | // y: this.womenPosition.y + 2, 89 | // z: this.womenPosition.z + 1, 90 | // duration: 2, 91 | // }) 92 | // } 93 | // }) 94 | // }) 95 | } 96 | 97 | update(time) { 98 | if (this.mixer) { 99 | this.mixer.update(time); 100 | } 101 | } 102 | 103 | carAnimation() { 104 | gsap.to(this, { 105 | curveProgress: 0.999, 106 | duration: 10, 107 | repeat: -1, 108 | onUpdate: () => { 109 | const point = this.curve.getPoint(this.curveProgress); 110 | this.redcar.position.set(point.x, point.y, point.z); 111 | 112 | // 调整小汽车的方向,始终沿着曲线的切线方向 113 | if (this.curveProgress + 0.001 < 1) { 114 | const point = this.curve.getPoint(this.curveProgress + 0.001); 115 | this.redcar.lookAt(point); 116 | } 117 | }, 118 | }); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /src/three/mesh/FlyLine.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import gsap from "gsap"; 3 | 4 | export default class FlyLine { 5 | constructor(lineArray, imgUrl, lineWidth = 0.2) { 6 | // 创建纹理加载器 7 | const textureLoader = new THREE.TextureLoader(); 8 | this.texture = textureLoader.load(imgUrl); 9 | // 调整纹理为单面的宽度 10 | this.texture.repeat = new THREE.Vector2(1, 2); 11 | 12 | // console.log(texture); 13 | 14 | this.texture.wrapS = THREE.RepeatWrapping; 15 | // 设置纹理为镜像重复 16 | // texture.wrapT = THREE.RepeatWrapping; 17 | this.texture.wrapT = THREE.MirroredRepeatWrapping; 18 | 19 | // 创建管道几何体 20 | // 1-创建曲线几何体 21 | this.lineCurve = new THREE.CatmullRomCurve3(lineArray); 22 | 23 | // 2-根据曲线获取曲线上的点 24 | // const linePoints = lineCurve.getPoints(100); 25 | 26 | // 3-根据点生成几何体 27 | this.geometry = new THREE.TubeBufferGeometry( 28 | this.lineCurve, 29 | 100, 30 | lineWidth, 31 | 2, 32 | false 33 | ); 34 | 35 | // 飞线材质设置 36 | this.material = new THREE.MeshBasicMaterial({ 37 | // color: 0xfff000, 38 | map: this.texture, 39 | transparent: true, 40 | side: THREE.DoubleSide, 41 | depthWrite: false, 42 | blending: THREE.AdditiveBlending, 43 | }); 44 | 45 | this.mesh = new THREE.Mesh(this.geometry, this.material); 46 | 47 | gsap.to(this.texture.offset, { 48 | x: -1, 49 | duration: 1, 50 | repeat: -1, 51 | ease: "none", 52 | }); 53 | } 54 | 55 | remove(scene) { 56 | // 移除物体 57 | this.mesh.removeFromParent(); 58 | // 移除材质 59 | this.material.dispose(); 60 | // 移除几何体 61 | this.geometry.dispose(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/three/mesh/FlyLineShader.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import gsap from "gsap"; 3 | import vertex from "@/shader/flyLine/vertex.glsl"; 4 | import fragment from "@/shader/flyLine/fragment.glsl"; 5 | 6 | export default class FlyLineShader { 7 | constructor(lineArray, color = 0x00ff00, lineWidth = 0.2) { 8 | // 曲线获取点 9 | this.lineCurve = new THREE.CatmullRomCurve3(lineArray); 10 | const points = this.lineCurve.getPoints(1000); 11 | // console.log(points); 12 | this.geometry = new THREE.BufferGeometry().setFromPoints(points); 13 | const aSizeArr = new Float32Array(points.length); 14 | for (let i = 0; i < aSizeArr.length; i++) { 15 | aSizeArr[i] = i; 16 | } 17 | // 设置每个点初始化的大小 18 | this.geometry.setAttribute("aSize", new THREE.BufferAttribute(aSizeArr, 1)); 19 | // 设置着色器材质 20 | this.material = new THREE.ShaderMaterial({ 21 | uniforms: { 22 | uTime: { 23 | value: 0, 24 | }, 25 | uLength: { 26 | value: points.length, 27 | }, 28 | uColor: { 29 | value: new THREE.Color(color), 30 | }, 31 | }, 32 | vertexShader: vertex, 33 | fragmentShader: fragment, 34 | transparent: true, 35 | side: THREE.DoubleSide, 36 | depthWrite: false, 37 | blending: THREE.AdditiveBlending, 38 | }); 39 | // 创建由点构成的线 40 | this.mesh = new THREE.Points(this.geometry, this.material); 41 | 42 | // 设置动画 43 | gsap.to(this.material.uniforms.uTime, { 44 | value: 1000, 45 | duration: 1, 46 | repeat: -1, 47 | ease: "none", 48 | }); 49 | } 50 | remove(scene) { 51 | // 移除物体 52 | this.mesh.removeFromParent(); 53 | // 移除材质 54 | this.material.dispose(); 55 | // 移除几何体 56 | this.geometry.dispose(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/three/mesh/LightRadar.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import gsap from "gsap"; 3 | import vertex from "@/shader/lightRadar/vertex.glsl"; 4 | import fragment from "@/shader/lightRadar/fragment.glsl"; 5 | 6 | export default class LightRadar { 7 | constructor(radius = 2, position = { x: 8, z: 8 }, color = "#ffff00") { 8 | this.geometry = new THREE.PlaneBufferGeometry(1, 1); 9 | this.material = new THREE.ShaderMaterial({ 10 | uniforms: { 11 | uColor: { value: new THREE.Color(color) }, 12 | uTime: { 13 | value: 0, 14 | }, 15 | }, 16 | vertexShader: vertex, 17 | fragmentShader: fragment, 18 | transparent: true, 19 | side: THREE.DoubleSide, 20 | }); 21 | 22 | this.mesh = new THREE.Mesh(this.geometry, this.material); 23 | 24 | this.mesh.position.set(position.x, 1, position.z); 25 | this.mesh.rotation.x = -Math.PI / 2; 26 | this.mesh.scale.set(radius, radius); 27 | 28 | // gsap.to(this.material.uniforms.uTime, { 29 | // value: -1, 30 | // duration: 1, 31 | // ease: "none", 32 | // repeat: -1, 33 | // }); 34 | 35 | gsap.to(this.mesh.rotation, { 36 | z: -Math.PI * 2, 37 | ease: "none", 38 | repeat: -1, 39 | duration: 1, 40 | }); 41 | } 42 | 43 | remove(scene) { 44 | // 移除物体 45 | this.mesh.removeFromParent(); 46 | // 移除材质 47 | this.material.dispose(); 48 | // 移除几何体 49 | this.geometry.dispose(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/three/mesh/LightWall.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import gsap from "gsap"; 3 | import vertex from "@/shader/lightWall/vertex.glsl"; 4 | import fragment from "@/shader/lightWall/fragment.glsl"; 5 | 6 | export default class LightWall { 7 | constructor( 8 | radius = 5, 9 | length = 2, 10 | position = { x: 0, z: 0 }, 11 | color = 0x00ff00 12 | ) { 13 | this.geometry = new THREE.CylinderBufferGeometry( 14 | radius, 15 | radius, 16 | 2, 17 | 32, 18 | 1, 19 | true 20 | ); 21 | this.material = new THREE.ShaderMaterial({ 22 | vertexShader: vertex, 23 | fragmentShader: fragment, 24 | transparent: true, 25 | side: THREE.DoubleSide, 26 | }); 27 | 28 | this.mesh = new THREE.Mesh(this.geometry, this.material); 29 | 30 | this.mesh.position.set(position.x, 1, position.z); 31 | // 必须先调用计算函数 32 | this.mesh.geometry.computeBoundingBox(); 33 | 34 | // 从上到下的高度获取 35 | let { min, max } = this.mesh.geometry.boundingBox; 36 | 37 | let uHeight = max.y - min.y; 38 | this.material.uniforms.uHeight = { 39 | value: uHeight, 40 | }; 41 | 42 | this.material.uniforms.uColor = { 43 | value: new THREE.Color(color), 44 | }; 45 | 46 | this.material.uniforms.uTime = { 47 | value: 0, 48 | }; 49 | 50 | gsap.to(this.mesh.scale, { 51 | x: length, 52 | z: length, 53 | duration: 1, 54 | ease: "none", 55 | repeat: -1, 56 | yoyo: true, 57 | }); 58 | } 59 | 60 | remove(scene) { 61 | // 移除物体 62 | this.mesh.removeFromParent(); 63 | // 移除材质 64 | this.material.dispose(); 65 | // 移除几何体 66 | this.geometry.dispose(); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/three/mesh/MeshEdges.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | 3 | export default class MeshEdges { 4 | constructor(geometry) { 5 | this.geometry = new THREE.EdgesGeometry(geometry); 6 | this.material = new THREE.LineBasicMaterial({ 7 | color: 0xffffff, 8 | }); 9 | this.mesh = new THREE.LineSegments(this.geometry, this.material); 10 | } 11 | remove(scene) { 12 | // 移除物体 13 | this.mesh.removeFromParent(); 14 | // 移除材质 15 | this.material.dispose(); 16 | // 移除几何体 17 | this.geometry.dispose(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/three/modify/modifyCityMaterial.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import gsap from "gsap"; 3 | import vertex from "@/shader/gradColor/vertex.glsl"; 4 | import fragment from "@/shader/gradColor/fragment.glsl"; 5 | 6 | export default function modifyCityMaterial(mesh) { 7 | mesh.material.onBeforeCompile = (shader) => { 8 | shader.fragmentShader = shader.fragmentShader.replace( 9 | "#include ", 10 | ` 11 | #include 12 | // #end# 13 | ` 14 | ); 15 | 16 | addGradColor(shader, mesh); 17 | // addSpread(shader); 18 | addLightLine(shader); 19 | addToTopLine(shader); 20 | }; 21 | } 22 | 23 | export function addGradColor(shader, mesh) { 24 | // console.log(mesh); 25 | // 传递unfiorm变量 26 | mesh.geometry.computeBoundingBox(); 27 | let { min, max } = mesh.geometry.boundingBox; 28 | console.log(min, max); 29 | let uHeight = max.y - min.y; 30 | // console.log(shader.vertexShader); 31 | // console.log(shader.fragmentShader); 32 | // shader.fragmentShader = fragment; 33 | // shader.vertexShader = vertex; 34 | shader.uniforms.uTopColor = { 35 | value: new THREE.Color("#ffeeff"), 36 | }; 37 | shader.uniforms.uHeight = { 38 | value: uHeight, 39 | }; 40 | shader.vertexShader = shader.vertexShader.replace( 41 | "#include ", 42 | `#include 43 | 44 | varying vec3 vPosition;` 45 | ); 46 | 47 | shader.vertexShader = shader.vertexShader.replace( 48 | "#include ", 49 | ` 50 | #include 51 | vPosition = position; 52 | ` 53 | ); 54 | 55 | shader.fragmentShader = shader.fragmentShader.replace( 56 | "#include ", 57 | ` 58 | #include 59 | 60 | uniform vec3 uTopColor; 61 | uniform float uHeight; 62 | varying vec3 vPosition; 63 | ` 64 | ); 65 | 66 | shader.fragmentShader = shader.fragmentShader.replace( 67 | "// #end#", 68 | ` 69 | // 目标的基础原色 70 | vec3 distColor = outgoingLight; 71 | // uTopColor渐变的色 72 | // 混合百分 73 | float indexMix = (vPosition.y+uHeight/2.0)/uHeight; 74 | // 混合颜色 75 | distColor = mix(distColor,uTopColor,indexMix); 76 | gl_FragColor = vec4(distColor,1); 77 | // #end# 78 | ` 79 | ); 80 | } 81 | 82 | export function addSpread(shader, center = new THREE.Vector2(200, 300)) { 83 | shader.uniforms.uSpreadCenter = { 84 | value: center, 85 | }; 86 | shader.uniforms.uSpreadWidth = { 87 | value: 200, 88 | }; 89 | shader.uniforms.uSpreadTime = { 90 | value: 0, 91 | }; 92 | // 将uniform添加至片元着色器 93 | shader.fragmentShader = shader.fragmentShader.replace( 94 | "#include ", 95 | ` 96 | #include 97 | uniform vec2 uSpreadCenter; 98 | uniform float uSpreadWidth; 99 | uniform float uSpreadTime; 100 | ` 101 | ); 102 | shader.fragmentShader = shader.fragmentShader.replace( 103 | "// #end#", 104 | ` 105 | float spreadRadius = distance(vPosition.xz,uSpreadCenter); 106 | 107 | float spreadIndex = -((spreadRadius-uSpreadTime)*(spreadRadius-uSpreadTime))+uSpreadWidth; 108 | 109 | if(spreadIndex>0.0){ 110 | gl_FragColor = mix(gl_FragColor,vec4(1,1,1,1),spreadIndex/uSpreadWidth); 111 | } 112 | 113 | // #end# 114 | ` 115 | ); 116 | 117 | gsap.to(shader.uniforms.uSpreadTime, { 118 | value: 2000, 119 | duration: 3, 120 | ease: "none", 121 | repeat: -1, 122 | }); 123 | } 124 | 125 | export function addLightLine(shader) { 126 | shader.uniforms.uLightLineWidth = { 127 | value: 200, 128 | }; 129 | shader.uniforms.uLightLineTime = { 130 | value: -2000, 131 | }; 132 | // 将uniform添加至片元着色器 133 | shader.fragmentShader = shader.fragmentShader.replace( 134 | "#include ", 135 | ` 136 | #include 137 | uniform float uLightLineWidth; 138 | uniform float uLightLineTime; 139 | ` 140 | ); 141 | shader.fragmentShader = shader.fragmentShader.replace( 142 | "// #end#", 143 | ` 144 | 145 | 146 | float LightLineIndex = -((vPosition.x+3.0*vPosition.z-uLightLineTime)*(vPosition.x+3.0*vPosition.z-uLightLineTime))+uLightLineWidth; 147 | 148 | if(LightLineIndex>0.0){ 149 | gl_FragColor = mix(gl_FragColor,vec4(1,1,1,1),LightLineIndex/uLightLineWidth); 150 | } 151 | 152 | // #end# 153 | ` 154 | ); 155 | 156 | gsap.to(shader.uniforms.uLightLineTime, { 157 | value: 2000, 158 | duration: 3, 159 | ease: "none", 160 | repeat: -1, 161 | }); 162 | } 163 | 164 | export function addToTopLine(shader) { 165 | shader.uniforms.uToTopLineWidth = { 166 | value: 40, 167 | }; 168 | shader.uniforms.uToTopLineTime = { 169 | value: -100, 170 | }; 171 | // 将uniform添加至片元着色器 172 | shader.fragmentShader = shader.fragmentShader.replace( 173 | "#include ", 174 | ` 175 | #include 176 | uniform float uToTopLineWidth; 177 | uniform float uToTopLineTime; 178 | ` 179 | ); 180 | shader.fragmentShader = shader.fragmentShader.replace( 181 | "// #end#", 182 | ` 183 | 184 | 185 | float ToTopLineIndex = -((vPosition.y-uToTopLineTime)*(vPosition.y-uToTopLineTime))+uToTopLineWidth; 186 | 187 | if(ToTopLineIndex>0.0){ 188 | gl_FragColor = mix(gl_FragColor,vec4(1,1,1,1),ToTopLineIndex/uToTopLineWidth); 189 | } 190 | 191 | // #end# 192 | ` 193 | ); 194 | 195 | gsap.to(shader.uniforms.uToTopLineTime, { 196 | value: 200, 197 | duration: 3, 198 | ease: "none", 199 | repeat: -1, 200 | }); 201 | } 202 | -------------------------------------------------------------------------------- /src/three/modify/modifyMaterial.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import vertex from "@/shader/gradColor/vertex.glsl"; 3 | import fragment from "@/shader/gradColor/fragment.glsl"; 4 | 5 | export function gradColor(mesh) { 6 | // console.log(mesh); 7 | // 传递unfiorm变量 8 | 9 | mesh.material.onBeforeCompile = (shader) => { 10 | // console.log(shader.vertexShader); 11 | // console.log(shader.fragmentShader); 12 | shader.fragmentShader = fragment; 13 | shader.vertexShader = vertex; 14 | shader.uniforms.uTopColor = { 15 | value: new THREE.Color("#ffeeff"), 16 | }; 17 | shader.uniforms.uHeight = { 18 | value: 2, 19 | }; 20 | }; 21 | } 22 | 23 | export function addGradColor(mesh) { 24 | // console.log(mesh); 25 | // 传递unfiorm变量 26 | 27 | mesh.material.onBeforeCompile = (shader) => { 28 | console.log(shader.vertexShader); 29 | console.log(shader.fragmentShader); 30 | // shader.fragmentShader = fragment; 31 | // shader.vertexShader = vertex; 32 | shader.uniforms.uTopColor = { 33 | value: new THREE.Color("#ffeeff"), 34 | }; 35 | shader.uniforms.uHeight = { 36 | value: 2, 37 | }; 38 | shader.vertexShader = shader.vertexShader.replace( 39 | "#include ", 40 | `#include 41 | 42 | varying vec3 vPosition;` 43 | ); 44 | 45 | shader.vertexShader = shader.vertexShader.replace( 46 | "#include ", 47 | ` 48 | #include 49 | vPosition = position; 50 | ` 51 | ); 52 | 53 | shader.fragmentShader = shader.fragmentShader.replace( 54 | "#include ", 55 | ` 56 | #include 57 | 58 | uniform vec3 uTopColor; 59 | uniform float uHeight; 60 | varying vec3 vPosition; 61 | ` 62 | ); 63 | 64 | shader.fragmentShader = shader.fragmentShader.replace( 65 | "#include ", 66 | ` 67 | #include 68 | // 目标的基础原色 69 | vec3 distColor = outgoingLight; 70 | // uTopColor渐变的色 71 | // 混合百分 72 | float indexMix = (vPosition.y+uHeight/2.0)/uHeight; 73 | // 混合颜色 74 | distColor = mix(distColor,uTopColor,indexMix); 75 | gl_FragColor = vec4(distColor,1); 76 | ` 77 | ); 78 | }; 79 | } 80 | -------------------------------------------------------------------------------- /src/three/renderer.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | // 初始化渲染器 3 | const renderer = new THREE.WebGLRenderer({ 4 | // 设置抗锯齿 5 | antialias: true, 6 | // depthbuffer 7 | logarithmicDepthBuffer: true, 8 | physicallyCorrectLights: true, 9 | }); 10 | // 设置渲染尺寸大小 11 | renderer.setSize(window.innerWidth, window.innerHeight); 12 | renderer.shadowMap.enabled = true; 13 | renderer.toneMapping = THREE.ACESFilmicToneMapping; 14 | renderer.toneMappingExposure = 1.5; 15 | 16 | export default renderer; 17 | -------------------------------------------------------------------------------- /src/three/scene.js: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import { RGBELoader } from "three/examples/jsm/loaders/RGBELoader.js"; 3 | // 初始化场景 4 | const scene = new THREE.Scene(); 5 | 6 | // 添加雾霾 7 | // const fog = new THREE.Fog(0x000000, 0, 1000); 8 | // scene.fog = fog; 9 | 10 | // const cubeTextureLoader = new THREE.CubeTextureLoader().setPath("./textures/"); 11 | // const texture = cubeTextureLoader.load([ 12 | // "1.jpg", 13 | // "2.jpg", 14 | // "3.jpg", 15 | // "4.jpg", 16 | // "5.jpg", 17 | // "6.jpg", 18 | // ]); 19 | 20 | // 导入hdr纹理 21 | const hdrLoader = new RGBELoader(); 22 | hdrLoader.loadAsync("./textures/023.hdr").then((texture) => { 23 | scene.background = texture; 24 | scene.environment = texture; 25 | scene.environment.mapping = THREE.EquirectangularReflectionMapping; 26 | }); 27 | 28 | // 添加平行光 29 | const light = new THREE.DirectionalLight(0xffffff, 1); 30 | light.position.set(10, 100, 10); 31 | scene.add(light); 32 | 33 | export default scene; 34 | -------------------------------------------------------------------------------- /src/utils/eventHub.js: -------------------------------------------------------------------------------- 1 | import Mitt from "mitt"; 2 | 3 | const eventHub = new Mitt(); 4 | 5 | export default eventHub; 6 | -------------------------------------------------------------------------------- /src/views/AboutView.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 83 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require("@vue/cli-service"); 2 | module.exports = defineConfig({ 3 | transpileDependencies: true, 4 | configureWebpack: (config) => { 5 | config.module.rules.push({ 6 | test: /\.glsl$/, 7 | use: [ 8 | { 9 | loader: "webpack-glsl-loader", 10 | }, 11 | ], 12 | }); 13 | }, 14 | }); 15 | --------------------------------------------------------------------------------