·
5
.env.development
Normal file
@ -0,0 +1,5 @@
|
||||
# .env.development
|
||||
VITE_ENV = 'development'
|
||||
VITE_API_URL = 'http://127.0.0.1:5020'
|
||||
VITE_OSS_URL = 'https://xy88.fun'
|
||||
# VITE_API_URL = 'https://tankapi.xy88.fun:8179'
|
||||
4
.env.production
Normal file
@ -0,0 +1,4 @@
|
||||
# .env.production
|
||||
VITE_ENV = 'production'
|
||||
VITE_API_URL = 'https://tankapi.xy88.fun:8179'
|
||||
VITE_OSS_URL = 'https://xy88.fun'
|
||||
24
.gitignore
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
9
.postcssrc.cjs
Normal file
@ -0,0 +1,9 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
'postcss-pxtorem': {
|
||||
rootValue: 16, // 表示根元素字体大小或根据input参数返回根元素字体大小
|
||||
propList: ['*'], // 可以从px更改为rem的属性, 通配符*表示启用所有属性
|
||||
selectorBlackList: ['.norem'] // 过滤掉.norem开头的class,不进行rem转换
|
||||
}
|
||||
}
|
||||
}
|
||||
3
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["Vue.volar"]
|
||||
}
|
||||
5
README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Vue 3 + TypeScript + Vite
|
||||
|
||||
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
||||
|
||||
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
|
||||
14
babel.config.js
Normal file
@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
presets: ["@vue/app"],
|
||||
plugins: [
|
||||
[
|
||||
"import",
|
||||
{
|
||||
libraryName: "vant",
|
||||
libraryDirectory: "es",
|
||||
style: true,
|
||||
},
|
||||
"vant",
|
||||
],
|
||||
],
|
||||
};
|
||||
16
index.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0,maximum-scale=1.0,user-scalable=no"
|
||||
/>
|
||||
<title>XPrint</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
7008
package-lock.json
generated
Normal file
60
package.json
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"name": "xprint",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc && vite build",
|
||||
"preview": "vite preview",
|
||||
"build-lib": "vue-tsc && vite build --mode lib",
|
||||
"compress-lib": "node uglify.config.js --ecma=8 --comments=false",
|
||||
"build-compress-lib": "vue-tsc && vite build --mode lib && node uglify.config.js --ecma=8 --comments=false"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babylonjs/core": "^8.28.1",
|
||||
"@babylonjs/inspector": "^8.28.1",
|
||||
"@babylonjs/loaders": "^8.28.1",
|
||||
"@microsoft/signalr": "^9.0.6",
|
||||
"@microsoft/signalr-protocol-msgpack": "^9.0.6",
|
||||
"@msgpack/msgpack": "^3.1.2",
|
||||
"@vant/touch-emulator": "^1.4.0",
|
||||
"ali-oss": "^6.23.0",
|
||||
"amfe-flexible": "^2.2.1",
|
||||
"axios": "^1.10.0",
|
||||
"changedpi": "^1.0.4",
|
||||
"fabric": "^6.7.1",
|
||||
"fflate": "^0.8.2",
|
||||
"file-saver": "^2.0.5",
|
||||
"imagetracerjs": "^1.2.6",
|
||||
"lodash": "^4.17.21",
|
||||
"nanoid": "^5.1.5",
|
||||
"vant": "^4.9.20",
|
||||
"vconsole": "^3.15.1",
|
||||
"vue": "^3.5.13",
|
||||
"vue-draggable-next": "^2.3.0",
|
||||
"vue-loading-overlay": "^6.0.6",
|
||||
"vue-router": "^4.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/audioworklet": "^0.0.77",
|
||||
"@types/fabric": "^5.3.10",
|
||||
"@types/file-saver": "^2.0.7",
|
||||
"@types/node": "^24.0.7",
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"@vue/compiler-sfc": "^3.5.17",
|
||||
"@vue/tsconfig": "^0.7.0",
|
||||
"babel-plugin-import": "^1.13.8",
|
||||
"less": "^4.3.0",
|
||||
"postcss": "^8.5.6",
|
||||
"postcss-loader": "^8.1.1",
|
||||
"postcss-pxtorem": "^6.1.0",
|
||||
"typescript": "~5.8.3",
|
||||
"uglify-js": "^3.19.3",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-dts": "^4.5.4",
|
||||
"vite-plugin-node-polyfills": "^0.23.0",
|
||||
"vue-tsc": "^2.2.8"
|
||||
}
|
||||
}
|
||||
35
public/assets/draco/draco_decoder_gltf.js
Normal file
BIN
public/assets/draco/draco_decoder_gltf.wasm
Normal file
116
public/assets/draco/draco_wasm_wrapper_gltf.js
Normal file
@ -0,0 +1,116 @@
|
||||
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(h){var n=0;return function(){return n<h.length?{done:!1,value:h[n++]}:{done:!0}}};$jscomp.arrayIterator=function(h){return{next:$jscomp.arrayIteratorImpl(h)}};$jscomp.makeIterator=function(h){var n="undefined"!=typeof Symbol&&Symbol.iterator&&h[Symbol.iterator];return n?n.call(h):$jscomp.arrayIterator(h)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
|
||||
$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.getGlobal=function(h){h=["object"==typeof globalThis&&globalThis,h,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var n=0;n<h.length;++n){var k=h[n];if(k&&k.Math==Math)return k}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
||||
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(h,n,k){if(h==Array.prototype||h==Object.prototype)return h;h[n]=k.value;return h};$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";
|
||||
var $jscomp$lookupPolyfilledValue=function(h,n){var k=$jscomp.propertyToPolyfillSymbol[n];if(null==k)return h[n];k=h[k];return void 0!==k?k:h[n]};$jscomp.polyfill=function(h,n,k,p){n&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(h,n,k,p):$jscomp.polyfillUnisolated(h,n,k,p))};
|
||||
$jscomp.polyfillUnisolated=function(h,n,k,p){k=$jscomp.global;h=h.split(".");for(p=0;p<h.length-1;p++){var l=h[p];if(!(l in k))return;k=k[l]}h=h[h.length-1];p=k[h];n=n(p);n!=p&&null!=n&&$jscomp.defineProperty(k,h,{configurable:!0,writable:!0,value:n})};
|
||||
$jscomp.polyfillIsolated=function(h,n,k,p){var l=h.split(".");h=1===l.length;p=l[0];p=!h&&p in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<l.length-1;y++){var f=l[y];if(!(f in p))return;p=p[f]}l=l[l.length-1];k=$jscomp.IS_SYMBOL_NATIVE&&"es6"===k?p[l]:null;n=n(k);null!=n&&(h?$jscomp.defineProperty($jscomp.polyfills,l,{configurable:!0,writable:!0,value:n}):n!==k&&(void 0===$jscomp.propertyToPolyfillSymbol[l]&&(k=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[l]=$jscomp.IS_SYMBOL_NATIVE?
|
||||
$jscomp.global.Symbol(l):$jscomp.POLYFILL_PREFIX+k+"$"+l),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[l],{configurable:!0,writable:!0,value:n})))};
|
||||
$jscomp.polyfill("Promise",function(h){function n(){this.batch_=null}function k(f){return f instanceof l?f:new l(function(q,u){q(f)})}if(h&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return h;n.prototype.asyncExecute=function(f){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(f)};
|
||||
var p=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(f){p(f,0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var f=this.batch_;this.batch_=[];for(var q=0;q<f.length;++q){var u=f[q];f[q]=null;try{u()}catch(A){this.asyncThrow_(A)}}}this.batch_=null};n.prototype.asyncThrow_=function(f){this.asyncExecuteFunction(function(){throw f;})};var l=function(f){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var q=this.createResolveAndReject_();
|
||||
try{f(q.resolve,q.reject)}catch(u){q.reject(u)}};l.prototype.createResolveAndReject_=function(){function f(A){return function(F){u||(u=!0,A.call(q,F))}}var q=this,u=!1;return{resolve:f(this.resolveTo_),reject:f(this.reject_)}};l.prototype.resolveTo_=function(f){if(f===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(f instanceof l)this.settleSameAsPromise_(f);else{a:switch(typeof f){case "object":var q=null!=f;break a;case "function":q=!0;break a;default:q=!1}q?this.resolveToNonPromiseObj_(f):
|
||||
this.fulfill_(f)}};l.prototype.resolveToNonPromiseObj_=function(f){var q=void 0;try{q=f.then}catch(u){this.reject_(u);return}"function"==typeof q?this.settleSameAsThenable_(q,f):this.fulfill_(f)};l.prototype.reject_=function(f){this.settle_(2,f)};l.prototype.fulfill_=function(f){this.settle_(1,f)};l.prototype.settle_=function(f,q){if(0!=this.state_)throw Error("Cannot settle("+f+", "+q+"): Promise already settled in state"+this.state_);this.state_=f;this.result_=q;2===this.state_&&this.scheduleUnhandledRejectionCheck_();
|
||||
this.executeOnSettledCallbacks_()};l.prototype.scheduleUnhandledRejectionCheck_=function(){var f=this;p(function(){if(f.notifyUnhandledRejection_()){var q=$jscomp.global.console;"undefined"!==typeof q&&q.error(f.result_)}},1)};l.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var f=$jscomp.global.CustomEvent,q=$jscomp.global.Event,u=$jscomp.global.dispatchEvent;if("undefined"===typeof u)return!0;"function"===typeof f?f=new f("unhandledrejection",{cancelable:!0}):
|
||||
"function"===typeof q?f=new q("unhandledrejection",{cancelable:!0}):(f=$jscomp.global.document.createEvent("CustomEvent"),f.initCustomEvent("unhandledrejection",!1,!0,f));f.promise=this;f.reason=this.result_;return u(f)};l.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var f=0;f<this.onSettledCallbacks_.length;++f)y.asyncExecute(this.onSettledCallbacks_[f]);this.onSettledCallbacks_=null}};var y=new n;l.prototype.settleSameAsPromise_=function(f){var q=this.createResolveAndReject_();
|
||||
f.callWhenSettled_(q.resolve,q.reject)};l.prototype.settleSameAsThenable_=function(f,q){var u=this.createResolveAndReject_();try{f.call(q,u.resolve,u.reject)}catch(A){u.reject(A)}};l.prototype.then=function(f,q){function u(w,B){return"function"==typeof w?function(R){try{A(w(R))}catch(Z){F(Z)}}:B}var A,F,v=new l(function(w,B){A=w;F=B});this.callWhenSettled_(u(f,A),u(q,F));return v};l.prototype.catch=function(f){return this.then(void 0,f)};l.prototype.callWhenSettled_=function(f,q){function u(){switch(A.state_){case 1:f(A.result_);
|
||||
break;case 2:q(A.result_);break;default:throw Error("Unexpected state: "+A.state_);}}var A=this;null==this.onSettledCallbacks_?y.asyncExecute(u):this.onSettledCallbacks_.push(u);this.isRejectionHandled_=!0};l.resolve=k;l.reject=function(f){return new l(function(q,u){u(f)})};l.race=function(f){return new l(function(q,u){for(var A=$jscomp.makeIterator(f),F=A.next();!F.done;F=A.next())k(F.value).callWhenSettled_(q,u)})};l.all=function(f){var q=$jscomp.makeIterator(f),u=q.next();return u.done?k([]):new l(function(A,
|
||||
F){function v(R){return function(Z){w[R]=Z;B--;0==B&&A(w)}}var w=[],B=0;do w.push(void 0),B++,k(u.value).callWhenSettled_(v(w.length-1),F),u=q.next();while(!u.done)})};return l},"es6","es3");$jscomp.owns=function(h,n){return Object.prototype.hasOwnProperty.call(h,n)};$jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(h,n){for(var k=1;k<arguments.length;k++){var p=arguments[k];if(p)for(var l in p)$jscomp.owns(p,l)&&(h[l]=p[l])}return h};
|
||||
$jscomp.polyfill("Object.assign",function(h){return h||$jscomp.assign},"es6","es3");$jscomp.checkStringArgs=function(h,n,k){if(null==h)throw new TypeError("The 'this' value for String.prototype."+k+" must not be null or undefined");if(n instanceof RegExp)throw new TypeError("First argument to String.prototype."+k+" must not be a regular expression");return h+""};
|
||||
$jscomp.polyfill("String.prototype.startsWith",function(h){return h?h:function(n,k){var p=$jscomp.checkStringArgs(this,n,"startsWith");n+="";var l=p.length,y=n.length;k=Math.max(0,Math.min(k|0,p.length));for(var f=0;f<y&&k<l;)if(p[k++]!=n[f++])return!1;return f>=y}},"es6","es3");
|
||||
$jscomp.polyfill("Array.prototype.copyWithin",function(h){function n(k){k=Number(k);return Infinity===k||-Infinity===k?k:k|0}return h?h:function(k,p,l){var y=this.length;k=n(k);p=n(p);l=void 0===l?y:n(l);k=0>k?Math.max(y+k,0):Math.min(k,y);p=0>p?Math.max(y+p,0):Math.min(p,y);l=0>l?Math.max(y+l,0):Math.min(l,y);if(k<p)for(;p<l;)p in this?this[k++]=this[p++]:(delete this[k++],p++);else for(l=Math.min(l,y+p-k),k+=l-p;l>p;)--l in this?this[--k]=this[l]:delete this[--k];return this}},"es6","es3");
|
||||
$jscomp.typedArrayCopyWithin=function(h){return h?h:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
|
||||
$jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
|
||||
var DracoDecoderModule=function(){var h="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(h=h||__filename);return function(n){function k(e){return a.locateFile?a.locateFile(e,U):U+e}function p(e,b){if(e){var c=ia;var d=e+b;for(b=e;c[b]&&!(b>=d);)++b;if(16<b-e&&c.buffer&&ra)c=ra.decode(c.subarray(e,b));else{for(d="";e<b;){var g=c[e++];if(g&128){var t=c[e++]&63;if(192==(g&224))d+=String.fromCharCode((g&31)<<6|t);else{var aa=c[e++]&
|
||||
63;g=224==(g&240)?(g&15)<<12|t<<6|aa:(g&7)<<18|t<<12|aa<<6|c[e++]&63;65536>g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}c=d}}else c="";return c}function l(){var e=ja.buffer;a.HEAP8=W=new Int8Array(e);a.HEAP16=new Int16Array(e);a.HEAP32=ca=new Int32Array(e);a.HEAPU8=ia=new Uint8Array(e);a.HEAPU16=new Uint16Array(e);a.HEAPU32=Y=new Uint32Array(e);a.HEAPF32=new Float32Array(e);a.HEAPF64=new Float64Array(e)}function y(e){if(a.onAbort)a.onAbort(e);
|
||||
e="Aborted("+e+")";da(e);sa=!0;e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info.");ka(e);throw e;}function f(e){try{if(e==P&&ea)return new Uint8Array(ea);if(ma)return ma(e);throw"both async and sync fetching of the wasm failed";}catch(b){y(b)}}function q(){if(!ea&&(ta||fa)){if("function"==typeof fetch&&!P.startsWith("file://"))return fetch(P,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+P+"'";return e.arrayBuffer()}).catch(function(){return f(P)});
|
||||
if(na)return new Promise(function(e,b){na(P,function(c){e(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return f(P)})}function u(e){for(;0<e.length;)e.shift()(a)}function A(e){this.excPtr=e;this.ptr=e-24;this.set_type=function(b){Y[this.ptr+4>>2]=b};this.get_type=function(){return Y[this.ptr+4>>2]};this.set_destructor=function(b){Y[this.ptr+8>>2]=b};this.get_destructor=function(){return Y[this.ptr+8>>2]};this.set_refcount=function(b){ca[this.ptr>>2]=b};this.set_caught=function(b){W[this.ptr+
|
||||
12>>0]=b?1:0};this.get_caught=function(){return 0!=W[this.ptr+12>>0]};this.set_rethrown=function(b){W[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=W[this.ptr+13>>0]};this.init=function(b,c){this.set_adjusted_ptr(0);this.set_type(b);this.set_destructor(c);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){ca[this.ptr>>2]+=1};this.release_ref=function(){var b=ca[this.ptr>>2];ca[this.ptr>>2]=b-1;return 1===b};this.set_adjusted_ptr=function(b){Y[this.ptr+
|
||||
16>>2]=b};this.get_adjusted_ptr=function(){return Y[this.ptr+16>>2]};this.get_exception_ptr=function(){if(ua(this.get_type()))return Y[this.excPtr>>2];var b=this.get_adjusted_ptr();return 0!==b?b:this.excPtr}}function F(){function e(){if(!la&&(la=!0,a.calledRun=!0,!sa)){va=!0;u(oa);wa(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)xa.unshift(a.postRun.shift());u(xa)}}if(!(0<ba)){if(a.preRun)for("function"==
|
||||
typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)ya.unshift(a.preRun.shift());u(ya);0<ba||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);e()},1)):e())}}function v(){}function w(e){return(e||v).__cache__}function B(e,b){var c=w(b),d=c[e];if(d)return d;d=Object.create((b||v).prototype);d.ptr=e;return c[e]=d}function R(e){if("string"===typeof e){for(var b=0,c=0;c<e.length;++c){var d=e.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=
|
||||
d?(b+=4,++c):b+=3}b=Array(b+1);c=0;d=b.length;if(0<d){d=c+d-1;for(var g=0;g<e.length;++g){var t=e.charCodeAt(g);if(55296<=t&&57343>=t){var aa=e.charCodeAt(++g);t=65536+((t&1023)<<10)|aa&1023}if(127>=t){if(c>=d)break;b[c++]=t}else{if(2047>=t){if(c+1>=d)break;b[c++]=192|t>>6}else{if(65535>=t){if(c+2>=d)break;b[c++]=224|t>>12}else{if(c+3>=d)break;b[c++]=240|t>>18;b[c++]=128|t>>12&63}b[c++]=128|t>>6&63}b[c++]=128|t&63}}b[c]=0}e=r.alloc(b,W);r.copy(b,W,e);return e}return e}function Z(e){if("object"===
|
||||
typeof e){var b=r.alloc(e,W);r.copy(e,W,b);return b}return e}function X(){throw"cannot construct a VoidPtr, no constructor in IDL";}function S(){this.ptr=za();w(S)[this.ptr]=this}function Q(){this.ptr=Aa();w(Q)[this.ptr]=this}function V(){this.ptr=Ba();w(V)[this.ptr]=this}function x(){this.ptr=Ca();w(x)[this.ptr]=this}function D(){this.ptr=Da();w(D)[this.ptr]=this}function G(){this.ptr=Ea();w(G)[this.ptr]=this}function H(){this.ptr=Fa();w(H)[this.ptr]=this}function E(){this.ptr=Ga();w(E)[this.ptr]=
|
||||
this}function T(){this.ptr=Ha();w(T)[this.ptr]=this}function C(){throw"cannot construct a Status, no constructor in IDL";}function I(){this.ptr=Ia();w(I)[this.ptr]=this}function J(){this.ptr=Ja();w(J)[this.ptr]=this}function K(){this.ptr=Ka();w(K)[this.ptr]=this}function L(){this.ptr=La();w(L)[this.ptr]=this}function M(){this.ptr=Ma();w(M)[this.ptr]=this}function N(){this.ptr=Na();w(N)[this.ptr]=this}function O(){this.ptr=Oa();w(O)[this.ptr]=this}function z(){this.ptr=Pa();w(z)[this.ptr]=this}function m(){this.ptr=
|
||||
Qa();w(m)[this.ptr]=this}n=void 0===n?{}:n;var a="undefined"!=typeof n?n:{},wa,ka;a.ready=new Promise(function(e,b){wa=e;ka=b});var Ra=!1,Sa=!1;a.onRuntimeInitialized=function(){Ra=!0;if(Sa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Sa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(e){if("string"!==typeof e)return!1;e=e.split(".");return 2>e.length||3<e.length?!1:1==e[0]&&0<=e[1]&&5>=e[1]?!0:0!=e[0]||10<
|
||||
e[1]?!1:!0};var Ta=Object.assign({},a),ta="object"==typeof window,fa="function"==typeof importScripts,Ua="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,U="";if(Ua){var Va=require("fs"),pa=require("path");U=fa?pa.dirname(U)+"/":__dirname+"/";var Wa=function(e,b){e=e.startsWith("file://")?new URL(e):pa.normalize(e);return Va.readFileSync(e,b?void 0:"utf8")};var ma=function(e){e=Wa(e,!0);e.buffer||(e=new Uint8Array(e));return e};var na=function(e,
|
||||
b,c){e=e.startsWith("file://")?new URL(e):pa.normalize(e);Va.readFile(e,function(d,g){d?c(d):b(g.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/");process.argv.slice(2);a.inspect=function(){return"[Emscripten Module object]"}}else if(ta||fa)fa?U=self.location.href:"undefined"!=typeof document&&document.currentScript&&(U=document.currentScript.src),h&&(U=h),U=0!==U.indexOf("blob:")?U.substr(0,U.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Wa=function(e){var b=new XMLHttpRequest;b.open("GET",
|
||||
e,!1);b.send(null);return b.responseText},fa&&(ma=function(e){var b=new XMLHttpRequest;b.open("GET",e,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),na=function(e,b,c){var d=new XMLHttpRequest;d.open("GET",e,!0);d.responseType="arraybuffer";d.onload=function(){200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};a.print||console.log.bind(console);var da=a.printErr||console.warn.bind(console);Object.assign(a,Ta);Ta=null;var ea;a.wasmBinary&&
|
||||
(ea=a.wasmBinary);"object"!=typeof WebAssembly&&y("no native wasm support detected");var ja,sa=!1,ra="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,W,ia,ca,Y,ya=[],oa=[],xa=[],va=!1,ba=0,qa=null,ha=null;var P="draco_decoder_gltf.wasm";P.startsWith("data:application/octet-stream;base64,")||(P=k(P));var pd=0,qd={b:function(e,b,c){(new A(e)).init(b,c);pd++;throw e;},a:function(){y("")},d:function(e,b,c){ia.copyWithin(e,b,b+c)},c:function(e){var b=ia.length;e>>>=0;if(2147483648<e)return!1;
|
||||
for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,e+100663296);var g=Math;d=Math.max(e,d);g=g.min.call(g,2147483648,d+(65536-d%65536)%65536);a:{d=ja.buffer;try{ja.grow(g-d.byteLength+65535>>>16);l();var t=1;break a}catch(aa){}t=void 0}if(t)return!0}return!1}};(function(){function e(g,t){a.asm=g.exports;ja=a.asm.e;l();oa.unshift(a.asm.f);ba--;a.monitorRunDependencies&&a.monitorRunDependencies(ba);0==ba&&(null!==qa&&(clearInterval(qa),qa=null),ha&&(g=ha,ha=null,g()))}function b(g){e(g.instance)}
|
||||
function c(g){return q().then(function(t){return WebAssembly.instantiate(t,d)}).then(function(t){return t}).then(g,function(t){da("failed to asynchronously prepare wasm: "+t);y(t)})}var d={a:qd};ba++;a.monitorRunDependencies&&a.monitorRunDependencies(ba);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(g){da("Module.instantiateWasm callback failed with error: "+g),ka(g)}(function(){return ea||"function"!=typeof WebAssembly.instantiateStreaming||P.startsWith("data:application/octet-stream;base64,")||
|
||||
P.startsWith("file://")||Ua||"function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(t){da("wasm streaming compile failed: "+t);da("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ka);return{}})();var Xa=a._emscripten_bind_VoidPtr___destroy___0=function(){return(Xa=a._emscripten_bind_VoidPtr___destroy___0=a.asm.h).apply(null,arguments)},za=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=
|
||||
function(){return(za=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.i).apply(null,arguments)},Ya=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(Ya=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.j).apply(null,arguments)},Za=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Za=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.k).apply(null,arguments)},Aa=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Aa=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=
|
||||
a.asm.l).apply(null,arguments)},$a=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return($a=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.m).apply(null,arguments)},ab=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return(ab=a._emscripten_bind_AttributeTransformData___destroy___0=a.asm.n).apply(null,arguments)},Ba=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Ba=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=
|
||||
a.asm.o).apply(null,arguments)},bb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(bb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.p).apply(null,arguments)},Ca=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ca=a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.q).apply(null,arguments)},cb=a._emscripten_bind_PointAttribute_size_0=function(){return(cb=a._emscripten_bind_PointAttribute_size_0=a.asm.r).apply(null,arguments)},db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=
|
||||
function(){return(db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=a.asm.s).apply(null,arguments)},eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(eb=a._emscripten_bind_PointAttribute_attribute_type_0=a.asm.t).apply(null,arguments)},fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(fb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.u).apply(null,arguments)},gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return(gb=a._emscripten_bind_PointAttribute_num_components_0=
|
||||
a.asm.v).apply(null,arguments)},hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(hb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.w).apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return(ib=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.x).apply(null,arguments)},jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(jb=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.y).apply(null,arguments)},kb=a._emscripten_bind_PointAttribute_unique_id_0=
|
||||
function(){return(kb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.z).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(lb=a._emscripten_bind_PointAttribute___destroy___0=a.asm.A).apply(null,arguments)},Da=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Da=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.B).apply(null,arguments)},mb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=
|
||||
function(){return(mb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=a.asm.C).apply(null,arguments)},nb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(nb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.D).apply(null,arguments)},ob=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(ob=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=a.asm.E).apply(null,arguments)},pb=
|
||||
a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(pb=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.F).apply(null,arguments)},qb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(qb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.G).apply(null,arguments)},Ea=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Ea=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=
|
||||
a.asm.H).apply(null,arguments)},rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.I).apply(null,arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(sb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.J).apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(tb=
|
||||
a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.K).apply(null,arguments)},Fa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Fa=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.L).apply(null,arguments)},ub=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(ub=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.M).apply(null,arguments)},vb=a._emscripten_bind_PointCloud_num_points_0=function(){return(vb=a._emscripten_bind_PointCloud_num_points_0=a.asm.N).apply(null,
|
||||
arguments)},wb=a._emscripten_bind_PointCloud___destroy___0=function(){return(wb=a._emscripten_bind_PointCloud___destroy___0=a.asm.O).apply(null,arguments)},Ga=a._emscripten_bind_Mesh_Mesh_0=function(){return(Ga=a._emscripten_bind_Mesh_Mesh_0=a.asm.P).apply(null,arguments)},xb=a._emscripten_bind_Mesh_num_faces_0=function(){return(xb=a._emscripten_bind_Mesh_num_faces_0=a.asm.Q).apply(null,arguments)},yb=a._emscripten_bind_Mesh_num_attributes_0=function(){return(yb=a._emscripten_bind_Mesh_num_attributes_0=
|
||||
a.asm.R).apply(null,arguments)},zb=a._emscripten_bind_Mesh_num_points_0=function(){return(zb=a._emscripten_bind_Mesh_num_points_0=a.asm.S).apply(null,arguments)},Ab=a._emscripten_bind_Mesh___destroy___0=function(){return(Ab=a._emscripten_bind_Mesh___destroy___0=a.asm.T).apply(null,arguments)},Ha=a._emscripten_bind_Metadata_Metadata_0=function(){return(Ha=a._emscripten_bind_Metadata_Metadata_0=a.asm.U).apply(null,arguments)},Bb=a._emscripten_bind_Metadata___destroy___0=function(){return(Bb=a._emscripten_bind_Metadata___destroy___0=
|
||||
a.asm.V).apply(null,arguments)},Cb=a._emscripten_bind_Status_code_0=function(){return(Cb=a._emscripten_bind_Status_code_0=a.asm.W).apply(null,arguments)},Db=a._emscripten_bind_Status_ok_0=function(){return(Db=a._emscripten_bind_Status_ok_0=a.asm.X).apply(null,arguments)},Eb=a._emscripten_bind_Status_error_msg_0=function(){return(Eb=a._emscripten_bind_Status_error_msg_0=a.asm.Y).apply(null,arguments)},Fb=a._emscripten_bind_Status___destroy___0=function(){return(Fb=a._emscripten_bind_Status___destroy___0=
|
||||
a.asm.Z).apply(null,arguments)},Ia=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ia=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm._).apply(null,arguments)},Gb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Gb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.$).apply(null,arguments)},Hb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Hb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.aa).apply(null,arguments)},Ib=
|
||||
a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Ib=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.ba).apply(null,arguments)},Ja=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ja=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.ca).apply(null,arguments)},Jb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Jb=a._emscripten_bind_DracoInt8Array_GetValue_1=a.asm.da).apply(null,arguments)},Kb=a._emscripten_bind_DracoInt8Array_size_0=
|
||||
function(){return(Kb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.ea).apply(null,arguments)},Lb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Lb=a._emscripten_bind_DracoInt8Array___destroy___0=a.asm.fa).apply(null,arguments)},Ka=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Ka=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.ga).apply(null,arguments)},Mb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Mb=a._emscripten_bind_DracoUInt8Array_GetValue_1=
|
||||
a.asm.ha).apply(null,arguments)},Nb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Nb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.ia).apply(null,arguments)},Ob=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ob=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.ja).apply(null,arguments)},La=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(La=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.ka).apply(null,arguments)},Pb=a._emscripten_bind_DracoInt16Array_GetValue_1=
|
||||
function(){return(Pb=a._emscripten_bind_DracoInt16Array_GetValue_1=a.asm.la).apply(null,arguments)},Qb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Qb=a._emscripten_bind_DracoInt16Array_size_0=a.asm.ma).apply(null,arguments)},Rb=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Rb=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.na).apply(null,arguments)},Ma=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Ma=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=
|
||||
a.asm.oa).apply(null,arguments)},Sb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Sb=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.pa).apply(null,arguments)},Tb=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(Tb=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.qa).apply(null,arguments)},Ub=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Ub=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.ra).apply(null,arguments)},Na=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=
|
||||
function(){return(Na=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.sa).apply(null,arguments)},Vb=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Vb=a._emscripten_bind_DracoInt32Array_GetValue_1=a.asm.ta).apply(null,arguments)},Wb=a._emscripten_bind_DracoInt32Array_size_0=function(){return(Wb=a._emscripten_bind_DracoInt32Array_size_0=a.asm.ua).apply(null,arguments)},Xb=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Xb=a._emscripten_bind_DracoInt32Array___destroy___0=
|
||||
a.asm.va).apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Oa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=a.asm.wa).apply(null,arguments)},Yb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(Yb=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.xa).apply(null,arguments)},Zb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(Zb=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.ya).apply(null,arguments)},$b=a._emscripten_bind_DracoUInt32Array___destroy___0=
|
||||
function(){return($b=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.za).apply(null,arguments)},Pa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Pa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.Aa).apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(ac=a._emscripten_bind_MetadataQuerier_HasEntry_2=a.asm.Ba).apply(null,arguments)},bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=
|
||||
a.asm.Ca).apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(cc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=a.asm.Da).apply(null,arguments)},dc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(dc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.Ea).apply(null,arguments)},ec=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(ec=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.Fa).apply(null,
|
||||
arguments)},fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.Ga).apply(null,arguments)},gc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(gc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.Ha).apply(null,arguments)},hc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(hc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.Ia).apply(null,arguments)},Qa=a._emscripten_bind_Decoder_Decoder_0=
|
||||
function(){return(Qa=a._emscripten_bind_Decoder_Decoder_0=a.asm.Ja).apply(null,arguments)},ic=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(ic=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.Ka).apply(null,arguments)},jc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(jc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.La).apply(null,arguments)},kc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return(kc=a._emscripten_bind_Decoder_GetAttributeId_2=
|
||||
a.asm.Ma).apply(null,arguments)},lc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(lc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=a.asm.Na).apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(mc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.Oa).apply(null,arguments)},nc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(nc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.Pa).apply(null,arguments)},
|
||||
oc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(oc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.Qa).apply(null,arguments)},pc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(pc=a._emscripten_bind_Decoder_GetMetadata_1=a.asm.Ra).apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(qc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.Sa).apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=
|
||||
function(){return(rc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.Ta).apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(sc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.Ua).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(tc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.Va).apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(uc=
|
||||
a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.Wa).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(vc=a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm.Xa).apply(null,arguments)},wc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(wc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.Ya).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(xc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=
|
||||
a.asm.Za).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(yc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm._a).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(zc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=a.asm.$a).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Ac=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=
|
||||
a.asm.ab).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Bc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.bb).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Cc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.cb).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Dc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=
|
||||
a.asm.db).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.eb).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Fc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.fb).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Gc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=
|
||||
a.asm.gb).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Hc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.hb).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Ic=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.ib).apply(null,arguments)},Jc=a._emscripten_bind_Decoder___destroy___0=function(){return(Jc=a._emscripten_bind_Decoder___destroy___0=a.asm.jb).apply(null,arguments)},Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=
|
||||
function(){return(Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=a.asm.kb).apply(null,arguments)},Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.lb).apply(null,arguments)},Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=
|
||||
a.asm.mb).apply(null,arguments)},Nc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Nc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.nb).apply(null,arguments)},Oc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Oc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.ob).apply(null,arguments)},Pc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Pc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=
|
||||
a.asm.pb).apply(null,arguments)},Qc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Qc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.qb).apply(null,arguments)},Rc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Rc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.rb).apply(null,arguments)},Sc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Sc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=
|
||||
a.asm.sb).apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Tc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.tb).apply(null,arguments)},Uc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Uc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.ub).apply(null,arguments)},Vc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Vc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=
|
||||
a.asm.vb).apply(null,arguments)},Wc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Wc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.wb).apply(null,arguments)},Xc=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(Xc=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.xb).apply(null,arguments)},Yc=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(Yc=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.yb).apply(null,arguments)},Zc=
|
||||
a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Zc=a._emscripten_enum_draco_DataType_DT_UINT8=a.asm.zb).apply(null,arguments)},$c=a._emscripten_enum_draco_DataType_DT_INT16=function(){return($c=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.Ab).apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(ad=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.Bb).apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return(bd=a._emscripten_enum_draco_DataType_DT_INT32=
|
||||
a.asm.Cb).apply(null,arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return(cd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.Db).apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(dd=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.Eb).apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return(ed=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.Fb).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_FLOAT32=
|
||||
function(){return(fd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.Gb).apply(null,arguments)},gd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(gd=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.Hb).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(hd=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.Ib).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(id=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=
|
||||
a.asm.Jb).apply(null,arguments)},jd=a._emscripten_enum_draco_StatusCode_OK=function(){return(jd=a._emscripten_enum_draco_StatusCode_OK=a.asm.Kb).apply(null,arguments)},kd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(kd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.Lb).apply(null,arguments)},ld=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(ld=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.Mb).apply(null,arguments)},md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=
|
||||
function(){return(md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=a.asm.Nb).apply(null,arguments)},nd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(nd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.Ob).apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(od=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.Pb).apply(null,arguments)};a._malloc=function(){return(a._malloc=a.asm.Qb).apply(null,arguments)};
|
||||
a._free=function(){return(a._free=a.asm.Rb).apply(null,arguments)};var ua=function(){return(ua=a.asm.Sb).apply(null,arguments)};a.___start_em_js=11660;a.___stop_em_js=11758;var la;ha=function b(){la||F();la||(ha=b)};if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();F();v.prototype=Object.create(v.prototype);v.prototype.constructor=v;v.prototype.__class__=v;v.__cache__={};a.WrapperObject=v;a.getCache=w;a.wrapPointer=B;a.castObject=function(b,
|
||||
c){return B(b.ptr,c)};a.NULL=B(0);a.destroy=function(b){if(!b.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";b.__destroy__();delete w(b.__class__)[b.ptr]};a.compare=function(b,c){return b.ptr===c.ptr};a.getPointer=function(b){return b.ptr};a.getClass=function(b){return b.__class__};var r={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(r.needed){for(var b=0;b<r.temps.length;b++)a._free(r.temps[b]);r.temps.length=0;a._free(r.buffer);r.buffer=0;r.size+=
|
||||
r.needed;r.needed=0}r.buffer||(r.size+=128,r.buffer=a._malloc(r.size),r.buffer||y(void 0));r.pos=0},alloc:function(b,c){r.buffer||y(void 0);b=b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;r.pos+b>=r.size?(0<b||y(void 0),r.needed+=b,c=a._malloc(b),r.temps.push(c)):(c=r.buffer+r.pos,r.pos+=b);return c},copy:function(b,c,d){d>>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var g=0;g<b.length;g++)c[d+g]=b[g]}};X.prototype=Object.create(v.prototype);X.prototype.constructor=
|
||||
X;X.prototype.__class__=X;X.__cache__={};a.VoidPtr=X;X.prototype.__destroy__=X.prototype.__destroy__=function(){Xa(this.ptr)};S.prototype=Object.create(v.prototype);S.prototype.constructor=S;S.prototype.__class__=S;S.__cache__={};a.DecoderBuffer=S;S.prototype.Init=S.prototype.Init=function(b,c){var d=this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);Ya(d,b,c)};S.prototype.__destroy__=S.prototype.__destroy__=function(){Za(this.ptr)};Q.prototype=Object.create(v.prototype);
|
||||
Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.AttributeTransformData=Q;Q.prototype.transform_type=Q.prototype.transform_type=function(){return $a(this.ptr)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){ab(this.ptr)};V.prototype=Object.create(v.prototype);V.prototype.constructor=V;V.prototype.__class__=V;V.__cache__={};a.GeometryAttribute=V;V.prototype.__destroy__=V.prototype.__destroy__=function(){bb(this.ptr)};x.prototype=Object.create(v.prototype);x.prototype.constructor=
|
||||
x;x.prototype.__class__=x;x.__cache__={};a.PointAttribute=x;x.prototype.size=x.prototype.size=function(){return cb(this.ptr)};x.prototype.GetAttributeTransformData=x.prototype.GetAttributeTransformData=function(){return B(db(this.ptr),Q)};x.prototype.attribute_type=x.prototype.attribute_type=function(){return eb(this.ptr)};x.prototype.data_type=x.prototype.data_type=function(){return fb(this.ptr)};x.prototype.num_components=x.prototype.num_components=function(){return gb(this.ptr)};x.prototype.normalized=
|
||||
x.prototype.normalized=function(){return!!hb(this.ptr)};x.prototype.byte_stride=x.prototype.byte_stride=function(){return ib(this.ptr)};x.prototype.byte_offset=x.prototype.byte_offset=function(){return jb(this.ptr)};x.prototype.unique_id=x.prototype.unique_id=function(){return kb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){lb(this.ptr)};D.prototype=Object.create(v.prototype);D.prototype.constructor=D;D.prototype.__class__=D;D.__cache__={};a.AttributeQuantizationTransform=
|
||||
D;D.prototype.InitFromAttribute=D.prototype.InitFromAttribute=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!mb(c,b)};D.prototype.quantization_bits=D.prototype.quantization_bits=function(){return nb(this.ptr)};D.prototype.min_value=D.prototype.min_value=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return ob(c,b)};D.prototype.range=D.prototype.range=function(){return pb(this.ptr)};D.prototype.__destroy__=D.prototype.__destroy__=function(){qb(this.ptr)};G.prototype=
|
||||
Object.create(v.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.AttributeOctahedronTransform=G;G.prototype.InitFromAttribute=G.prototype.InitFromAttribute=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!rb(c,b)};G.prototype.quantization_bits=G.prototype.quantization_bits=function(){return sb(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){tb(this.ptr)};H.prototype=Object.create(v.prototype);H.prototype.constructor=H;H.prototype.__class__=
|
||||
H;H.__cache__={};a.PointCloud=H;H.prototype.num_attributes=H.prototype.num_attributes=function(){return ub(this.ptr)};H.prototype.num_points=H.prototype.num_points=function(){return vb(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){wb(this.ptr)};E.prototype=Object.create(v.prototype);E.prototype.constructor=E;E.prototype.__class__=E;E.__cache__={};a.Mesh=E;E.prototype.num_faces=E.prototype.num_faces=function(){return xb(this.ptr)};E.prototype.num_attributes=E.prototype.num_attributes=
|
||||
function(){return yb(this.ptr)};E.prototype.num_points=E.prototype.num_points=function(){return zb(this.ptr)};E.prototype.__destroy__=E.prototype.__destroy__=function(){Ab(this.ptr)};T.prototype=Object.create(v.prototype);T.prototype.constructor=T;T.prototype.__class__=T;T.__cache__={};a.Metadata=T;T.prototype.__destroy__=T.prototype.__destroy__=function(){Bb(this.ptr)};C.prototype=Object.create(v.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Status=C;C.prototype.code=
|
||||
C.prototype.code=function(){return Cb(this.ptr)};C.prototype.ok=C.prototype.ok=function(){return!!Db(this.ptr)};C.prototype.error_msg=C.prototype.error_msg=function(){return p(Eb(this.ptr))};C.prototype.__destroy__=C.prototype.__destroy__=function(){Fb(this.ptr)};I.prototype=Object.create(v.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoFloat32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Gb(c,
|
||||
b)};I.prototype.size=I.prototype.size=function(){return Hb(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Ib(this.ptr)};J.prototype=Object.create(v.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.DracoInt8Array=J;J.prototype.GetValue=J.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Jb(c,b)};J.prototype.size=J.prototype.size=function(){return Kb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){Lb(this.ptr)};
|
||||
K.prototype=Object.create(v.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoUInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Mb(c,b)};K.prototype.size=K.prototype.size=function(){return Nb(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){Ob(this.ptr)};L.prototype=Object.create(v.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt16Array=
|
||||
L;L.prototype.GetValue=L.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Pb(c,b)};L.prototype.size=L.prototype.size=function(){return Qb(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){Rb(this.ptr)};M.prototype=Object.create(v.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoUInt16Array=M;M.prototype.GetValue=M.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Sb(c,b)};
|
||||
M.prototype.size=M.prototype.size=function(){return Tb(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=function(){Ub(this.ptr)};N.prototype=Object.create(v.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DracoInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Vb(c,b)};N.prototype.size=N.prototype.size=function(){return Wb(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){Xb(this.ptr)};
|
||||
O.prototype=Object.create(v.prototype);O.prototype.constructor=O;O.prototype.__class__=O;O.__cache__={};a.DracoUInt32Array=O;O.prototype.GetValue=O.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Yb(c,b)};O.prototype.size=O.prototype.size=function(){return Zb(this.ptr)};O.prototype.__destroy__=O.prototype.__destroy__=function(){$b(this.ptr)};z.prototype=Object.create(v.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.MetadataQuerier=
|
||||
z;z.prototype.HasEntry=z.prototype.HasEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return!!ac(d,b,c)};z.prototype.GetIntEntry=z.prototype.GetIntEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return bc(d,b,c)};z.prototype.GetIntEntryArray=z.prototype.GetIntEntryArray=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===
|
||||
typeof c?c.ptr:R(c);d&&"object"===typeof d&&(d=d.ptr);cc(g,b,c,d)};z.prototype.GetDoubleEntry=z.prototype.GetDoubleEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return dc(d,b,c)};z.prototype.GetStringEntry=z.prototype.GetStringEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return p(ec(d,b,c))};z.prototype.NumEntries=z.prototype.NumEntries=function(b){var c=this.ptr;
|
||||
b&&"object"===typeof b&&(b=b.ptr);return fc(c,b)};z.prototype.GetEntryName=z.prototype.GetEntryName=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return p(gc(d,b,c))};z.prototype.__destroy__=z.prototype.__destroy__=function(){hc(this.ptr)};m.prototype=Object.create(v.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.Decoder=m;m.prototype.DecodeArrayToPointCloud=m.prototype.DecodeArrayToPointCloud=function(b,c,d){var g=
|
||||
this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return B(ic(g,b,c,d),C)};m.prototype.DecodeArrayToMesh=m.prototype.DecodeArrayToMesh=function(b,c,d){var g=this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return B(jc(g,b,c,d),C)};m.prototype.GetAttributeId=m.prototype.GetAttributeId=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&
|
||||
(c=c.ptr);return kc(d,b,c)};m.prototype.GetAttributeIdByName=m.prototype.GetAttributeIdByName=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return lc(d,b,c)};m.prototype.GetAttributeIdByMetadataEntry=m.prototype.GetAttributeIdByMetadataEntry=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);d=d&&"object"===typeof d?d.ptr:R(d);return mc(g,b,c,d)};m.prototype.GetAttribute=
|
||||
m.prototype.GetAttribute=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(nc(d,b,c),x)};m.prototype.GetAttributeByUniqueId=m.prototype.GetAttributeByUniqueId=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(oc(d,b,c),x)};m.prototype.GetMetadata=m.prototype.GetMetadata=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return B(pc(c,b),T)};m.prototype.GetAttributeMetadata=m.prototype.GetAttributeMetadata=
|
||||
function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(qc(d,b,c),T)};m.prototype.GetFaceFromMesh=m.prototype.GetFaceFromMesh=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!rc(g,b,c,d)};m.prototype.GetTriangleStripsFromMesh=m.prototype.GetTriangleStripsFromMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);
|
||||
return sc(d,b,c)};m.prototype.GetTrianglesUInt16Array=m.prototype.GetTrianglesUInt16Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!tc(g,b,c,d)};m.prototype.GetTrianglesUInt32Array=m.prototype.GetTrianglesUInt32Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!uc(g,b,c,d)};m.prototype.GetAttributeFloat=m.prototype.GetAttributeFloat=
|
||||
function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!vc(g,b,c,d)};m.prototype.GetAttributeFloatForAllPoints=m.prototype.GetAttributeFloatForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!wc(g,b,c,d)};m.prototype.GetAttributeIntForAllPoints=m.prototype.GetAttributeIntForAllPoints=function(b,c,d){var g=this.ptr;
|
||||
b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!xc(g,b,c,d)};m.prototype.GetAttributeInt8ForAllPoints=m.prototype.GetAttributeInt8ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!yc(g,b,c,d)};m.prototype.GetAttributeUInt8ForAllPoints=m.prototype.GetAttributeUInt8ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=
|
||||
b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!zc(g,b,c,d)};m.prototype.GetAttributeInt16ForAllPoints=m.prototype.GetAttributeInt16ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ac(g,b,c,d)};m.prototype.GetAttributeUInt16ForAllPoints=m.prototype.GetAttributeUInt16ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&
|
||||
(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Bc(g,b,c,d)};m.prototype.GetAttributeInt32ForAllPoints=m.prototype.GetAttributeInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Cc(g,b,c,d)};m.prototype.GetAttributeUInt32ForAllPoints=m.prototype.GetAttributeUInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===
|
||||
typeof d&&(d=d.ptr);return!!Dc(g,b,c,d)};m.prototype.GetAttributeDataArrayForAllPoints=m.prototype.GetAttributeDataArrayForAllPoints=function(b,c,d,g,t){var aa=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);g&&"object"===typeof g&&(g=g.ptr);t&&"object"===typeof t&&(t=t.ptr);return!!Ec(aa,b,c,d,g,t)};m.prototype.SkipAttributeTransform=m.prototype.SkipAttributeTransform=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);Fc(c,
|
||||
b)};m.prototype.GetEncodedGeometryType_Deprecated=m.prototype.GetEncodedGeometryType_Deprecated=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Gc(c,b)};m.prototype.DecodeBufferToPointCloud=m.prototype.DecodeBufferToPointCloud=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(Hc(d,b,c),C)};m.prototype.DecodeBufferToMesh=m.prototype.DecodeBufferToMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===
|
||||
typeof c&&(c=c.ptr);return B(Ic(d,b,c),C)};m.prototype.__destroy__=m.prototype.__destroy__=function(){Jc(this.ptr)};(function(){function b(){a.ATTRIBUTE_INVALID_TRANSFORM=Kc();a.ATTRIBUTE_NO_TRANSFORM=Lc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Mc();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Nc();a.INVALID=Oc();a.POSITION=Pc();a.NORMAL=Qc();a.COLOR=Rc();a.TEX_COORD=Sc();a.GENERIC=Tc();a.INVALID_GEOMETRY_TYPE=Uc();a.POINT_CLOUD=Vc();a.TRIANGULAR_MESH=Wc();a.DT_INVALID=Xc();a.DT_INT8=Yc();a.DT_UINT8=Zc();a.DT_INT16=
|
||||
$c();a.DT_UINT16=ad();a.DT_INT32=bd();a.DT_UINT32=cd();a.DT_INT64=dd();a.DT_UINT64=ed();a.DT_FLOAT32=fd();a.DT_FLOAT64=gd();a.DT_BOOL=hd();a.DT_TYPES_COUNT=id();a.OK=jd();a.DRACO_ERROR=kd();a.IO_ERROR=ld();a.INVALID_PARAMETER=md();a.UNSUPPORTED_VERSION=nd();a.UNKNOWN_VERSION=od()}va?b():oa.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();a.Decoder.prototype.GetEncodedGeometryType=function(b){if(b.__class__&&b.__class__===a.DecoderBuffer)return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(b);
|
||||
if(8>b.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(b[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return n.ready}}();"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports?(exports.DracoDecoderModule=DracoDecoderModule):("undefined"!==typeof self?self:"undefined"!==typeof global?global:this)["DracoDecoderModule"]=DracoDecoderModule;
|
||||
BIN
public/assets/hdr/autoshop_01_1k.hdr
Normal file
BIN
public/assets/hdr/autoshop_01_2k.hdr
Normal file
BIN
public/assets/image/firespace/originpic/1.jpg
Normal file
|
After Width: | Height: | Size: 851 KiB |
BIN
public/assets/image/firespace/originpic/10.jpg
Normal file
|
After Width: | Height: | Size: 246 KiB |
BIN
public/assets/image/firespace/originpic/11.jpg
Normal file
|
After Width: | Height: | Size: 256 KiB |
BIN
public/assets/image/firespace/originpic/12.jpg
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
public/assets/image/firespace/originpic/2.jpg
Normal file
|
After Width: | Height: | Size: 378 KiB |
BIN
public/assets/image/firespace/originpic/3.jpg
Normal file
|
After Width: | Height: | Size: 262 KiB |
BIN
public/assets/image/firespace/originpic/4.jpg
Normal file
|
After Width: | Height: | Size: 404 KiB |
BIN
public/assets/image/firespace/originpic/5.jpg
Normal file
|
After Width: | Height: | Size: 218 KiB |
BIN
public/assets/image/firespace/originpic/6.jpg
Normal file
|
After Width: | Height: | Size: 612 KiB |
BIN
public/assets/image/firespace/originpic/7.jpg
Normal file
|
After Width: | Height: | Size: 562 KiB |
BIN
public/assets/image/firespace/originpic/8.jpg
Normal file
|
After Width: | Height: | Size: 341 KiB |
BIN
public/assets/image/firespace/originpic/9.jpg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
public/assets/image/firespace/thumb/1.jpg
Normal file
|
After Width: | Height: | Size: 180 KiB |
BIN
public/assets/image/firespace/thumb/10.jpg
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
public/assets/image/firespace/thumb/11.jpg
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
public/assets/image/firespace/thumb/12.jpg
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
public/assets/image/firespace/thumb/2.jpg
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
public/assets/image/firespace/thumb/3.jpg
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
public/assets/image/firespace/thumb/4.jpg
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
public/assets/image/firespace/thumb/5.jpg
Normal file
|
After Width: | Height: | Size: 166 KiB |
BIN
public/assets/image/firespace/thumb/6.jpg
Normal file
|
After Width: | Height: | Size: 117 KiB |
BIN
public/assets/image/firespace/thumb/7.jpg
Normal file
|
After Width: | Height: | Size: 265 KiB |
BIN
public/assets/image/firespace/thumb/8.jpg
Normal file
|
After Width: | Height: | Size: 164 KiB |
BIN
public/assets/image/firespace/thumb/9.jpg
Normal file
|
After Width: | Height: | Size: 307 KiB |
BIN
public/assets/image/wall_Normal.jpg
Normal file
|
After Width: | Height: | Size: 512 KiB |
BIN
public/assets/model/Paper Bag01.glb
Normal file
BIN
public/assets/model/SM_BoyTshirt.glb
Normal file
BIN
public/assets/model/T-shirt.glb
Normal file
BIN
public/assets/model/TablePAL.glb
Normal file
BIN
public/assets/model/coffee cup.glb
Normal file
BIN
public/assets/model/tbexport.glb
Normal file
BIN
public/assets/skybox/autoshop_01_1k.png
Normal file
|
After Width: | Height: | Size: 876 KiB |
BIN
public/assets/skybox/skybox_default.png
Normal file
|
After Width: | Height: | Size: 610 KiB |
351
public/preload.js
Normal file
@ -0,0 +1,351 @@
|
||||
const { contextBridge, ipcRenderer } = require("electron");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const { changeDpiBlob } = require("changedpi");
|
||||
const { Canvas, loadImage } = require("skia-canvas");
|
||||
const sharp = require("sharp");
|
||||
|
||||
//在主进程或渲染进程(需启用 nodeIntegration)中
|
||||
// console.log("当前架构:", process.arch);
|
||||
// 增加 sharp 的像素限制(根据需要调整)
|
||||
// 默认限制是 268402689 像素 (~16384x16384)
|
||||
// sharp.concurrency(1); // 降低并发以减少内存使用
|
||||
// console.log(sharp)
|
||||
// sharp.setMaxBuffer(1024 * 1024 * 500); // 增加缓冲区大小(500MB)
|
||||
|
||||
const commonApi = {
|
||||
/**
|
||||
* 将 Blob 转换为 Buffer
|
||||
* @param {Blob} blob - 图片 Blob 数据
|
||||
* @returns {Promise<Buffer>} 转换后的 Buffer
|
||||
*/
|
||||
blobToBuffer: async (blob) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
reader.onloadend = () => {
|
||||
// FileReader 结果为 ArrayBuffer,需转换为 Buffer
|
||||
const buffer = Buffer.from(reader.result);
|
||||
resolve(buffer);
|
||||
};
|
||||
reader.onerror = reject;
|
||||
reader.readAsArrayBuffer(blob);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 将 Blob 对象写入本地文件
|
||||
* @param {Blob} blob - 要写入的 Blob 对象
|
||||
* @param {string} filePath - 目标文件路径
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
writeBlobToFile: async (blob, filePath) => {
|
||||
try {
|
||||
// 将 Blob 转换为 ArrayBuffer
|
||||
const arrayBuffer = await blob.arrayBuffer();
|
||||
|
||||
// 将 ArrayBuffer 转换为 Buffer
|
||||
const buffer = Buffer.from(arrayBuffer);
|
||||
|
||||
// 写入文件
|
||||
fs.writeFileSync(filePath, buffer);
|
||||
|
||||
// console.log(`Blob 已成功写入文件: ${filePath}`);
|
||||
} catch (error) {
|
||||
console.error("写入文件时发生错误:", error);
|
||||
throw error; // 允许调用者捕获错误
|
||||
}
|
||||
},
|
||||
// loadImage: async (path) => {
|
||||
// const image = await new Promise((resolve, reject) => {
|
||||
// const img = new Image();
|
||||
// img.onload = () => resolve(img);
|
||||
// img.onerror = reject;
|
||||
// img.src = path;
|
||||
// });
|
||||
// return image;
|
||||
// },
|
||||
|
||||
// setDpiMetadata: async (outputPath, dpi) => {
|
||||
// // // 1. 用 Jimp 处理图像(像素尺寸不变)
|
||||
// // const image = await Jimp.read(inputPath);
|
||||
// // // (可选)进行缩放、绘制等操作
|
||||
// // await image.write(outputPath);
|
||||
|
||||
// // 2. 用 exiftool 写入 DPI 元数据
|
||||
// // console.log(exiftool, dpi);
|
||||
// await exiftool.write(outputPath, {
|
||||
// XResolution: dpi, // 水平 DPI
|
||||
// YResolution: dpi, // 垂直 DPI
|
||||
// ResolutionUnit: "inches", // 单位为英寸
|
||||
// });
|
||||
|
||||
// // console.log(`已为 ${outputPath} 设置 DPI: ${dpi}`);
|
||||
// await exiftool.end();
|
||||
// },
|
||||
};
|
||||
const electronAPIInstance = {
|
||||
// 读取文件功能
|
||||
readFile: (filePath) => {
|
||||
try {
|
||||
return fs.readFileSync(filePath, "utf8");
|
||||
} catch (err) {
|
||||
console.error("读取文件失败:", err);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
// 写入文件功能
|
||||
writeFile: (filePath, content) => {
|
||||
try {
|
||||
// 确保目录存在
|
||||
const dir = path.dirname(filePath);
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir, { recursive: true });
|
||||
}
|
||||
fs.writeFileSync(filePath, content, "utf8");
|
||||
return true;
|
||||
} catch (err) {
|
||||
console.error("写入文件失败:", err);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
// mergeImages(blobs, filePath) {
|
||||
// console.log("合并图片", blobs, filePath);
|
||||
// },
|
||||
|
||||
// 通过 IPC 与主进程通信
|
||||
getAppVersion: () => ipcRenderer.invoke("get-app-version"),
|
||||
|
||||
/**
|
||||
* 使用 Jimp 合并多张图片
|
||||
* @param {Object} options 合并选项
|
||||
* @param {string[]} options.blobs 图片Blob数组
|
||||
* @param {string} options.outputPath 输出图片路径
|
||||
* @param {string} [options.layout='horizontal'] 布局方式: horizontal/vertical/grid
|
||||
* @param {number} [options.spacing=10] 图片间距(像素)
|
||||
* @param {number} [options.gridColumns=2] 网格布局列数
|
||||
* @param {number} [options.quality=90] 输出质量(0-100)
|
||||
*/
|
||||
combineImages: async (options) => {
|
||||
// try {
|
||||
// 默认配置
|
||||
const config = {
|
||||
layout: "horizontal",
|
||||
spacing: 10,
|
||||
gridColumns: 2,
|
||||
quality: 90,
|
||||
imageWidth: 100,
|
||||
imageHeight: 100,
|
||||
images: [],
|
||||
quality: 1,
|
||||
dpi: 72,
|
||||
contentType: "image/png",
|
||||
...options,
|
||||
};
|
||||
|
||||
if (!config.images || config.images.length === 0) {
|
||||
throw new Error("请提供至少一张图片的路径");
|
||||
}
|
||||
|
||||
// // 加载所有图片
|
||||
// const images = [];
|
||||
// for (const blob of config.blobs) {
|
||||
// try {
|
||||
// // console.log(Jimp);
|
||||
// const buf = await commonApi.blobToBuffer(blob);
|
||||
// const image = await Jimp.read(buf);
|
||||
// images.push({
|
||||
// image,
|
||||
// width: image.bitmap.width,
|
||||
// height: image.bitmap.height,
|
||||
// buf: buf,
|
||||
// });
|
||||
// // console.log(
|
||||
// // `已加载图片: ${imgPath} (${image.bitmap.width}x${image.bitmap.height})`
|
||||
// // );
|
||||
// } catch (err) {
|
||||
// console.error(`加载图片失败:`, err.message);
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (images.length === 0) {
|
||||
// throw new Error("没有成功加载任何图片");
|
||||
// }
|
||||
|
||||
// 计算合成后图片的尺寸
|
||||
var totalWidth, totalHeight;
|
||||
const spacing = config.spacing;
|
||||
const imageWidth = config.imageWidth;
|
||||
const imageHeight = config.imageHeight;
|
||||
// if (config.layout === "horizontal") {
|
||||
// 水平排列
|
||||
(totalHeight = imageHeight), //Math.max(...images.map((img) => img.height)) + spacing * 2;
|
||||
(totalWidth = (imageWidth + spacing) * config.images.length);
|
||||
// images.reduce((sum, img) => sum + img.width, 0) +
|
||||
// spacing * (images.length + 1);
|
||||
// }
|
||||
// else if (config.layout === "vertical") {
|
||||
// // 垂直排列
|
||||
// totalWidth = Math.max(...images.map((img) => img.width)) + spacing * 2;
|
||||
// totalHeight =
|
||||
// images.reduce((sum, img) => sum + img.height, 0) +
|
||||
// spacing * (images.length + 1);
|
||||
// } else {
|
||||
// // 网格排列
|
||||
// const gridColumns = Math.max(1, config.gridColumns);
|
||||
// const rows = Math.ceil(images.length / gridColumns);
|
||||
|
||||
// // 计算每列最大宽度
|
||||
// const columnWidths = [];
|
||||
// for (let col = 0; col < gridColumns; col++) {
|
||||
// let maxWidth = 0;
|
||||
// for (let i = col; i < images.length; i += gridColumns) {
|
||||
// maxWidth = Math.max(maxWidth, images[i].width);
|
||||
// }
|
||||
// columnWidths.push(maxWidth);
|
||||
// }
|
||||
|
||||
// // 计算每行最大高度
|
||||
// const rowHeights = [];
|
||||
// for (let row = 0; row < rows; row++) {
|
||||
// let maxHeight = 0;
|
||||
// for (let col = 0; col < gridColumns; col++) {
|
||||
// const index = row * gridColumns + col;
|
||||
// if (index < images.length) {
|
||||
// maxHeight = Math.max(maxHeight, images[index].height);
|
||||
// }
|
||||
// }
|
||||
// rowHeights.push(maxHeight);
|
||||
// }
|
||||
|
||||
// // 总尺寸
|
||||
// totalWidth =
|
||||
// columnWidths.reduce((sum, width) => sum + width, 0) +
|
||||
// spacing * (gridColumns + 1);
|
||||
// totalHeight =
|
||||
// rowHeights.reduce((sum, height) => sum + height, 0) +
|
||||
// spacing * (rows + 1);
|
||||
// }
|
||||
|
||||
// 创建空白画布(透明背景)
|
||||
const canvas = new Canvas(totalWidth, totalHeight);
|
||||
const ctx = canvas.getContext("2d");
|
||||
|
||||
// 根据布局绘制图片
|
||||
// if (config.layout === "horizontal") {
|
||||
var currentX = 0;
|
||||
|
||||
for (var i = 0; i < config.images.length; i++) {
|
||||
const img = await loadImage(config.images[i]);
|
||||
// console.log(img.height, imageHeight);
|
||||
ctx.drawImage(
|
||||
img,
|
||||
0,
|
||||
0,
|
||||
img.width,
|
||||
img.height,
|
||||
currentX,
|
||||
0,
|
||||
imageWidth,
|
||||
imageHeight
|
||||
);
|
||||
currentX += imageWidth + spacing;
|
||||
}
|
||||
// for (const img of images) {
|
||||
// await combined.composite(img.image, currentX, currentY);
|
||||
// currentX += img.width + spacing;
|
||||
// }
|
||||
// } else if (config.layout === "vertical") {
|
||||
// let currentY = spacing;
|
||||
// const currentX = spacing;
|
||||
|
||||
// for (const img of images) {
|
||||
// await combined.composite(img.image, currentX, currentY);
|
||||
// currentY += img.height + spacing;
|
||||
// }
|
||||
// } else {
|
||||
// // 网格布局
|
||||
// let currentX = spacing;
|
||||
// let currentY = spacing;
|
||||
// let currentCol = 0;
|
||||
// const gridColumns = Math.max(1, config.gridColumns);
|
||||
|
||||
// for (let i = 0; i < images.length; i++) {
|
||||
// const img = images[i];
|
||||
// await combined.composite(img.image, currentX, currentY);
|
||||
|
||||
// currentCol++;
|
||||
// if (currentCol >= gridColumns) {
|
||||
// currentCol = 0;
|
||||
// currentX = spacing;
|
||||
|
||||
// // 计算当前行高度
|
||||
// let rowHeight = 0;
|
||||
// const rowStart = i - (gridColumns - 1);
|
||||
// const rowEnd = Math.min(i, images.length - 1);
|
||||
// for (let j = rowStart; j <= rowEnd; j++) {
|
||||
// rowHeight = Math.max(rowHeight, images[j].height);
|
||||
// }
|
||||
|
||||
// currentY += rowHeight + spacing;
|
||||
// } else {
|
||||
// // 计算当前列宽度
|
||||
// let colWidth = 0;
|
||||
// for (let j = currentCol; j < images.length; j += gridColumns) {
|
||||
// colWidth = Math.max(colWidth, images[j].width);
|
||||
// }
|
||||
// currentX += colWidth + spacing;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// 确保输出目录存在
|
||||
const outputDir = path.dirname(config.outputPath);
|
||||
if (!fs.existsSync(outputDir)) {
|
||||
fs.mkdirSync(outputDir, { recursive: true });
|
||||
}
|
||||
|
||||
// 保存合并后的图片
|
||||
// 根据文件扩展名自动选择格式
|
||||
// const extension = path.extname(config.outputPath).toLowerCase();
|
||||
|
||||
// if (extension === ".png") {
|
||||
// await combined.write(config.outputPath);
|
||||
// } else {
|
||||
// // JPG 或其他格式
|
||||
// await combined.write(config.outputPath, { quality: config.quality });
|
||||
// }
|
||||
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const buffer = await canvas.toBuffer(config.contentType, {
|
||||
quality: config.quality,
|
||||
});
|
||||
// 3. 使用 sharp 处理图像并设置 DPI
|
||||
await sharp(buffer, { limitInputPixels: 1024 * 1024 * 1024 * 5 }) //5G
|
||||
.withMetadata({
|
||||
density: config.dpi, // 设置 DPI
|
||||
xres: config.dpi, // 水平分辨率
|
||||
yres: config.dpi, // 垂直分辨率
|
||||
})
|
||||
.toFile(config.outputPath);
|
||||
// // 写入文件
|
||||
// fs.writeFileSync(config.outputPath, buffer);
|
||||
|
||||
// // 将 Buffer 转换为 Blob
|
||||
// var blob = new Blob([buffer], { type: config.contentType });
|
||||
// console.log("config.dpi:", config.dpi, "blob:", blob);
|
||||
// blob = await changeDpiBlob(blob, config.dpi);
|
||||
// console.log("blob:", blob);
|
||||
// await commonApi.writeBlobToFile(blob, config.outputPath);
|
||||
// console.log(`图片合并完成,已保存至: ${config.outputPath}`);
|
||||
resolve(true);
|
||||
});
|
||||
// } catch (err) {
|
||||
// console.error("图片合并失败:", err.message);
|
||||
// return false;
|
||||
// }
|
||||
},
|
||||
};
|
||||
|
||||
// 通过 contextBridge 安全地暴露 API 给渲染进程
|
||||
contextBridge.exposeInMainWorld("electronAPI", electronAPIInstance);
|
||||
1
public/vite.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
57
public/worklet/RealtimeAudioProcessor.js
Normal file
@ -0,0 +1,57 @@
|
||||
export class RealtimeAudioProcessor extends AudioWorkletProcessor {
|
||||
// public static handleCallback: (data: ArrayBufferLike) => void;
|
||||
|
||||
static get parameterDescriptors() {
|
||||
return [{ name: "sampleRate", defaultValue: 16000 }];
|
||||
}
|
||||
|
||||
// 端口初始化回调
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
// this.cacheBufferLen = 512;
|
||||
// this.cacheBuffer = new Float32Array(this.cacheBufferLen);
|
||||
// this.writePos = 0;
|
||||
// this.port.onmessage = (e) => {
|
||||
// console.log(e.data);
|
||||
// // this.port.postMessage("pong");
|
||||
// };
|
||||
}
|
||||
|
||||
process(inputs, outputs, parameters) {
|
||||
const inputData = inputs[0][0];
|
||||
if (inputData == null) {
|
||||
return true;
|
||||
}
|
||||
// console.log(inputs, outputs, inputData);
|
||||
// this.cacheBufferLen = Math.max(this.cacheBufferLen, inputData.length);
|
||||
const inputData16 = new Int16Array(inputData.length);
|
||||
// console.log(inputData.length);
|
||||
for (let i = 0; i < inputData.length; i++) {
|
||||
// inputData16[i] = Math.max(-1, Math.min(1, inputData[i])) * 0x7fff; // PCM 16-bit
|
||||
inputData16[i] = inputData[i] * 0x7fff; // PCM 16-bit
|
||||
// this.cacheBuffer[this.writePos] = inputData16[i]; // 循环覆盖
|
||||
// this.writePos = (this.writePos + 1) % this.cacheBufferLen;
|
||||
}
|
||||
// for (let i = 0; i < inputData[1].length; i++) {
|
||||
// outputs[1][i] = Math.max(-1, Math.min(1, inputData[1][i])) * 0x7fff; // PCM 16-bit
|
||||
// // this.cacheBuffer[this.writePos] = inputData16[i]; // 循环覆盖
|
||||
// // this.writePos = (this.writePos + 1) % this.cacheBufferLen;
|
||||
// }
|
||||
|
||||
// RealtimeAudioProcessor.handleCallback(output[0].buffer);
|
||||
|
||||
// 通过端口发送数据&& this.writePos === 0
|
||||
if (this.port) {
|
||||
// console.log(this.cacheBuffer.buffer);
|
||||
//&& this.writePos === 0
|
||||
this.port.postMessage({
|
||||
type: "audio-data",
|
||||
data: inputData16.buffer,
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// console.log(11, registerProcessor);
|
||||
registerProcessor("realtime-sound-processor", RealtimeAudioProcessor);
|
||||
114
src/App.vue
Normal file
@ -0,0 +1,114 @@
|
||||
<script setup lang="ts">
|
||||
// import FireSpace from "./components/firespace/FireSpace.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- <div>
|
||||
<a href="https://vite.dev" target="_blank">
|
||||
<img src="/vite.svg" class="logo" alt="Vite logo" />
|
||||
</a>
|
||||
<a href="https://vuejs.org/" target="_blank">
|
||||
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
|
||||
</a>
|
||||
</div> -->
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.logo {
|
||||
height: 6em;
|
||||
padding: 1.5em;
|
||||
will-change: filter;
|
||||
transition: filter 300ms;
|
||||
}
|
||||
|
||||
.logo:hover {
|
||||
filter: drop-shadow(0 0 2em #646cffaa);
|
||||
}
|
||||
|
||||
.logo.vue:hover {
|
||||
filter: drop-shadow(0 0 2em #42b883aa);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "pfsc";
|
||||
src: url("./assets/font/PingFangSC-Medium.ttf") format("truetype");
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
/* 全局滚动条样式 - 适用于整个页面 */
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
/* 垂直滚动条宽度 */
|
||||
height: 6px;
|
||||
/* 水平滚动条高度 */
|
||||
}
|
||||
|
||||
/* 滚动条轨道 */
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
/* 透明背景 */
|
||||
border-radius: 10px;
|
||||
/* 轨道圆角 */
|
||||
}
|
||||
|
||||
/* 滚动条滑块 */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(156, 163, 175, 0.5);
|
||||
/* 滑块颜色,带透明度 */
|
||||
border-radius: 10px;
|
||||
/* 滑块圆角 */
|
||||
transition: background 0.3s ease;
|
||||
/* 过渡动画 */
|
||||
}
|
||||
|
||||
/* 滚动条滑块悬停状态 */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(107, 114, 128, 0.7);
|
||||
/* 悬停时加深颜色 */
|
||||
}
|
||||
|
||||
/* 滚动条滑块激活状态(点击时) */
|
||||
::-webkit-scrollbar-thumb:active {
|
||||
background: rgba(75, 85, 99, 0.8);
|
||||
/* 激活时更深颜色 */
|
||||
}
|
||||
|
||||
/* 滚动条角落(垂直和水平滚动条交汇处) */
|
||||
::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
/* 角落透明 */
|
||||
}
|
||||
|
||||
/* 为特定容器定制滚动条(例如图片列表容器) */
|
||||
.image-container::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
/* 更窄的滚动条 */
|
||||
}
|
||||
|
||||
.image-container::-webkit-scrollbar-thumb {
|
||||
background: rgba(99, 102, 241, 0.4);
|
||||
/* 使用主题色 */
|
||||
}
|
||||
|
||||
.image-container::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(99, 102, 241, 0.6);
|
||||
/* 主题色加深 */
|
||||
}
|
||||
|
||||
/* 深色模式适配 */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(75, 85, 99, 0.5);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(107, 114, 128, 0.7);
|
||||
}
|
||||
|
||||
.image-container::-webkit-scrollbar-thumb {
|
||||
background: rgba(124, 58, 237, 0.4);
|
||||
/* 深色模式下的主题色 */
|
||||
}
|
||||
}
|
||||
</style>
|
||||
80
src/Global.ts
Normal file
@ -0,0 +1,80 @@
|
||||
import { nanoid } from "nanoid";
|
||||
|
||||
export class Global {
|
||||
private static isInited: boolean = false;
|
||||
public static selectedPrompt: string = "";
|
||||
public static selectedImageOssInfo = {
|
||||
objectName: "",
|
||||
url: "",
|
||||
};
|
||||
public static spaceImagesDesc = new Array<string>();
|
||||
public static spaceImages = new Array<any>();
|
||||
public static maxProductImageSize = 2048; // 生产图最大图片尺寸(长边)
|
||||
public static maxAiImageSize = 2048; // AI生成最大图片尺寸(长边)
|
||||
public static uid: string = nanoid();
|
||||
public static roomId: string = "room_boradcast";
|
||||
|
||||
public static init() {
|
||||
if (Global.isInited) {
|
||||
return;
|
||||
}
|
||||
Global.isInited = true;
|
||||
Global.spaceImagesDesc.push(
|
||||
"产品拍摄,一个蓝色包装面霜,石块底座,放在水滴上面,背景有模糊花朵,背景模糊,蓝色为主,高分辨率,高清晰度。"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"超写实美学,高达,居中显示占画面五分之三区域,细节刻画细腻,机械纹理清晰可见超高清显示,线条感纤细逼真,超高清画面,超写实,机械纹理清晰可见超高清显示,线条感十足,超高清画面,从天而降的拳法,往下砸一掌,地裂,拳头特写,高达上有丰富的水贴"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"海报,构图以庞大叙事,平面构图,青烟为主流体画面,颜色水彩晕染效果,颜色主要为翠绿。深绿,浅绿,淡绿,粉绿,渐变,青烟边缘有绿植寺庙,朝拜的人流车马。"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"使用 C4D进行3D建模渲染,以俯视视角制作一张购物节电商海报。画面中心展示可口可乐系列产品,包括不同包装形式,瓶身被飞溅的冰块环绕。背景构建一个冰山场景,有草地、蜿蜒河流、雪山、小麦,水花、喝可乐的人等,搭配蓝天白云,营造喝可乐的欢乐氛围。海报上方用醒目的立体大标题呈现 “儿童节狂欢 预售即将开启”,下方标题栏“小朋友的节日” 。整体画面色彩明亮、饱和度高,展现出活力欢快的购物节促销氛围。充满张力的画面"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"微观拍摄,微缩景观,平视角,背景是一个很大的屏幕,上面正在运行着宝可梦,画面下方有一个很大的游戏手柄,上面坐着皮卡丘和伊布在看着游戏画面"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"极简深蓝渐变空间、品牌广告、大气、高端、产品是一台黑色3D打印机、一个X字母动态光晕元素X字母四个角的颜色是蓝红黄绿。极简海报设计、创意设计、高级排版Global Canival、FLASHFORGE、强光感"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"艺术插画风格,一位GUCCI的形象片模特海报,用插画的形式呈现,妆容精致,头上戴着一朵大大的蝴蝶结,脖子上用丝绸的材质,时尚优雅经典。梵高画风,色彩明亮,对比度强。背景是法师花园,藤蔓,花朵。大师杰作,极繁主义,卢梭绘画风格,时尚插画,热带雨林,盛开的奇花异草,梦幻风格,一只藏在树叶后的猎豹,一只落在树梢的鹦鹉,一只藏在灌木丛里的粉色兔子,高品质细节,细腻的笔触,创新的撞色技法。高分辨率,最佳品质,8K壁纸,时尚杂志,潮流海报。"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"3D标准火山地质剖面图,蓝图形式,展示地壳、岩浆房、火山口等详细地质结构,标注岩浆层、火山灰层、熔岩流等地质分层,地质学专业术语,以红色、黄色、棕色为主色调表现岩浆和岩石,蓝色表现地下水层,白色表现火山灰,立体的地质构造,带有清晰的标注和刻度,适合地质展示,整体设计专业且具有科学准确性,利用光影和材质增强立体感,呈现火山喷发前的地质状态"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"麒麟的脸部特写,金色瞳孔,眼睛周围有细小的鳞片,局部特写,高清晰度,巨物恐惧症视角,第一人称视角,《指环王》风格,电影级画质,令人惊叹,逼真的光影,生动,充满活力,8K,虚幻引擎,细节丰富,概念艺术"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"黑金圆片金属片,它们呈螺旋排列,旋转纵深,主体结构垂直,无实际场景干扰,色彩由科技黑金至透明的渐变,虚拟的极简未来空间,放射感的金属质感,光彩耀眼,融合透明材质美学 +镜面金属+轻质感,科技风与未来主义风格,强调轻盈色彩,色调以黑金渐变为主,搭配暗黑渐变背景,整体色彩过渡自然,构图视角俯视角度的视角焦点透视视觉冲击感强烈,深邃的空间感,视觉焦点集中于最上层旋转区域薄片锋利带反光折射边缘菱角清晰高亮、内部透光 ,透明部分模拟玻璃质感,色彩过渡柔和自然,薄片间渐变有细微差异,整个画面无文字"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"请你生成张极其平凡无奇的自拍照,没有明确的主体或者构图感,就是随手一拍的快照,照片略带运动模糊,阳光或室内打光不均导致的轻微曝光过度,整体呈现出一种刻意的平庸感,就像是不小心拍到的一张自拍。主角是一个20岁的中国大波浪美女!大眼睛双眼皮!五官精致!穿一套黄色足球服,微笑着!他左边是穿着便装的C罗,他右边是穿着便装的梅西,他们三人在外滩合影,背后是陆家嘴夜景"
|
||||
);
|
||||
Global.spaceImagesDesc.push(
|
||||
"抽象风格 弥散渐变,以抽象的图形为主。极简,组合,灵动,克莱因蓝加紫色渐变,发光,超细节,高画质,4k"
|
||||
);
|
||||
for (let i = 0; i < 12; i++) {
|
||||
if (i === 4 || i === 8) {
|
||||
continue;
|
||||
}
|
||||
Global.spaceImages.push({
|
||||
id: i.toString(),
|
||||
// url:
|
||||
// i === 0
|
||||
// ? "https://xy88.fun/tmp/assets/Art0/P01.jpg"
|
||||
// : `./assets/image/firespace/thumb/${i + 1}.jpg`,
|
||||
url: `./assets/image/firespace/thumb/${i + 1}.jpg`,
|
||||
prompt: Global.spaceImagesDesc[i],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static selectImage(id: string) {
|
||||
const imageInfo = Global.spaceImages.find((s) => s.id === id);
|
||||
return imageInfo;
|
||||
}
|
||||
}
|
||||
|
||||
Global.init();
|
||||
38
src/apis/ComfyApi.ts
Normal file
@ -0,0 +1,38 @@
|
||||
import axios from "axios";
|
||||
import { HttpTool } from "../tools/HttpTool";
|
||||
import { WorkflowType } from "./enums/WorkflowType";
|
||||
|
||||
export class ComfyApi {
|
||||
|
||||
public static async imageSplit({
|
||||
url = "",
|
||||
object_name = ""
|
||||
}): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Comfy/SplitImage`, {
|
||||
url: url,
|
||||
object_name: object_name
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
public static async getGenerationResult({
|
||||
prompt_id = "",
|
||||
workflow_type = WorkflowType.None
|
||||
}): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Comfy/GetGenerationResult`, {
|
||||
prompt_id: prompt_id,
|
||||
workflow_type: workflow_type
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
return result?.data!;
|
||||
}
|
||||
}
|
||||
35
src/apis/ModelApi.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import axios from "axios";
|
||||
import { HttpTool } from "../tools/HttpTool";
|
||||
|
||||
export class ModelApi {
|
||||
public static async addOrUpdateModel(model: any): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Model/AddOrUpdateModel`, model)
|
||||
.catch((err) => {
|
||||
console.log("err:" + err);
|
||||
});
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
public static async modelList(pageData: any): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Model/ModelList`, pageData)
|
||||
.catch((err) => {
|
||||
console.log("err:" + err);
|
||||
});
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
public static async modelById(id: string): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Model/ModelById`, id, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("err:" + err);
|
||||
});
|
||||
return result?.data!;
|
||||
}
|
||||
}
|
||||
26
src/apis/ModelPartApi.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import axios from "axios";
|
||||
import { HttpTool } from "../tools/HttpTool";
|
||||
|
||||
export class ModelPartApi {
|
||||
public static async addOrUpdateModelParts(model: any): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/ModelPart/AddOrUpdateModelParts`, model)
|
||||
.catch((err) => {
|
||||
console.log("err:" + err);
|
||||
});
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
public static async modelPartsFormModelId(modelId: string): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/ModelPart/ModePartsFormModelId`, modelId, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("err:" + err);
|
||||
});
|
||||
return result?.data!;
|
||||
}
|
||||
}
|
||||
14
src/apis/OrderApi.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import axios from "axios";
|
||||
import { HttpTool } from "../tools/HttpTool";
|
||||
import type { SubmitOrder } from "../edit/entities/SubmitOrder";
|
||||
|
||||
export class OrderApi {
|
||||
public static async guestPlaceOrder(submitOrder: SubmitOrder): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Order/GuestPlaceOrder`, submitOrder)
|
||||
.catch((err) => {
|
||||
console.log("err:" + err);
|
||||
});
|
||||
return result?.data!;
|
||||
}
|
||||
}
|
||||
104
src/apis/OssApi.ts
Normal file
@ -0,0 +1,104 @@
|
||||
import axios from "axios";
|
||||
import { HttpTool } from "../tools/HttpTool";
|
||||
import OSS from "ali-oss";
|
||||
|
||||
export class OssApi {
|
||||
public static async uploadFileToOss(
|
||||
objectName: string,
|
||||
file: Blob,
|
||||
expiresAt: string | null = null
|
||||
) {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Oss/GetOssInfo`)
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
const info = result?.data!;
|
||||
if (!info) {
|
||||
return null;
|
||||
}
|
||||
const store = new OSS({
|
||||
accessKeyId: info.token.accessKeyId,
|
||||
accessKeySecret: info.token.accessKeySecret,
|
||||
stsToken: info.token.securityToken,
|
||||
bucket: info.bucket,
|
||||
secure: true,
|
||||
endpoint: info.endpoint,
|
||||
refreshSTSToken: async () => {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Oss/GetOssInfo`)
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
const info = result?.data!;
|
||||
if (!info) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
accessKeyId: info.token.accessKeyId,
|
||||
accessKeySecret: info.token.accessKeySecret,
|
||||
stsToken: info.token.securityToken,
|
||||
secure: true,
|
||||
bucket: info.bucket,
|
||||
endpoint: info.endpoint,
|
||||
};
|
||||
},
|
||||
refreshSTSTokenInterval: 300000,
|
||||
});
|
||||
let headers = {};
|
||||
if (expiresAt) {
|
||||
headers = {
|
||||
Expires: expiresAt,
|
||||
};
|
||||
}
|
||||
const putResult = await store.put(objectName, file, {
|
||||
headers: headers,
|
||||
});
|
||||
return putResult;
|
||||
}
|
||||
|
||||
public static async deleteFileFromOss(objectNames: Array<string>) {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Oss/GetOssInfo`)
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
const info = result?.data!;
|
||||
if (!info) {
|
||||
return null;
|
||||
}
|
||||
const store = new OSS({
|
||||
accessKeyId: info.token.accessKeyId,
|
||||
accessKeySecret: info.token.accessKeySecret,
|
||||
stsToken: info.token.securityToken,
|
||||
bucket: info.bucket,
|
||||
secure: true,
|
||||
endpoint: info.endpoint,
|
||||
refreshSTSToken: async () => {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Oss/GetOssInfo`)
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
const info = result?.data!;
|
||||
if (!info) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
accessKeyId: info.token.accessKeyId,
|
||||
accessKeySecret: info.token.accessKeySecret,
|
||||
stsToken: info.token.securityToken,
|
||||
secure: true,
|
||||
bucket: info.bucket,
|
||||
endpoint: info.endpoint,
|
||||
};
|
||||
},
|
||||
refreshSTSTokenInterval: 300000,
|
||||
});
|
||||
let deleteResult = await store.deleteMulti(objectNames);
|
||||
return deleteResult;
|
||||
}
|
||||
}
|
||||
29
src/apis/SvgApi.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import axios from "axios";
|
||||
import { HttpTool } from "../tools/HttpTool";
|
||||
|
||||
export class SvgApi {
|
||||
public static async convertToSvg({
|
||||
url = "",
|
||||
color_count = 32,
|
||||
isScaleIn = false,
|
||||
dithering = "None",
|
||||
isStackTracing = true,
|
||||
object_name = ""
|
||||
}): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Svg/ConvertToSvg`, {
|
||||
url: url,
|
||||
color_count: color_count,
|
||||
isScaleIn: isScaleIn,
|
||||
dithering: dithering,
|
||||
isStackTracing: isStackTracing,
|
||||
object_name: object_name
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("err:" + err);
|
||||
});
|
||||
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
}
|
||||
13
src/apis/SyncImageApi.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import axios from "axios";
|
||||
import { HttpTool } from "../tools/HttpTool";
|
||||
|
||||
export class SyncImageApi {
|
||||
public static async sync(data: any): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/SyncImage/Sync`, data)
|
||||
.catch((err) => {
|
||||
console.log("err:" + err);
|
||||
});
|
||||
return result?.data!;
|
||||
}
|
||||
}
|
||||
183
src/apis/VolApi.ts
Normal file
@ -0,0 +1,183 @@
|
||||
import axios from "axios";
|
||||
import { HttpTool } from "../tools/HttpTool";
|
||||
|
||||
export class VolApi {
|
||||
public static async getVolImageUrl({
|
||||
prompt = "",
|
||||
width = 1328,
|
||||
height = 1328,
|
||||
seed = "-1",
|
||||
llm_result = "",
|
||||
image_url = "",
|
||||
isWhiteBG = false,
|
||||
}): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Vol/CreateImageUrl`, {
|
||||
prompt: prompt,
|
||||
image_url: image_url,
|
||||
width: width,
|
||||
height: height,
|
||||
seed: seed,
|
||||
llm_result: llm_result,
|
||||
isWhiteBG: isWhiteBG,
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("err:" + err);
|
||||
});
|
||||
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
public static async getScaleImageUrl({
|
||||
fileNames = new Array<string>(),
|
||||
top = "0",
|
||||
bottom = "0",
|
||||
left = "0",
|
||||
right = "0",
|
||||
max_width = 1920,
|
||||
max_height = 1920,
|
||||
}): Promise<any> {
|
||||
// console.log({
|
||||
// fileNames: fileNames,
|
||||
// top: top,
|
||||
// bottom: bottom,
|
||||
// left: left,
|
||||
// right: right,
|
||||
// });
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Vol/CreateScaleImageUrl`, {
|
||||
fileNames: fileNames,
|
||||
top: top,
|
||||
bottom: bottom,
|
||||
left: left,
|
||||
right: right,
|
||||
max_width: max_width,
|
||||
max_height: max_height,
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
public static async getAlphaBgImageUrl({
|
||||
prompt = "",
|
||||
width = 1328,
|
||||
height = 1328,
|
||||
seed = "-1",
|
||||
llm_result = "",
|
||||
isWhiteBG = true,
|
||||
}): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Vol/CreateAlphaBgImageUrl`, {
|
||||
prompt: prompt,
|
||||
width: width,
|
||||
height: height,
|
||||
seed: seed,
|
||||
llm_result: llm_result,
|
||||
isWhiteBG: isWhiteBG,
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
|
||||
public static async splitImage({
|
||||
url = "",
|
||||
object_name = ""
|
||||
}): Promise<any> {
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Vol/SplitImage`, {
|
||||
url: url,
|
||||
object_name: object_name
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
public static async changeCloth({
|
||||
model_url = "",
|
||||
cloth_url = "",
|
||||
cloth_type = "upper",
|
||||
}): Promise<any> {
|
||||
// console.log({
|
||||
// fileNames: fileNames,
|
||||
// top: top,
|
||||
// bottom: bottom,
|
||||
// left: left,
|
||||
// right: right,
|
||||
// });
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Vol/ChangeCloth`, {
|
||||
model_url: model_url,
|
||||
cloth_url: cloth_url,
|
||||
cloth_type: cloth_type,
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
public static async createVideo({
|
||||
image_urls = new Array<string>(),
|
||||
prompt = "",
|
||||
aspect_ratio = "1:1",
|
||||
}): Promise<any> {
|
||||
// console.log({
|
||||
// fileNames: fileNames,
|
||||
// top: top,
|
||||
// bottom: bottom,
|
||||
// left: left,
|
||||
// right: right,
|
||||
// });
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Vol/CreateVideo`, {
|
||||
image_urls: image_urls,
|
||||
prompt: prompt,
|
||||
aspect_ratio: aspect_ratio,
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
public static async queryTask({
|
||||
task_type = "",
|
||||
action = "",
|
||||
task_id = "",
|
||||
}): Promise<any> {
|
||||
// console.log({
|
||||
// fileNames: fileNames,
|
||||
// top: top,
|
||||
// bottom: bottom,
|
||||
// left: left,
|
||||
// right: right,
|
||||
// });
|
||||
const result = await axios
|
||||
.post(`${HttpTool.baseUrl}/api/Vol/QueryTask`, {
|
||||
task_type: task_type,
|
||||
action: action,
|
||||
task_id: task_id,
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
return result?.data!;
|
||||
}
|
||||
|
||||
// public static async test(prompt: string): Promise<any> {
|
||||
// console.log("AAA:" + prompt);
|
||||
// }
|
||||
}
|
||||
75
src/apis/dto/ModelPart.ts
Normal file
@ -0,0 +1,75 @@
|
||||
export class ModelPart {
|
||||
public id: string = "";
|
||||
public modelId: string = "";
|
||||
|
||||
/**
|
||||
* 部件关键字(对应模型部件材质名称,唯一)
|
||||
*/
|
||||
public partKey: string = "";
|
||||
/**
|
||||
* 片材名(显示用)
|
||||
*/
|
||||
public partName: string = "";
|
||||
|
||||
/**
|
||||
* 编辑蒙板图
|
||||
*/
|
||||
public maskImageUrl: string = "";
|
||||
|
||||
public uvx: number = 0;
|
||||
public uvy: number = 0;
|
||||
public uvWidth: number = 0;
|
||||
public uvHeight: number = 0;
|
||||
|
||||
public productImageX: number = 0;
|
||||
public productImageY: number = 0;
|
||||
public productImageWidth: number = 0;
|
||||
public productImageHeight: number = 0;
|
||||
|
||||
public partColor: string = "#FFFFFF";
|
||||
|
||||
/**
|
||||
* 是否可以编辑图片
|
||||
*/
|
||||
public isCanEditPicture: boolean = true;
|
||||
|
||||
/**
|
||||
* 是否可以编辑颜色
|
||||
*/
|
||||
public isCanEditColor: boolean = true;
|
||||
/**
|
||||
* 片裁排序值,越小的在越前面
|
||||
*/
|
||||
public sort: number = 0;
|
||||
|
||||
/**
|
||||
* 选择当前材质后,摄像头的Alpha值
|
||||
*/
|
||||
public alpha: number = 0;
|
||||
/**
|
||||
* 选择当前材质后,摄像头的Beta值
|
||||
*/
|
||||
public beta: number = 0;
|
||||
/**
|
||||
* 选择当前材质后,摄像头的Radius值
|
||||
*/
|
||||
public radius: number = 0;
|
||||
/**
|
||||
* 选择当前材质后,摄像头的Alpha值,js number 提交后台会损失精度,字符串提交后台精确值
|
||||
*/
|
||||
public alphaStr: string = "0";
|
||||
/**
|
||||
* 选择当前材质后,摄像头的Beta值,js number 提交后台会损失精度,字符串提交后台精确值
|
||||
*/
|
||||
public betaStr: string = "0";
|
||||
/**
|
||||
* 选择当前材质后,摄像头的Radius值,js number 提交后台会损失精度,字符串提交后台精确值
|
||||
*/
|
||||
public radiusStr: string = "0";
|
||||
/**
|
||||
* 蒙板图缩放值
|
||||
*/
|
||||
public maskScale: number = 1;
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
6
src/apis/enums/WorkflowType.ts
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
export enum WorkflowType {
|
||||
None = 0,
|
||||
Qwen = 1,
|
||||
SplitImage = 2
|
||||
}
|
||||
BIN
src/assets/font/PingFangSC-Medium.ttf
Normal file
BIN
src/assets/image/Back Arrow Dark.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
src/assets/image/audio-input.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/image/close.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/image/close2.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/assets/image/completed.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
src/assets/image/design/hover-tip.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/image/design/left/T区域.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
src/assets/image/design/left/颜色.png
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
src/assets/image/design/mobile/图层.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
src/assets/image/design/mobile/对齐.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
src/assets/image/design/mobile/旋转.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
src/assets/image/design/mobile/添加图片.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
src/assets/image/design/mobile/缩放.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
src/assets/image/design/mobile/背景消除.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
src/assets/image/design/mobile/选中图层.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
src/assets/image/design/mobile/镜像.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
src/assets/image/design/mobile/颜色.png
Normal file
|
After Width: | Height: | Size: 188 KiB |
BIN
src/assets/image/design/right/Beto.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
src/assets/image/design/right/SVG.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/image/design/right/sub-menu/align-bottom.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
src/assets/image/design/right/sub-menu/align-horizontally.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/image/design/right/sub-menu/align-left.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/image/design/right/sub-menu/align-right.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/image/design/right/sub-menu/align-top.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
src/assets/image/design/right/sub-menu/align-vertically.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/image/design/right/sub-menu/mirror-x.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/image/design/right/sub-menu/mirror-y.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/image/design/right/sub-menu/rotate-left.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/image/design/right/sub-menu/rotate-right.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/image/design/right/sub-menu/search-zoom-in.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
src/assets/image/design/right/sub-menu/search-zoom-out.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
src/assets/image/design/right/元素消除.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/image/design/right/关闭.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/image/design/right/图层.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/image/design/right/对齐.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/image/design/right/导出.png
Normal file
|
After Width: | Height: | Size: 25 KiB |