gl-draw 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/package.json +4 -4
  2. package/dist/constants.d.ts +0 -4
  3. package/dist/core/BaseObject.d.ts +0 -45
  4. package/dist/core/CSSRenderer/CSS2DRenderer.d.ts +0 -17
  5. package/dist/core/CSSRenderer/index.d.ts +0 -19
  6. package/dist/core/Camera.d.ts +0 -30
  7. package/dist/core/Composer.d.ts +0 -60
  8. package/dist/core/Control.d.ts +0 -28
  9. package/dist/core/GUIObject.d.ts +0 -24
  10. package/dist/core/Pencil.d.ts +0 -146
  11. package/dist/core/Renderer.d.ts +0 -51
  12. package/dist/core/Scene.d.ts +0 -19
  13. package/dist/core/pass/bloom/UnrealBloomPass.d.ts +0 -46
  14. package/dist/core/pass/bloom/index.d.ts +0 -33
  15. package/dist/core/pass/outline/index.d.ts +0 -37
  16. package/dist/core/pass/ssr/index.d.ts +0 -38
  17. package/dist/effect/bloom.d.ts +0 -14
  18. package/dist/effect/index.d.ts +0 -5
  19. package/dist/effect/index.js +0 -160
  20. package/dist/effect/index.module.js +0 -160
  21. package/dist/effect/outline.d.ts +0 -15
  22. package/dist/effect/scan.d.ts +0 -39
  23. package/dist/effect/scan2.d.ts +0 -28
  24. package/dist/effect/ssr.d.ts +0 -15
  25. package/dist/geojson/china.json +0 -103310
  26. package/dist/geojson/countries.json +0 -27483
  27. package/dist/index.d.ts +0 -3
  28. package/dist/index.js +0 -57
  29. package/dist/index.module.js +0 -57
  30. package/dist/objects/conicPolygon/geometry/index.d.ts +0 -32
  31. package/dist/objects/conicPolygon/geometry/triangulate.d.ts +0 -11
  32. package/dist/objects/conicPolygon/index.d.ts +0 -19
  33. package/dist/objects/extrudePolygon/coords2Vector.d.ts +0 -7
  34. package/dist/objects/extrudePolygon/createGeometry.d.ts +0 -8
  35. package/dist/objects/extrudePolygon/getWorkerGeometry.d.ts +0 -16
  36. package/dist/objects/extrudePolygon/index.d.ts +0 -37
  37. package/dist/objects/extrudePolygon/w.d.ts +0 -1
  38. package/dist/objects/fix.d.ts +0 -2
  39. package/dist/objects/image/index.d.ts +0 -24
  40. package/dist/objects/index.d.ts +0 -10
  41. package/dist/objects/index.js +0 -132
  42. package/dist/objects/index.module.js +0 -132
  43. package/dist/objects/line/coords2Vector.d.ts +0 -7
  44. package/dist/objects/line/createGeometry.d.ts +0 -8
  45. package/dist/objects/line/getWorkerGeometry.d.ts +0 -15
  46. package/dist/objects/line/index.d.ts +0 -44
  47. package/dist/objects/line/meshLine/index.d.ts +0 -89
  48. package/dist/objects/line/meshLine/shader/fragment.d.ts +0 -2
  49. package/dist/objects/line/meshLine/shader/vertex.d.ts +0 -2
  50. package/dist/objects/line/w.d.ts +0 -1
  51. package/dist/objects/node/index.d.ts +0 -30
  52. package/dist/objects/text/index.d.ts +0 -23
  53. package/dist/objects/video/index.d.ts +0 -31
  54. package/dist/plugins/Cache.d.ts +0 -8
  55. package/dist/plugins/Data.d.ts +0 -8
  56. package/dist/plugins/Draw.d.ts +0 -35
  57. package/dist/plugins/Worker.d.ts +0 -31
  58. package/dist/plugins/index.d.ts +0 -4
  59. package/dist/plugins/index.js +0 -1
  60. package/dist/plugins/index.module.js +0 -1
  61. package/dist/shims.d.ts +0 -5
  62. package/dist/utils/chain.d.ts +0 -23
  63. package/dist/utils/colorCorrection.d.ts +0 -2
  64. package/dist/utils/disposeMesh.d.ts +0 -2
  65. package/dist/utils/exception.d.ts +0 -26
  66. package/dist/utils/getCache.d.ts +0 -13
  67. package/dist/utils/getElementView.d.ts +0 -2
  68. package/dist/utils/index.d.ts +0 -11
  69. package/dist/utils/index.js +0 -1
  70. package/dist/utils/index.module.js +0 -1
  71. package/dist/utils/isPlainObject.d.ts +0 -1
  72. package/dist/utils/makePromiseCreator.d.ts +0 -6
  73. package/dist/utils/polar2Cartesian.d.ts +0 -1
  74. package/dist/utils/timer.d.ts +0 -9
  75. package/dist/utils/to.d.ts +0 -8
  76. package/dist/utils/uvGenerator.d.ts +0 -9
  77. package/dist/workers/extrudePolygon.js +0 -3046
  78. package/dist/workers/line.js +0 -3177
@@ -1,89 +0,0 @@
1
- import * as THREE from 'three';
2
-
3
- export class MeshLine extends THREE.BufferGeometry {
4
- constructor();
5
-
6
- geometry: MeshLine;
7
-
8
- points: Float32Array | Array<number>;
9
-
10
- isMeshLine: boolean;
11
-
12
- setPoints(
13
- points: Float32Array | Array<number>,
14
- wcb?: (p: number) => any
15
- ): void;
16
-
17
- setMatrixWorld(matrixWorld: THREE.Matrix4): void;
18
-
19
- setGeometry(g: THREE.BufferGeometry, c?: (p: number) => any): void;
20
-
21
- raycast: (
22
- raycaster: THREE.Raycaster,
23
- intersects: THREE.Intersection[]
24
- ) => void;
25
-
26
- compareV3(a: number, b: number): number;
27
-
28
- copyV3(a: number): [number, number, number];
29
- }
30
-
31
- export class MeshLineMaterial extends THREE.ShaderMaterial {
32
- constructor(parameters?: {
33
- resolution: THREE.Vector2; // required
34
- lineWidth?: number;
35
- map?: THREE.Texture;
36
- useMap?: number;
37
- alphaMap?: THREE.Texture;
38
- useAlphaMap?: number;
39
- color?: string | THREE.Color | number;
40
- opacity?: number;
41
- sizeAttenuation?: number;
42
- dashArray?: number;
43
- dashOffset?: number;
44
- dashRatio?: number;
45
- useDash?: number;
46
- visibility?: number;
47
- alphaTest?: number;
48
- repeat?: THREE.Vector2;
49
- transparent?: boolean;
50
- depthTest?: boolean;
51
- });
52
-
53
- lineWidth: number;
54
-
55
- map: THREE.Texture;
56
-
57
- useMap: number;
58
-
59
- alphaMap: THREE.Texture;
60
-
61
- useAlphaMap: number;
62
-
63
- color: THREE.Color | string | number;
64
-
65
- opacity: number;
66
-
67
- resolution: THREE.Vector2;
68
-
69
- sizeAttenuation: number;
70
-
71
- dashArray: number;
72
-
73
- dashOffset: number;
74
-
75
- dashRatio: number;
76
-
77
- useDesh: number;
78
-
79
- visibility: number;
80
-
81
- alphaTest: number;
82
-
83
- repeat: THREE.Vector2;
84
- }
85
-
86
- export function MeshLineRaycast(
87
- raycaster: THREE.Raycaster,
88
- intersects: THREE.Intersection[]
89
- ): void;
@@ -1,2 +0,0 @@
1
- declare const _default: string;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: string;
2
- export default _default;
@@ -1 +0,0 @@
1
- export {};
@@ -1,30 +0,0 @@
1
- import * as THREE from 'three';
2
- import BaseObject from '../../core/BaseObject';
3
- import Cache from '../../plugins/Cache';
4
- import { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer';
5
- interface Options {
6
- children: HTMLElement;
7
- position?: THREE.Vector3;
8
- event?: string;
9
- eventTarge?: string[];
10
- handler?: (event: Event) => void;
11
- zIndexFix?: number;
12
- }
13
- export declare class Node extends BaseObject {
14
- options: Options;
15
- pickObject?: THREE.Sprite;
16
- object3d: CSS2DObject;
17
- element: HTMLDivElement;
18
- constructor(options: Options);
19
- get clickTarge(): HTMLDivElement[];
20
- create(): void;
21
- getMaterial(show: boolean): Promise<THREE.SpriteMaterial>;
22
- createPickObject({ show, scale, position, cache, }: {
23
- show?: boolean;
24
- scale?: THREE.Vector3;
25
- position?: THREE.Vector3;
26
- cache?: Cache;
27
- }): Promise<void>;
28
- dispose(): void;
29
- }
30
- export default Node;
@@ -1,23 +0,0 @@
1
- import * as THREE from 'three';
2
- import BaseObject from '../../core/BaseObject';
3
- interface Options {
4
- position: THREE.Vector3;
5
- text: string;
6
- fontSize?: number;
7
- scale?: number;
8
- fontFamily?: string;
9
- fontWeight?: string;
10
- flipX?: boolean;
11
- lookAt?: THREE.Vector3;
12
- sprite?: boolean;
13
- sizeAttenuation?: boolean;
14
- }
15
- export default class extends BaseObject {
16
- options: Omit<Required<Options>, 'lookAt'> & Pick<Options, 'lookAt'>;
17
- width: number;
18
- canvas: HTMLCanvasElement;
19
- constructor(options: Options);
20
- create(): void;
21
- setText(t: string, options?: Pick<Options, 'fontSize' | 'fontFamily' | 'flipX'>): void;
22
- }
23
- export {};
@@ -1,31 +0,0 @@
1
- import * as THREE from 'three';
2
- import BaseObject from '../../core/BaseObject';
3
- import Cache from '../../plugins/Cache';
4
- interface Options {
5
- src: string;
6
- scale?: number;
7
- position?: THREE.Vector3;
8
- cache?: Cache;
9
- transparent?: boolean;
10
- blending?: THREE.Blending;
11
- depthWrite?: boolean;
12
- alphaTest?: number;
13
- autoPlay?: boolean;
14
- loop?: boolean;
15
- format?: THREE.PixelFormat;
16
- sprite?: boolean;
17
- }
18
- export default class extends BaseObject {
19
- options: Options & {
20
- autoPlay: boolean;
21
- loop: boolean;
22
- };
23
- video: HTMLVideoElement;
24
- constructor(options: Options);
25
- getMaterial(): Promise<any>;
26
- create(): Promise<void>;
27
- setScale(n: number): void;
28
- render(): void;
29
- dispose(): void;
30
- }
31
- export {};
@@ -1,8 +0,0 @@
1
- export default class {
2
- cache: Map<any, any>;
3
- install(): void;
4
- init(key: string): void;
5
- get(key: string): any;
6
- set(key: string, value: any): void;
7
- dispose(): void;
8
- }
@@ -1,8 +0,0 @@
1
- export default class DataController<T> {
2
- data: Partial<T>;
3
- install(): void;
4
- cb?: (type: keyof T) => void;
5
- setData(key: keyof T, value: any): void;
6
- runAll(): void;
7
- dispose(): void;
8
- }
@@ -1,35 +0,0 @@
1
- import { IBaseObject } from '../core/BaseObject';
2
- import Pencil from '../core/Pencil';
3
- declare type KeyOf<T extends object> = Extract<keyof T, string>;
4
- export default class Draw<T extends {
5
- [key: string]: new (...args: any[]) => IBaseObject;
6
- }> {
7
- pencil: Pencil;
8
- private objects_;
9
- private objectNamesToFactories;
10
- private objects;
11
- get objectsPromise(): Promise<any>[];
12
- constructor(objects: T);
13
- install(pencil: Pencil): void;
14
- initObjectFactories(): void;
15
- getObject<Y extends KeyOf<T>>(nameOrigin: Y, options?: {
16
- key: string;
17
- }): InstanceType<T[Y]> | undefined;
18
- getAllObject<Y extends KeyOf<T>>(nameOrigin: Y, options?: {
19
- key: string;
20
- }): InstanceType<T[Y]>[];
21
- draw<Y extends KeyOf<T>, U extends KeyOf<T> | `${KeyOf<T>}#${string}` | IBaseObject>(nameOrigin: Y, options?: ConstructorParameters<T[Y]>[0] extends undefined ? {
22
- key?: string;
23
- target?: U;
24
- } : ConstructorParameters<T[Y]>[0] & {
25
- key?: string;
26
- target?: U;
27
- }, target?: U): Promise<InstanceType<T[Y]>>;
28
- private addMesh;
29
- erase(...args: (KeyOf<T> | `${KeyOf<T>}#${string}` | InstanceType<T[keyof T]>)[]): void;
30
- private removeMesh;
31
- update(delta: number, elapsed: number): void;
32
- setSize(width: number, height: number): void;
33
- dispose(): void;
34
- }
35
- export {};
@@ -1,31 +0,0 @@
1
- declare type GetWk = () => Worker;
2
- interface Options {
3
- cache?: boolean;
4
- cacheVersion?: string;
5
- }
6
- export default class {
7
- workerList: {
8
- worker: Worker;
9
- inUse: boolean;
10
- }[];
11
- options: Required<Options>;
12
- constructor(options?: Options);
13
- install(): void;
14
- init(scriptURL: string | GetWk, length: number): void;
15
- messageList: {
16
- req: Record<string, any>;
17
- options: {
18
- cb: any;
19
- cacheVersion?: string;
20
- };
21
- uuid: string;
22
- inUse: boolean;
23
- }[];
24
- postMessage(req: Record<string, any>, options: {
25
- cb: any;
26
- cacheVersion?: string;
27
- }): void;
28
- checkMessage(): void;
29
- dispose(): void;
30
- }
31
- export {};
@@ -1,4 +0,0 @@
1
- export { default as Cache } from './Cache';
2
- export { default as Draw } from './Draw';
3
- export { default as Data } from './Data';
4
- export { default as Wk } from './Worker';
@@ -1 +0,0 @@
1
- (function(){var X={666:function(_){var g=function(v){"use strict";var M=Object.prototype,k=M.hasOwnProperty,d,T=typeof Symbol=="function"?Symbol:{},b=T.iterator||"@@iterator",L=T.asyncIterator||"@@asyncIterator",E=T.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(t,n,h){return t[n]=h}}function S(e,t,n,h){var u=t&&t.prototype instanceof V?t:V,O=Object.create(u.prototype),w=new f(h||[]);return O._invoke=r(e,n,w),O}v.wrap=S;function C(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(h){return{type:"throw",arg:h}}}var R="suspendedStart",Z="suspendedYield",W="executing",H="completed",j={};function V(){}function y(){}function m(){}var P={};p(P,b,function(){return this});var G=Object.getPrototypeOf,z=G&&G(G(A([])));z&&z!==M&&k.call(z,b)&&(P=z);var a=m.prototype=V.prototype=Object.create(P);y.prototype=m,p(a,"constructor",m),p(m,"constructor",y),y.displayName=p(m,E,"GeneratorFunction");function o(e){["next","throw","return"].forEach(function(t){p(e,t,function(n){return this._invoke(t,n)})})}v.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===y||(t.displayName||t.name)==="GeneratorFunction":!1},v.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,p(e,E,"GeneratorFunction")),e.prototype=Object.create(a),e},v.awrap=function(e){return{__await:e}};function i(e,t){function n(O,w,D,N){var I=C(e[O],e,w);if(I.type==="throw")N(I.arg);else{var $=I.arg,B=$.value;return B&&typeof B=="object"&&k.call(B,"__await")?t.resolve(B.__await).then(function(F){n("next",F,D,N)},function(F){n("throw",F,D,N)}):t.resolve(B).then(function(F){$.value=F,D($)},function(F){return n("throw",F,D,N)})}}var h;function u(O,w){function D(){return new t(function(N,I){n(O,w,N,I)})}return h=h?h.then(D,D):D()}this._invoke=u}o(i.prototype),p(i.prototype,L,function(){return this}),v.AsyncIterator=i,v.async=function(e,t,n,h,u){u===void 0&&(u=Promise);var O=new i(S(e,t,n,h),u);return v.isGeneratorFunction(t)?O:O.next().then(function(w){return w.done?w.value:O.next()})};function r(e,t,n){var h=R;return function(O,w){if(h===W)throw new Error("Generator is already running");if(h===H){if(O==="throw")throw w;return U()}for(n.method=O,n.arg=w;;){var D=n.delegate;if(D){var N=s(D,n);if(N){if(N===j)continue;return N}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(h===R)throw h=H,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);h=W;var I=C(e,t,n);if(I.type==="normal"){if(h=n.done?H:Z,I.arg===j)continue;return{value:I.arg,done:n.done}}else I.type==="throw"&&(h=H,n.method="throw",n.arg=I.arg)}}}function s(e,t){var n=e.iterator[t.method];if(n===d){if(t.delegate=null,t.method==="throw"){if(e.iterator.return&&(t.method="return",t.arg=d,s(e,t),t.method==="throw"))return j;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return j}var h=C(n,e.iterator,t.arg);if(h.type==="throw")return t.method="throw",t.arg=h.arg,t.delegate=null,j;var u=h.arg;if(!u)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,j;if(u.done)t[e.resultName]=u.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=d);else return u;return t.delegate=null,j}o(a),p(a,E,"Generator"),p(a,b,function(){return this}),p(a,"toString",function(){return"[object Generator]"});function l(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function c(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(l,this),this.reset(!0)}v.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function h(){for(;t.length;){var u=t.pop();if(u in e)return h.value=u,h.done=!1,h}return h.done=!0,h}};function A(e){if(e){var t=e[b];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var n=-1,h=function u(){for(;++n<e.length;)if(k.call(e,n))return u.value=e[n],u.done=!1,u;return u.value=d,u.done=!0,u};return h.next=h}}return{next:U}}v.values=A;function U(){return{value:d,done:!0}}return f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(c),!e)for(var t in this)t.charAt(0)==="t"&&k.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=d)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(N,I){return O.type="throw",O.arg=e,t.next=N,I&&(t.method="next",t.arg=d),!!I}for(var h=this.tryEntries.length-1;h>=0;--h){var u=this.tryEntries[h],O=u.completion;if(u.tryLoc==="root")return n("end");if(u.tryLoc<=this.prev){var w=k.call(u,"catchLoc"),D=k.call(u,"finallyLoc");if(w&&D){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(w){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else if(D){if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var h=this.tryEntries[n];if(h.tryLoc<=this.prev&&k.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var u=h;break}}u&&(e==="break"||e==="continue")&&u.tryLoc<=t&&t<=u.finallyLoc&&(u=null);var O=u?u.completion:{};return O.type=e,O.arg=t,u?(this.method="next",this.next=u.finallyLoc,j):this.complete(O)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),j},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),c(n),j}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var h=n.completion;if(h.type==="throw"){var u=h.arg;c(n)}return u}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=d),j}},v}(_.exports);try{regeneratorRuntime=g}catch(v){typeof globalThis=="object"?globalThis.regeneratorRuntime=g:Function("r","regeneratorRuntime = r")(g)}},584:function(_,g,v){"use strict";v.d(g,{makePromiseCreator:function(){return M.Z}});var M=v(282),k=v(666),d=v.n(k),T=null,b=v(644);function L(j){if(j.material){var V=Array.isArray(j.material)?j.material:[j.material];V.forEach(function(y){var m,P;(m=y.color)===null||m===void 0||m.convertSRGBToLinear(),(P=y.emissive)===null||P===void 0||P.convertSRGBToLinear(),y.map&&(y.map.encoding=THREE.sRGBEncoding),y.emissiveMap&&(y.emissiveMap.encoding=THREE.sRGBEncoding)})}}var E=v(568),p=v(924),S=v(360),C=v(484),R=null,Z=null,W=function(){var j=(0,E.Z)(d().mark(function V(y,m){var P,G,z,a,o,i,r,s,l;return d().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return P=m.type,G=P===void 0?"blob":P,z=m.version,a=z===void 0?"1":z,f.next=4,(0,S.get)(y);case 4:if(i=f.sent,!(i&&i[a])){f.next=9;break}o=i[a],f.next=15;break;case 9:return f.next=11,(0,C.Z)(fetch(y).then(function(A){if(A.ok)return A[G]();throw new Error}));case 11:r=f.sent,s=r.res,l=r.err,l||(o=s,(0,S.set)(y,(0,p.Z)({},a,s)));case 15:return f.abrupt("return",o?{url:G==="json"?y:URL.createObjectURL(o),store:o}:{url:y});case 16:case"end":return f.stop()}},V)}));return function(y,m){return j.apply(this,arguments)}}(),H=v(705)},282:function(_,g,v){"use strict";v.d(g,{Z:function(){return k}});var M=v(484);function k(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b={};return b.promise=new Promise(function(L,E){b.resolve=L,b.reject=E}),d&&(b.promise=(0,M.Z)(b.promise,T)),b}},484:function(_,g,v){"use strict";v.d(g,{Z:function(){return k}});var M=v(42);function k(d){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return d.then(function(b){return(0,M.Z)({err:null,res:b},T)}).catch(function(b){return(0,M.Z)({err:b,res:void 0},T)})}},705:function(_,g,v){"use strict";var M=v(644),k=v.n(M),d=new Map,T=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(E,p,S,C,R){var Z=p[S*3],W=p[S*3+1],H=p[C*3],j=p[C*3+1],V=p[R*3],y=p[R*3+1],m;if(d.has(E))m=d.get(E);else{var P=L.box3||new THREE.Box3;if(!L.box3){var G=E.parameters.shapes.getPoints();P.setFromArray(G.map(function(r){return[r.x,r.y,0]}).flat())}var z=P.getSize(new THREE.Vector3);L.split&&(z.y/=L.split),m={box:P,size:z},d.set(E,m)}var a=m.box,o=m.size,i=L.split?1-L.split:0;return[new THREE.Vector2((Z-a.min.x)/o.x,(W-a.min.y)/o.y+i),new THREE.Vector2((H-a.min.x)/o.x,(j-a.min.y)/o.y+i),new THREE.Vector2((V-a.min.x)/o.x,(y-a.min.y)/o.y+i)]},generateSideWallUV:function(E,p,S,C,R,Z){var W=p[S*3],H=p[S*3+1],j=p[S*3+2],V=p[C*3],y=p[C*3+1],m=p[C*3+2],P=p[R*3],G=p[R*3+1],z=p[R*3+2],a=p[Z*3],o=p[Z*3+1],i=p[Z*3+2],r;if(d.has(p))r=d.get(p);else{var s=new THREE.Box3;s.setFromArray(p);var l=s.getSize(new THREE.Vector3);L.split&&(l.z/=1-L.split),r={box:s,size:l},d.set(p,r)}var c=r.box,f=r.size;return Math.abs(H-y)<Math.abs(W-V)?[new THREE.Vector2((W-c.min.x)/f.x,(j-c.min.z)/f.z),new THREE.Vector2((V-c.min.x)/f.x,(m-c.min.z)/f.z),new THREE.Vector2((P-c.min.x)/f.x,(z-c.min.z)/f.z),new THREE.Vector2((a-c.min.x)/f.x,(i-c.min.z)/f.z)]:[new THREE.Vector2((H-c.min.y)/f.y,(j-c.min.z)/f.z),new THREE.Vector2((y-c.min.y)/f.y,(m-c.min.z)/f.z),new THREE.Vector2((G-c.min.y)/f.y,(z-c.min.z)/f.z),new THREE.Vector2((o-c.min.y)/f.y,(i-c.min.z)/f.z)]}}},b=function(){d.clear()}},360:function(_){"use strict";_.exports=require("idb-keyval")},644:function(_){"use strict";_.exports=require("three")},568:function(_,g,v){"use strict";v.d(g,{Z:function(){return k}});function M(d,T,b,L,E,p,S){try{var C=d[p](S),R=C.value}catch(Z){b(Z);return}C.done?T(R):Promise.resolve(R).then(L,E)}function k(d){return function(){var T=this,b=arguments;return new Promise(function(L,E){var p=d.apply(T,b);function S(R){M(p,L,E,S,C,"next",R)}function C(R){M(p,L,E,S,C,"throw",R)}S(void 0)})}}},924:function(_,g,v){"use strict";v.d(g,{Z:function(){return M}});function M(k,d,T){return d in k?Object.defineProperty(k,d,{value:T,enumerable:!0,configurable:!0,writable:!0}):k[d]=T,k}},42:function(_,g,v){"use strict";v.d(g,{Z:function(){return k}});var M=v(924);function k(d){for(var T=1;T<arguments.length;T++){var b=arguments[T]!=null?arguments[T]:{},L=Object.keys(b);typeof Object.getOwnPropertySymbols=="function"&&(L=L.concat(Object.getOwnPropertySymbols(b).filter(function(E){return Object.getOwnPropertyDescriptor(b,E).enumerable}))),L.forEach(function(E){(0,M.Z)(d,E,b[E])})}return d}}},Y={};function x(_){var g=Y[_];if(g!==void 0)return g.exports;var v=Y[_]={exports:{}};return X[_](v,v.exports,x),v.exports}(function(){x.n=function(_){var g=_&&_.__esModule?function(){return _.default}:function(){return _};return x.d(g,{a:g}),g}})(),function(){x.d=function(_,g){for(var v in g)x.o(g,v)&&!x.o(_,v)&&Object.defineProperty(_,v,{enumerable:!0,get:g[v]})}}(),function(){x.o=function(_,g){return Object.prototype.hasOwnProperty.call(_,g)}}(),function(){x.r=function(_){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})}}();var K={};(function(){"use strict";x.r(K),x.d(K,{Cache:function(){return v},Data:function(){return y},Draw:function(){return V},Wk:function(){return z}});function _(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")}var g=x(584),v=function(){"use strict";function a(){_(this,a),this.cache=new Map}var o=a.prototype;return o.install=function(){},o.init=function(r){var s=(0,g.makePromiseCreator)();this.cache.set(r,s)},o.get=function(r){var s;return(s=this.cache.get(r))===null||s===void 0?void 0:s.promise},o.set=function(r,s){var l=this.cache.get(r);l?l.resolve(s):console.warn("init cache first")},o.dispose=function(){this.cache.forEach(function(r,s){r.reject("stop set cache:".concat(s))}),this.cache.clear()},a}(),M=x(568);function k(a,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(a,r.key,r)}}function d(a,o,i){return o&&k(a.prototype,o),i&&k(a,i),a}function T(a){if(Array.isArray(a))return a}function b(a){if(typeof Symbol!="undefined"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function L(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E(a,o){(o==null||o>a.length)&&(o=a.length);for(var i=0,r=new Array(o);i<o;i++)r[i]=a[i];return r}function p(a,o){if(!!a){if(typeof a=="string")return E(a,o);var i=Object.prototype.toString.call(a).slice(8,-1);if(i==="Object"&&a.constructor&&(i=a.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return E(a,o)}}function S(a,o){return T(a)||b(a,o)||p(a,o)||L()}function C(a){if(Array.isArray(a))return E(a)}function R(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Z(a){return C(a)||b(a)||p(a)||R()}var W=x(666),H=x.n(W),j=x(644),V=function(){"use strict";function a(i){_(this,a),this.objectNamesToFactories=new Map,this.objects=new Map,this.objects_=i}var o=a.prototype;return o.install=function(r){this.pencil=r,this.initObjectFactories()},o.initObjectFactories=function(){var r=this,s=this.objects_;Object.keys(s).forEach(function(l){var c=function(){function f(){_(this,f)}var A=f.prototype;return A.create=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new s[l](e)},f}();r.objectNamesToFactories.set(l,c)})},o.getObject=function(r,s){r.includes("#")&&console.warn("getObject:err:\u4E0D\u652F\u6301 #",r);var l=(s||{}).key,c="".concat(r).concat(l?"#".concat(l):""),f=this.objects.get(c);return f},o.getAllObject=function(r,s){r.includes("#")&&console.warn("getAllObject:err:\u4E0D\u652F\u6301 #",r);var l=(s||{}).key,c="".concat(r).concat(l?"#".concat(l):""),f=[];return this.objects.forEach(function(A,U){(U.startsWith("".concat(c,"#"))||U===c)&&f.push(A)}),f},o.draw=function(r,s,l){var c=this;return(0,M.Z)(H().mark(function f(){var A,U,e,t,n,h,u;return H().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(A=c.objectNamesToFactories.get(r),!A){w.next=15;break}return U=(s||{}).key,e="".concat(r).concat(U?"#".concat(U):""),c.objects.has(e)&&(t=j.MathUtils.generateUUID(),e+="#".concat(t)),n=(s==null?void 0:s.target)||l,typeof n=="string"?h=c.objects.get(n):(n==null?void 0:n.objecttype__)==="BaseObject"?h=n:h=c.pencil.scene,u=new A().create(s),u.pencil=c.pencil,u.key=e,c.objects.set(e,u),w.next=14,c.addMesh(u,h);case 14:return w.abrupt("return",u);case 15:throw new Error("Unrecognized:".concat(r));case 16:case"end":return w.stop()}},f)}))()},o.addMesh=function(r,s){return(0,M.Z)(H().mark(function l(){return H().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,r.create();case 2:r.object3d&&(r.object3d.userData.BaseObject_=r,s.add(r.object3d)),r.visible=!0,r.render(),r.pm.resolve();case 6:case"end":return f.stop()}},l)}))()},o.erase=function(){for(var r=arguments.length,s=new Array(r),l=0;l<r;l++)s[l]=arguments[l];var c=this;Z(s).forEach(function(f){var A=[];if(typeof f=="string"){var U,e=S(f.split("#"),2),t=e[0],n=e[1];(U=A).push.apply(U,Z(c.getAllObject(t,{key:n})))}else A.push(f);A.forEach(function(h){c.removeMesh(h)})})},o.removeMesh=function(r){var s=this,l=r.parent;r.object3d&&l.remove(r.object3d),r.traverse(function(c){c.visible=!1,c.dispose(),s.objects.delete(c.key)})},o.update=function(r,s){this.objects.forEach(function(l){l.update(r,s)})},o.setSize=function(r,s){this.objects.forEach(function(l){l.resize(r,s)})},o.dispose=function(){this.objects.forEach(function(r,s){r.dispose(),r.pm.reject("stop draw:".concat(s))}),this.objects.clear(),this.objectNamesToFactories.clear()},d(a,[{key:"objectsPromise",get:function(){var r=[];return this.objects.forEach(function(s){r.push(s.pm.promise)}),r}}]),a}(),y=function(){"use strict";function a(){_(this,a),this.data={}}var o=a.prototype;return o.install=function(){},o.setData=function(r,s){var l,c;this.data[r]=s,(c=(l=this).cb)===null||c===void 0||c.call(l,r)},o.runAll=function(){var r=this;Object.keys(this.data).forEach(function(s){var l,c;(c=(l=r).cb)===null||c===void 0||c.call(l,s)})},o.dispose=function(){this.data={},this.cb=void 0},a}(),m=x(924),P=x(42),G=x(360),z=function(){"use strict";function a(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_(this,a),this.messageList=[],this.options=(0,P.Z)({},{cache:!1,cacheVersion:"1"},i)}var o=a.prototype;return o.install=function(){},o.init=function(r,s){var l=this,c=this.options,f=c.cache,A=c.cacheVersion;this.workerList=Array.from({length:s},function(U,e){var t=typeof r=="string"?new Worker(r):r();return t.onmessage=function(n){var h=n.data,u=h.res,O=h.uuid,w=l.messageList.find(function(N){var I=N.uuid;return O===I});if(w==null||w.options.cb(u),l.workerList[e].inUse=!1,l.checkMessage(),f){var D=(w==null?void 0:w.options.cacheVersion)||A;(0,G.set)(O,(0,m.Z)({},D,u))}},{worker:t,inUse:!1}})},o.postMessage=function(r,s){var l=this,c=this.options,f=c.cache,A=c.cacheVersion;if(f&&!r.workerKey){console.warn("worker cache need workerKey");return}if(f&&r.workerKey&&r.delCache){console.warn("worker cache del: ".concat(r.workerKey)),(0,G.del)(r.workerKey);return}var U=r.workerKey||j.MathUtils.generateUUID();(f?(0,G.get)(U):Promise.resolve()).then(function(e){var t=s.cacheVersion||A;e&&e[t]?s.cb(e[t]):(l.messageList.push({req:r,options:s,uuid:U,inUse:!1}),l.checkMessage())}).catch(function(){console.warn("err:worker cache"),l.messageList.push({req:r,options:s,uuid:U,inUse:!1}),l.checkMessage()})},o.checkMessage=function(){var r=this.workerList.find(function(l){var c=l.inUse;return!c});if(r){var s=this.messageList.find(function(l){var c=l.inUse;return!c});s&&(s.inUse=!0,r.inUse=!0,r.worker.postMessage({req:s.req,uuid:s.uuid}))}},o.dispose=function(){this.workerList.forEach(function(r){var s=r.worker;s.terminate()}),this.workerList=[],this.messageList=[]},a}()})(),module.exports=K})();
@@ -1 +0,0 @@
1
- import*as X from"idb-keyval";import*as J from"three";var Q={666:function(b){var g=function(l){"use strict";var T=Object.prototype,m=T.hasOwnProperty,_,w=typeof Symbol=="function"?Symbol:{},y=w.iterator||"@@iterator",M=w.asyncIterator||"@@asyncIterator",p=w.toStringTag||"@@toStringTag";function E(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{E({},"")}catch(e){E=function(t,n,h){return t[n]=h}}function S(e,t,n,h){var f=t&&t.prototype instanceof G?t:G,O=Object.create(f.prototype),j=new v(h||[]);return O._invoke=r(e,n,j),O}l.wrap=S;function C(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(h){return{type:"throw",arg:h}}}var U="suspendedStart",W="suspendedYield",Z="executing",I="completed",L={};function G(){}function d(){}function k(){}var P={};E(P,y,function(){return this});var R=Object.getPrototypeOf,x=R&&R(R(A([])));x&&x!==T&&m.call(x,y)&&(P=x);var a=k.prototype=G.prototype=Object.create(P);d.prototype=k,E(a,"constructor",k),E(k,"constructor",d),d.displayName=E(k,p,"GeneratorFunction");function s(e){["next","throw","return"].forEach(function(t){E(e,t,function(n){return this._invoke(t,n)})})}l.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===d||(t.displayName||t.name)==="GeneratorFunction":!1},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,E(e,p,"GeneratorFunction")),e.prototype=Object.create(a),e},l.awrap=function(e){return{__await:e}};function o(e,t){function n(O,j,V,N){var D=C(e[O],e,j);if(D.type==="throw")N(D.arg);else{var $=D.arg,F=$.value;return F&&typeof F=="object"&&m.call(F,"__await")?t.resolve(F.__await).then(function(B){n("next",B,V,N)},function(B){n("throw",B,V,N)}):t.resolve(F).then(function(B){$.value=B,V($)},function(B){return n("throw",B,V,N)})}}var h;function f(O,j){function V(){return new t(function(N,D){n(O,j,N,D)})}return h=h?h.then(V,V):V()}this._invoke=f}s(o.prototype),E(o.prototype,M,function(){return this}),l.AsyncIterator=o,l.async=function(e,t,n,h,f){f===void 0&&(f=Promise);var O=new o(S(e,t,n,h),f);return l.isGeneratorFunction(t)?O:O.next().then(function(j){return j.done?j.value:O.next()})};function r(e,t,n){var h=U;return function(O,j){if(h===Z)throw new Error("Generator is already running");if(h===I){if(O==="throw")throw j;return z()}for(n.method=O,n.arg=j;;){var V=n.delegate;if(V){var N=c(V,n);if(N){if(N===L)continue;return N}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(h===U)throw h=I,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);h=Z;var D=C(e,t,n);if(D.type==="normal"){if(h=n.done?I:W,D.arg===L)continue;return{value:D.arg,done:n.done}}else D.type==="throw"&&(h=I,n.method="throw",n.arg=D.arg)}}}function c(e,t){var n=e.iterator[t.method];if(n===_){if(t.delegate=null,t.method==="throw"){if(e.iterator.return&&(t.method="return",t.arg=_,c(e,t),t.method==="throw"))return L;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return L}var h=C(n,e.iterator,t.arg);if(h.type==="throw")return t.method="throw",t.arg=h.arg,t.delegate=null,L;var f=h.arg;if(!f)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,L;if(f.done)t[e.resultName]=f.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=_);else return f;return t.delegate=null,L}s(a),E(a,p,"Generator"),E(a,y,function(){return this}),E(a,"toString",function(){return"[object Generator]"});function i(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function u(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function v(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(i,this),this.reset(!0)}l.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function h(){for(;t.length;){var f=t.pop();if(f in e)return h.value=f,h.done=!1,h}return h.done=!0,h}};function A(e){if(e){var t=e[y];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var n=-1,h=function f(){for(;++n<e.length;)if(m.call(e,n))return f.value=e[n],f.done=!1,f;return f.value=_,f.done=!0,f};return h.next=h}}return{next:z}}l.values=A;function z(){return{value:_,done:!0}}return v.prototype={constructor:v,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=_,this.done=!1,this.delegate=null,this.method="next",this.arg=_,this.tryEntries.forEach(u),!e)for(var t in this)t.charAt(0)==="t"&&m.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=_)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(N,D){return O.type="throw",O.arg=e,t.next=N,D&&(t.method="next",t.arg=_),!!D}for(var h=this.tryEntries.length-1;h>=0;--h){var f=this.tryEntries[h],O=f.completion;if(f.tryLoc==="root")return n("end");if(f.tryLoc<=this.prev){var j=m.call(f,"catchLoc"),V=m.call(f,"finallyLoc");if(j&&V){if(this.prev<f.catchLoc)return n(f.catchLoc,!0);if(this.prev<f.finallyLoc)return n(f.finallyLoc)}else if(j){if(this.prev<f.catchLoc)return n(f.catchLoc,!0)}else if(V){if(this.prev<f.finallyLoc)return n(f.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var h=this.tryEntries[n];if(h.tryLoc<=this.prev&&m.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var f=h;break}}f&&(e==="break"||e==="continue")&&f.tryLoc<=t&&t<=f.finallyLoc&&(f=null);var O=f?f.completion:{};return O.type=e,O.arg=t,f?(this.method="next",this.next=f.finallyLoc,L):this.complete(O)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),L},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),u(n),L}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var h=n.completion;if(h.type==="throw"){var f=h.arg;u(n)}return f}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=_),L}},l}(b.exports);try{regeneratorRuntime=g}catch(l){typeof globalThis=="object"?globalThis.regeneratorRuntime=g:Function("r","regeneratorRuntime = r")(g)}},584:function(b,g,l){l.d(g,{Mf:function(){return T.Z}});var T=l(282),m=l(666),_=l.n(m),w=null,y=l(949);function M(L){if(L.material){var G=Array.isArray(L.material)?L.material:[L.material];G.forEach(function(d){var k,P;(k=d.color)===null||k===void 0||k.convertSRGBToLinear(),(P=d.emissive)===null||P===void 0||P.convertSRGBToLinear(),d.map&&(d.map.encoding=THREE.sRGBEncoding),d.emissiveMap&&(d.emissiveMap.encoding=THREE.sRGBEncoding)})}}var p=l(568),E=l(924),S=l(77),C=l(484),U=null,W=null,Z=function(){var L=(0,p.Z)(_().mark(function G(d,k){var P,R,x,a,s,o,r,c,i;return _().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return P=k.type,R=P===void 0?"blob":P,x=k.version,a=x===void 0?"1":x,v.next=4,(0,S.get)(d);case 4:if(o=v.sent,!(o&&o[a])){v.next=9;break}s=o[a],v.next=15;break;case 9:return v.next=11,(0,C.Z)(fetch(d).then(function(A){if(A.ok)return A[R]();throw new Error}));case 11:r=v.sent,c=r.res,i=r.err,i||(s=c,(0,S.set)(d,(0,E.Z)({},a,c)));case 15:return v.abrupt("return",s?{url:R==="json"?d:URL.createObjectURL(s),store:s}:{url:d});case 16:case"end":return v.stop()}},G)}));return function(d,k){return L.apply(this,arguments)}}(),I=l(705)},282:function(b,g,l){l.d(g,{Z:function(){return m}});var T=l(484);function m(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y={};return y.promise=new Promise(function(M,p){y.resolve=M,y.reject=p}),_&&(y.promise=(0,T.Z)(y.promise,w)),y}},484:function(b,g,l){l.d(g,{Z:function(){return m}});var T=l(42);function m(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _.then(function(y){return(0,T.Z)({err:null,res:y},w)}).catch(function(y){return(0,T.Z)({err:y,res:void 0},w)})}},705:function(b,g,l){var T=l(949),m=new Map,_=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(M,p,E,S,C){var U=p[E*3],W=p[E*3+1],Z=p[S*3],I=p[S*3+1],L=p[C*3],G=p[C*3+1],d;if(m.has(M))d=m.get(M);else{var k=y.box3||new THREE.Box3;if(!y.box3){var P=M.parameters.shapes.getPoints();k.setFromArray(P.map(function(o){return[o.x,o.y,0]}).flat())}var R=k.getSize(new THREE.Vector3);y.split&&(R.y/=y.split),d={box:k,size:R},m.set(M,d)}var x=d.box,a=d.size,s=y.split?1-y.split:0;return[new THREE.Vector2((U-x.min.x)/a.x,(W-x.min.y)/a.y+s),new THREE.Vector2((Z-x.min.x)/a.x,(I-x.min.y)/a.y+s),new THREE.Vector2((L-x.min.x)/a.x,(G-x.min.y)/a.y+s)]},generateSideWallUV:function(M,p,E,S,C,U){var W=p[E*3],Z=p[E*3+1],I=p[E*3+2],L=p[S*3],G=p[S*3+1],d=p[S*3+2],k=p[C*3],P=p[C*3+1],R=p[C*3+2],x=p[U*3],a=p[U*3+1],s=p[U*3+2],o;if(m.has(p))o=m.get(p);else{var r=new THREE.Box3;r.setFromArray(p);var c=r.getSize(new THREE.Vector3);y.split&&(c.z/=1-y.split),o={box:r,size:c},m.set(p,o)}var i=o.box,u=o.size;return Math.abs(Z-G)<Math.abs(W-L)?[new THREE.Vector2((W-i.min.x)/u.x,(I-i.min.z)/u.z),new THREE.Vector2((L-i.min.x)/u.x,(d-i.min.z)/u.z),new THREE.Vector2((k-i.min.x)/u.x,(R-i.min.z)/u.z),new THREE.Vector2((x-i.min.x)/u.x,(s-i.min.z)/u.z)]:[new THREE.Vector2((Z-i.min.y)/u.y,(I-i.min.z)/u.z),new THREE.Vector2((G-i.min.y)/u.y,(d-i.min.z)/u.z),new THREE.Vector2((P-i.min.y)/u.y,(R-i.min.z)/u.z),new THREE.Vector2((a-i.min.y)/u.y,(s-i.min.z)/u.z)]}}},w=function(){m.clear()}},77:function(b,g,l){var T=_=>{var w={};return l.d(w,_),w},m=_=>()=>_;b.exports=T({del:()=>X.del,get:()=>X.get,set:()=>X.set})},949:function(b,g,l){var T=_=>{var w={};return l.d(w,_),w},m=_=>()=>_;b.exports=T({MathUtils:()=>J.MathUtils})},568:function(b,g,l){l.d(g,{Z:function(){return m}});function T(_,w,y,M,p,E,S){try{var C=_[E](S),U=C.value}catch(W){y(W);return}C.done?w(U):Promise.resolve(U).then(M,p)}function m(_){return function(){var w=this,y=arguments;return new Promise(function(M,p){var E=_.apply(w,y);function S(U){T(E,M,p,S,C,"next",U)}function C(U){T(E,M,p,S,C,"throw",U)}S(void 0)})}}},924:function(b,g,l){l.d(g,{Z:function(){return T}});function T(m,_,w){return _ in m?Object.defineProperty(m,_,{value:w,enumerable:!0,configurable:!0,writable:!0}):m[_]=w,m}},42:function(b,g,l){l.d(g,{Z:function(){return m}});var T=l(924);function m(_){for(var w=1;w<arguments.length;w++){var y=arguments[w]!=null?arguments[w]:{},M=Object.keys(y);typeof Object.getOwnPropertySymbols=="function"&&(M=M.concat(Object.getOwnPropertySymbols(y).filter(function(p){return Object.getOwnPropertyDescriptor(y,p).enumerable}))),M.forEach(function(p){(0,T.Z)(_,p,y[p])})}return _}}},Y={};function H(b){var g=Y[b];if(g!==void 0)return g.exports;var l=Y[b]={exports:{}};return Q[b](l,l.exports,H),l.exports}(function(){H.n=function(b){var g=b&&b.__esModule?function(){return b.default}:function(){return b};return H.d(g,{a:g}),g}})(),function(){H.d=function(b,g){for(var l in g)H.o(g,l)&&!H.o(b,l)&&Object.defineProperty(b,l,{enumerable:!0,get:g[l]})}}(),function(){H.o=function(b,g){return Object.prototype.hasOwnProperty.call(b,g)}}();var K={};(function(){H.d(K,{Ct:function(){return l},Vw:function(){return d},hG:function(){return G},Wk:function(){return x}});function b(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}var g=H(584),l=function(){"use strict";function a(){b(this,a),this.cache=new Map}var s=a.prototype;return s.install=function(){},s.init=function(r){var c=(0,g.Mf)();this.cache.set(r,c)},s.get=function(r){var c;return(c=this.cache.get(r))===null||c===void 0?void 0:c.promise},s.set=function(r,c){var i=this.cache.get(r);i?i.resolve(c):console.warn("init cache first")},s.dispose=function(){this.cache.forEach(function(r,c){r.reject("stop set cache:".concat(c))}),this.cache.clear()},a}(),T=H(568);function m(a,s){for(var o=0;o<s.length;o++){var r=s[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(a,r.key,r)}}function _(a,s,o){return s&&m(a.prototype,s),o&&m(a,o),a}function w(a){if(Array.isArray(a))return a}function y(a){if(typeof Symbol!="undefined"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function M(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(a,s){(s==null||s>a.length)&&(s=a.length);for(var o=0,r=new Array(s);o<s;o++)r[o]=a[o];return r}function E(a,s){if(!!a){if(typeof a=="string")return p(a,s);var o=Object.prototype.toString.call(a).slice(8,-1);if(o==="Object"&&a.constructor&&(o=a.constructor.name),o==="Map"||o==="Set")return Array.from(o);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return p(a,s)}}function S(a,s){return w(a)||y(a,s)||E(a,s)||M()}function C(a){if(Array.isArray(a))return p(a)}function U(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function W(a){return C(a)||y(a)||E(a)||U()}var Z=H(666),I=H.n(Z),L=H(949),G=function(){"use strict";function a(o){b(this,a),this.objectNamesToFactories=new Map,this.objects=new Map,this.objects_=o}var s=a.prototype;return s.install=function(r){this.pencil=r,this.initObjectFactories()},s.initObjectFactories=function(){var r=this,c=this.objects_;Object.keys(c).forEach(function(i){var u=function(){function v(){b(this,v)}var A=v.prototype;return A.create=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new c[i](e)},v}();r.objectNamesToFactories.set(i,u)})},s.getObject=function(r,c){r.includes("#")&&console.warn("getObject:err:\u4E0D\u652F\u6301 #",r);var i=(c||{}).key,u="".concat(r).concat(i?"#".concat(i):""),v=this.objects.get(u);return v},s.getAllObject=function(r,c){r.includes("#")&&console.warn("getAllObject:err:\u4E0D\u652F\u6301 #",r);var i=(c||{}).key,u="".concat(r).concat(i?"#".concat(i):""),v=[];return this.objects.forEach(function(A,z){(z.startsWith("".concat(u,"#"))||z===u)&&v.push(A)}),v},s.draw=function(r,c,i){var u=this;return(0,T.Z)(I().mark(function v(){var A,z,e,t,n,h,f;return I().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(A=u.objectNamesToFactories.get(r),!A){j.next=15;break}return z=(c||{}).key,e="".concat(r).concat(z?"#".concat(z):""),u.objects.has(e)&&(t=L.MathUtils.generateUUID(),e+="#".concat(t)),n=(c==null?void 0:c.target)||i,typeof n=="string"?h=u.objects.get(n):(n==null?void 0:n.objecttype__)==="BaseObject"?h=n:h=u.pencil.scene,f=new A().create(c),f.pencil=u.pencil,f.key=e,u.objects.set(e,f),j.next=14,u.addMesh(f,h);case 14:return j.abrupt("return",f);case 15:throw new Error("Unrecognized:".concat(r));case 16:case"end":return j.stop()}},v)}))()},s.addMesh=function(r,c){return(0,T.Z)(I().mark(function i(){return I().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,r.create();case 2:r.object3d&&(r.object3d.userData.BaseObject_=r,c.add(r.object3d)),r.visible=!0,r.render(),r.pm.resolve();case 6:case"end":return v.stop()}},i)}))()},s.erase=function(){for(var r=arguments.length,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];var u=this;W(c).forEach(function(v){var A=[];if(typeof v=="string"){var z,e=S(v.split("#"),2),t=e[0],n=e[1];(z=A).push.apply(z,W(u.getAllObject(t,{key:n})))}else A.push(v);A.forEach(function(h){u.removeMesh(h)})})},s.removeMesh=function(r){var c=this,i=r.parent;r.object3d&&i.remove(r.object3d),r.traverse(function(u){u.visible=!1,u.dispose(),c.objects.delete(u.key)})},s.update=function(r,c){this.objects.forEach(function(i){i.update(r,c)})},s.setSize=function(r,c){this.objects.forEach(function(i){i.resize(r,c)})},s.dispose=function(){this.objects.forEach(function(r,c){r.dispose(),r.pm.reject("stop draw:".concat(c))}),this.objects.clear(),this.objectNamesToFactories.clear()},_(a,[{key:"objectsPromise",get:function(){var r=[];return this.objects.forEach(function(c){r.push(c.pm.promise)}),r}}]),a}(),d=function(){"use strict";function a(){b(this,a),this.data={}}var s=a.prototype;return s.install=function(){},s.setData=function(r,c){var i,u;this.data[r]=c,(u=(i=this).cb)===null||u===void 0||u.call(i,r)},s.runAll=function(){var r=this;Object.keys(this.data).forEach(function(c){var i,u;(u=(i=r).cb)===null||u===void 0||u.call(i,c)})},s.dispose=function(){this.data={},this.cb=void 0},a}(),k=H(924),P=H(42),R=H(77),x=function(){"use strict";function a(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};b(this,a),this.messageList=[],this.options=(0,P.Z)({},{cache:!1,cacheVersion:"1"},o)}var s=a.prototype;return s.install=function(){},s.init=function(r,c){var i=this,u=this.options,v=u.cache,A=u.cacheVersion;this.workerList=Array.from({length:c},function(z,e){var t=typeof r=="string"?new Worker(r):r();return t.onmessage=function(n){var h=n.data,f=h.res,O=h.uuid,j=i.messageList.find(function(N){var D=N.uuid;return O===D});if(j==null||j.options.cb(f),i.workerList[e].inUse=!1,i.checkMessage(),v){var V=(j==null?void 0:j.options.cacheVersion)||A;(0,R.set)(O,(0,k.Z)({},V,f))}},{worker:t,inUse:!1}})},s.postMessage=function(r,c){var i=this,u=this.options,v=u.cache,A=u.cacheVersion;if(v&&!r.workerKey){console.warn("worker cache need workerKey");return}if(v&&r.workerKey&&r.delCache){console.warn("worker cache del: ".concat(r.workerKey)),(0,R.del)(r.workerKey);return}var z=r.workerKey||L.MathUtils.generateUUID();(v?(0,R.get)(z):Promise.resolve()).then(function(e){var t=c.cacheVersion||A;e&&e[t]?c.cb(e[t]):(i.messageList.push({req:r,options:c,uuid:z,inUse:!1}),i.checkMessage())}).catch(function(){console.warn("err:worker cache"),i.messageList.push({req:r,options:c,uuid:z,inUse:!1}),i.checkMessage()})},s.checkMessage=function(){var r=this.workerList.find(function(i){var u=i.inUse;return!u});if(r){var c=this.messageList.find(function(i){var u=i.inUse;return!u});c&&(c.inUse=!0,r.inUse=!0,r.worker.postMessage({req:c.req,uuid:c.uuid}))}},s.dispose=function(){this.workerList.forEach(function(r){var c=r.worker;c.terminate()}),this.workerList=[],this.messageList=[]},a}()})();var q=K.Ct,tt=K.Vw,et=K.hG,rt=K.Wk;export{q as Cache,tt as Data,et as Draw,rt as Wk};
package/dist/shims.d.ts DELETED
@@ -1,5 +0,0 @@
1
- declare module '*.glsl' {
2
- export default string;
3
- }
4
-
5
- declare module '*.scss';
@@ -1,23 +0,0 @@
1
- interface Options {
2
- isdev?: boolean;
3
- }
4
- export default class Chain {
5
- options: Required<Options>;
6
- index: number;
7
- repeatCount: number;
8
- repeatNum: number;
9
- constructor(options?: Options);
10
- isPlaying: boolean;
11
- chainedList: (Function | Chain)[][];
12
- children: Chain[];
13
- start(): this | Promise<void>;
14
- private stop1;
15
- stop(): this;
16
- dispose(): this;
17
- private play;
18
- chain(...args: (Function | Chain)[]): this;
19
- repeat(number: number): this;
20
- timeout(ms: number): this;
21
- traverse(fn: (o: Chain) => void): void;
22
- }
23
- export {};
@@ -1,2 +0,0 @@
1
- import * as THREE from 'three';
2
- export default function colorCorrection(node: THREE.Mesh): void;
@@ -1,2 +0,0 @@
1
- import * as THREE from 'three';
2
- export default function disposeMesh(node: THREE.Mesh): void;
@@ -1,26 +0,0 @@
1
- interface Options {
2
- type?: string;
3
- message?: string;
4
- data?: any;
5
- }
6
- export declare class RuntimeException {
7
- private _message?;
8
- private _type?;
9
- private _data?;
10
- constructor(options?: Options);
11
- name: string;
12
- get message(): string | undefined;
13
- get data(): any;
14
- get type(): string | undefined;
15
- toString(): string;
16
- }
17
- export declare class IllegalStateException extends RuntimeException {
18
- name: string;
19
- }
20
- export declare class InvalidArgumentException extends RuntimeException {
21
- name: string;
22
- }
23
- export declare class NotImplementedException extends RuntimeException {
24
- name: string;
25
- }
26
- export {};
@@ -1,13 +0,0 @@
1
- import { del, clear } from 'idb-keyval';
2
- export declare const clearCache: typeof del;
3
- export declare const clearAllCache: typeof clear;
4
- export declare const getCache: (url: string, { type, version, }: {
5
- type?: "blob" | "json" | undefined;
6
- version?: string | undefined;
7
- }) => Promise<{
8
- url: string;
9
- store: any;
10
- } | {
11
- url: string;
12
- store?: undefined;
13
- }>;
@@ -1,2 +0,0 @@
1
- export declare const getElementViewLeft: (element: HTMLElement) => number;
2
- export declare const getElementViewTop: (element: HTMLElement) => number;
@@ -1,11 +0,0 @@
1
- export { default as makePromiseCreator } from './makePromiseCreator';
2
- export { default as to } from './to';
3
- export { default as Timer } from './timer';
4
- export { default as Chain } from './chain';
5
- export { default as polar2Cartesian } from './polar2Cartesian';
6
- export { default as disposeMesh } from './disposeMesh';
7
- export { default as colorCorrection } from './colorCorrection';
8
- export { default as isPlainObject } from './isPlainObject';
9
- export * from './getCache';
10
- export * from './getElementView';
11
- export * from './uvGenerator';
@@ -1 +0,0 @@
1
- (function(){var H={666:function(v){var c=function(o){"use strict";var u=Object.prototype,f=u.hasOwnProperty,n,i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",m=i.toStringTag||"@@toStringTag";function l(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{l({},"")}catch(r){l=function(t,e,_){return t[e]=_}}function w(r,t,e,_){var p=t&&t.prototype instanceof G?t:G,A=Object.create(p.prototype),z=new O(_||[]);return A._invoke=k(r,e,z),A}o.wrap=w;function E(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(_){return{type:"throw",arg:_}}}var M="suspendedStart",j="suspendedYield",V="executing",Z="completed",L={};function G(){}function D(){}function C(){}var B={};l(B,a,function(){return this});var S=Object.getPrototypeOf,P=S&&S(S(N([])));P&&P!==u&&f.call(P,a)&&(B=P);var d=C.prototype=G.prototype=Object.create(B);D.prototype=C,l(d,"constructor",C),l(C,"constructor",D),D.displayName=l(C,m,"GeneratorFunction");function h(r){["next","throw","return"].forEach(function(t){l(r,t,function(e){return this._invoke(t,e)})})}o.isGeneratorFunction=function(r){var t=typeof r=="function"&&r.constructor;return t?t===D||(t.displayName||t.name)==="GeneratorFunction":!1},o.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,C):(r.__proto__=C,l(r,m,"GeneratorFunction")),r.prototype=Object.create(d),r},o.awrap=function(r){return{__await:r}};function g(r,t){function e(A,z,I,W){var U=E(r[A],r,z);if(U.type==="throw")W(U.arg);else{var Y=U.arg,$=Y.value;return $&&typeof $=="object"&&f.call($,"__await")?t.resolve($.__await).then(function(x){e("next",x,I,W)},function(x){e("throw",x,I,W)}):t.resolve($).then(function(x){Y.value=x,I(Y)},function(x){return e("throw",x,I,W)})}}var _;function p(A,z){function I(){return new t(function(W,U){e(A,z,W,U)})}return _=_?_.then(I,I):I()}this._invoke=p}h(g.prototype),l(g.prototype,s,function(){return this}),o.AsyncIterator=g,o.async=function(r,t,e,_,p){p===void 0&&(p=Promise);var A=new g(w(r,t,e,_),p);return o.isGeneratorFunction(t)?A:A.next().then(function(z){return z.done?z.value:A.next()})};function k(r,t,e){var _=M;return function(A,z){if(_===V)throw new Error("Generator is already running");if(_===Z){if(A==="throw")throw z;return K()}for(e.method=A,e.arg=z;;){var I=e.delegate;if(I){var W=R(I,e);if(W){if(W===L)continue;return W}}if(e.method==="next")e.sent=e._sent=e.arg;else if(e.method==="throw"){if(_===M)throw _=Z,e.arg;e.dispatchException(e.arg)}else e.method==="return"&&e.abrupt("return",e.arg);_=V;var U=E(r,t,e);if(U.type==="normal"){if(_=e.done?Z:j,U.arg===L)continue;return{value:U.arg,done:e.done}}else U.type==="throw"&&(_=Z,e.method="throw",e.arg=U.arg)}}}function R(r,t){var e=r.iterator[t.method];if(e===n){if(t.delegate=null,t.method==="throw"){if(r.iterator.return&&(t.method="return",t.arg=n,R(r,t),t.method==="throw"))return L;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return L}var _=E(e,r.iterator,t.arg);if(_.type==="throw")return t.method="throw",t.arg=_.arg,t.delegate=null,L;var p=_.arg;if(!p)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,L;if(p.done)t[r.resultName]=p.value,t.next=r.nextLoc,t.method!=="return"&&(t.method="next",t.arg=n);else return p;return t.delegate=null,L}h(d),l(d,m,"Generator"),l(d,a,function(){return this}),l(d,"toString",function(){return"[object Generator]"});function T(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function y(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function O(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(T,this),this.reset(!0)}o.keys=function(r){var t=[];for(var e in r)t.push(e);return t.reverse(),function _(){for(;t.length;){var p=t.pop();if(p in r)return _.value=p,_.done=!1,_}return _.done=!0,_}};function N(r){if(r){var t=r[a];if(t)return t.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var e=-1,_=function p(){for(;++e<r.length;)if(f.call(r,e))return p.value=r[e],p.done=!1,p;return p.value=n,p.done=!0,p};return _.next=_}}return{next:K}}o.values=N;function K(){return{value:n,done:!0}}return O.prototype={constructor:O,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(y),!r)for(var t in this)t.charAt(0)==="t"&&f.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var r=this.tryEntries[0],t=r.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var t=this;function e(W,U){return A.type="throw",A.arg=r,t.next=W,U&&(t.method="next",t.arg=n),!!U}for(var _=this.tryEntries.length-1;_>=0;--_){var p=this.tryEntries[_],A=p.completion;if(p.tryLoc==="root")return e("end");if(p.tryLoc<=this.prev){var z=f.call(p,"catchLoc"),I=f.call(p,"finallyLoc");if(z&&I){if(this.prev<p.catchLoc)return e(p.catchLoc,!0);if(this.prev<p.finallyLoc)return e(p.finallyLoc)}else if(z){if(this.prev<p.catchLoc)return e(p.catchLoc,!0)}else if(I){if(this.prev<p.finallyLoc)return e(p.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(r,t){for(var e=this.tryEntries.length-1;e>=0;--e){var _=this.tryEntries[e];if(_.tryLoc<=this.prev&&f.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var p=_;break}}p&&(r==="break"||r==="continue")&&p.tryLoc<=t&&t<=p.finallyLoc&&(p=null);var A=p?p.completion:{};return A.type=r,A.arg=t,p?(this.method="next",this.next=p.finallyLoc,L):this.complete(A)},complete:function(r,t){if(r.type==="throw")throw r.arg;return r.type==="break"||r.type==="continue"?this.next=r.arg:r.type==="return"?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):r.type==="normal"&&t&&(this.next=t),L},finish:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),y(e),L}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var _=e.completion;if(_.type==="throw"){var p=_.arg;y(e)}return p}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,e){return this.delegate={iterator:N(r),resultName:t,nextLoc:e},this.method==="next"&&(this.arg=n),L}},o}(v.exports);try{regeneratorRuntime=c}catch(o){typeof globalThis=="object"?globalThis.regeneratorRuntime=c:Function("r","regeneratorRuntime = r")(c)}},695:function(v,c,o){"use strict";o.d(c,{Z:function(){return u}});function u(f){if(f.geometry&&f.geometry.dispose(),f.material){var n=Array.isArray(f.material)?f.material:[f.material];n.forEach(function(i){var a,s,m,l,w,E,M,j,V,Z,L,G,D;(a=i.map)===null||a===void 0||a.dispose(),(s=i.lightMap)===null||s===void 0||s.dispose(),(m=i.bumpMap)===null||m===void 0||m.dispose(),(l=i.normalMap)===null||l===void 0||l.dispose(),(w=i.specularMap)===null||w===void 0||w.dispose(),(E=i.envMap)===null||E===void 0||E.dispose(),(M=i.alphaMap)===null||M===void 0||M.dispose(),(j=i.aoMap)===null||j===void 0||j.dispose(),(V=i.displacementMap)===null||V===void 0||V.dispose(),(Z=i.emissiveMap)===null||Z===void 0||Z.dispose(),(L=i.gradientMap)===null||L===void 0||L.dispose(),(G=i.metalnessMap)===null||G===void 0||G.dispose(),(D=i.roughnessMap)===null||D===void 0||D.dispose(),i.dispose()})}}},490:function(v,c,o){"use strict";o.d(c,{U:function(){return f},v:function(){return u}});var u=function(n){for(var i=n.offsetLeft,a=n.offsetParent;a!==null;)i+=a.offsetLeft,a=a.offsetParent;var s;return document.compatMode==="BackCompat"||document.documentElement.scrollTop===0?s=document.body.scrollLeft:s=document.documentElement.scrollLeft,i-s},f=function(n){for(var i=n.offsetTop,a=n.offsetParent;a!==null;)i+=a.offsetTop,a=a.offsetParent;var s;return document.compatMode==="BackCompat"||document.documentElement.scrollTop===0?s=document.body.scrollTop:s=document.documentElement.scrollTop,i-s}},738:function(v,c,o){"use strict";o.d(c,{Z:function(){return f}});function u(n){return Object.prototype.toString.call(n)==="[object Object]"}function f(n){if(u(n)===!1)return!1;var i=n.constructor;if(i===void 0)return!0;var a=i.prototype;return!(u(a)===!1||a.hasOwnProperty("isPrototypeOf")===!1)}},282:function(v,c,o){"use strict";o.d(c,{Z:function(){return f}});var u=o(484);function f(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a={};return a.promise=new Promise(function(s,m){a.resolve=s,a.reject=m}),n&&(a.promise=(0,u.Z)(a.promise,i)),a}},713:function(v,c,o){"use strict";o.d(c,{Z:function(){return u}});function u(f,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=(90-n)*Math.PI/180,s=(90-f)*Math.PI/180;return[i*Math.sin(a)*Math.cos(s),i*Math.cos(a),i*Math.sin(a)*Math.sin(s)]}},618:function(v,c,o){"use strict";o.d(c,{Z:function(){return n}});var u=o(438),f=function(){"use strict";function i(s){(0,u.Z)(this,i),this.onTick_=s,this.cancelPending_=null}var a=i.prototype;return a.tickAfter=function(m){var l=this;this.stop();var w=!0,E;this.cancelPending_=function(){clearTimeout(E),w=!1};var M=function(){w&&l.onTick_()};return E=window.setTimeout(M,m),this},a.stop=function(){this.cancelPending_&&(this.cancelPending_(),this.cancelPending_=null)},i}(),n=function(){"use strict";function i(s){(0,u.Z)(this,i),this.onTick_=s,this.ticker_=null}var a=i.prototype;return a.tickNow=function(){return this.stop(),this.onTick_(),this},a.tickAfter=function(m){var l=this;return this.stop(),this.ticker_=new f(function(){l.onTick_()}).tickAfter(m),this},a.tickEvery=function(m){var l=this;return this.stop(),this.ticker_=new f(function(){var w;(w=l.ticker_)===null||w===void 0||w.tickAfter(m),l.onTick_()}).tickAfter(m),this},a.stop=function(){this.ticker_&&(this.ticker_.stop(),this.ticker_=null)},i}()},484:function(v,c,o){"use strict";o.d(c,{Z:function(){return f}});var u=o(42);function f(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n.then(function(a){return(0,u.Z)({err:null,res:a},i)}).catch(function(a){return(0,u.Z)({err:a,res:void 0},i)})}},705:function(v,c,o){"use strict";o.d(c,{C:function(){return a},y:function(){return i}});var u=o(644),f=o.n(u),n=new Map,i=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(m,l,w,E,M){var j=l[w*3],V=l[w*3+1],Z=l[E*3],L=l[E*3+1],G=l[M*3],D=l[M*3+1],C;if(n.has(m))C=n.get(m);else{var B=s.box3||new u.Box3;if(!s.box3){var S=m.parameters.shapes.getPoints();B.setFromArray(S.map(function(k){return[k.x,k.y,0]}).flat())}var P=B.getSize(new u.Vector3);s.split&&(P.y/=s.split),C={box:B,size:P},n.set(m,C)}var d=C.box,h=C.size,g=s.split?1-s.split:0;return[new u.Vector2((j-d.min.x)/h.x,(V-d.min.y)/h.y+g),new u.Vector2((Z-d.min.x)/h.x,(L-d.min.y)/h.y+g),new u.Vector2((G-d.min.x)/h.x,(D-d.min.y)/h.y+g)]},generateSideWallUV:function(m,l,w,E,M,j){var V=l[w*3],Z=l[w*3+1],L=l[w*3+2],G=l[E*3],D=l[E*3+1],C=l[E*3+2],B=l[M*3],S=l[M*3+1],P=l[M*3+2],d=l[j*3],h=l[j*3+1],g=l[j*3+2],k;if(n.has(l))k=n.get(l);else{var R=new u.Box3;R.setFromArray(l);var T=R.getSize(new u.Vector3);s.split&&(T.z/=1-s.split),k={box:R,size:T},n.set(l,k)}var y=k.box,O=k.size;return Math.abs(Z-D)<Math.abs(V-G)?[new u.Vector2((V-y.min.x)/O.x,(L-y.min.z)/O.z),new u.Vector2((G-y.min.x)/O.x,(C-y.min.z)/O.z),new u.Vector2((B-y.min.x)/O.x,(P-y.min.z)/O.z),new u.Vector2((d-y.min.x)/O.x,(g-y.min.z)/O.z)]:[new u.Vector2((Z-y.min.y)/O.y,(L-y.min.z)/O.z),new u.Vector2((D-y.min.y)/O.y,(C-y.min.z)/O.z),new u.Vector2((S-y.min.y)/O.y,(P-y.min.z)/O.z),new u.Vector2((h-y.min.y)/O.y,(g-y.min.z)/O.z)]}}},a=function(){n.clear()}},360:function(v){"use strict";v.exports=require("idb-keyval")},644:function(v){"use strict";v.exports=require("three")},943:function(v,c,o){"use strict";o.d(c,{Z:function(){return u}});function u(f,n){(n==null||n>f.length)&&(n=f.length);for(var i=0,a=new Array(n);i<n;i++)a[i]=f[i];return a}},982:function(v,c,o){"use strict";o.d(c,{Z:function(){return f}});var u=o(943);function f(n){if(Array.isArray(n))return(0,u.Z)(n)}},568:function(v,c,o){"use strict";o.d(c,{Z:function(){return f}});function u(n,i,a,s,m,l,w){try{var E=n[l](w),M=E.value}catch(j){a(j);return}E.done?i(M):Promise.resolve(M).then(s,m)}function f(n){return function(){var i=this,a=arguments;return new Promise(function(s,m){var l=n.apply(i,a);function w(M){u(l,s,m,w,E,"next",M)}function E(M){u(l,s,m,w,E,"throw",M)}w(void 0)})}}},438:function(v,c,o){"use strict";o.d(c,{Z:function(){return u}});function u(f,n){if(!(f instanceof n))throw new TypeError("Cannot call a class as a function")}},924:function(v,c,o){"use strict";o.d(c,{Z:function(){return u}});function u(f,n,i){return n in f?Object.defineProperty(f,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):f[n]=i,f}},375:function(v,c,o){"use strict";o.d(c,{Z:function(){return u}});function u(f){if(typeof Symbol!="undefined"&&f[Symbol.iterator]!=null||f["@@iterator"]!=null)return Array.from(f)}},270:function(v,c,o){"use strict";o.d(c,{Z:function(){return u}});function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},42:function(v,c,o){"use strict";o.d(c,{Z:function(){return f}});var u=o(924);function f(n){for(var i=1;i<arguments.length;i++){var a=arguments[i]!=null?arguments[i]:{},s=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(a).filter(function(m){return Object.getOwnPropertyDescriptor(a,m).enumerable}))),s.forEach(function(m){(0,u.Z)(n,m,a[m])})}return n}},342:function(v,c,o){"use strict";o.d(c,{Z:function(){return a}});var u=o(982),f=o(375),n=o(270),i=o(566);function a(s){return(0,u.Z)(s)||(0,f.Z)(s)||(0,i.Z)(s)||(0,n.Z)()}},566:function(v,c,o){"use strict";o.d(c,{Z:function(){return f}});var u=o(943);function f(n,i){if(!!n){if(typeof n=="string")return(0,u.Z)(n,i);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(a);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return(0,u.Z)(n,i)}}}},X={};function b(v){var c=X[v];if(c!==void 0)return c.exports;var o=X[v]={exports:{}};return H[v](o,o.exports,b),o.exports}(function(){b.n=function(v){var c=v&&v.__esModule?function(){return v.default}:function(){return v};return b.d(c,{a:c}),c}})(),function(){b.d=function(v,c){for(var o in c)b.o(c,o)&&!b.o(v,o)&&Object.defineProperty(v,o,{enumerable:!0,get:c[o]})}}(),function(){b.o=function(v,c){return Object.prototype.hasOwnProperty.call(v,c)}}(),function(){b.r=function(v){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})}}();var F={};(function(){"use strict";b.r(F),b.d(F,{Chain:function(){return m},Timer:function(){return o.Z},claerUVGenerator:function(){return B.C},clearAllCache:function(){return G},clearCache:function(){return L},colorCorrection:function(){return M},disposeMesh:function(){return w.Z},getCache:function(){return D},getElementViewLeft:function(){return C.v},getElementViewTop:function(){return C.U},getUVGenerator:function(){return B.y},isPlainObject:function(){return j.Z},makePromiseCreator:function(){return v.Z},polar2Cartesian:function(){return l.Z},to:function(){return c.Z}});var v=b(282),c=b(484),o=b(618),u=b(568),f=b(438),n=b(42),i=b(342),a=b(666),s=b.n(a),m=function(){"use strict";function S(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,f.Z)(this,S),this.index=0,this.repeatCount=0,this.repeatNum=0,this.isPlaying=!1,this.chainedList=[],this.children=[],this.options=(0,n.Z)({},{isdev:!1},d)}var P=S.prototype;return P.start=function(){return this.isPlaying?this:(this.index=0,this.isPlaying=!0,this.play())},P.stop1=function(){return this.isPlaying?(this.isPlaying=!1,this.repeatCount=0,this):this},P.stop=function(){return this.traverse(function(h){return h.stop1()}),this},P.dispose=function(){return this.stop(),this.chainedList=[],this.children=[],this},P.play=function(){var h=this;return(0,u.Z)(s().mark(function g(){var k;return s().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(k=h.chainedList[h.index],!(k&&h.isPlaying)){T.next=9;break}return T.next=4,Promise.all(k.map(function(y){return typeof y=="function"?y(h.repeatCount):y.start()}));case 4:return h.index+=1,T.next=7,h.play();case 7:T.next=17;break;case 9:if(!(!k&&h.isPlaying&&h.repeatCount<h.repeatNum)){T.next=16;break}return h.repeatCount+=1,h.index=0,T.next=14,h.play();case 14:T.next=17;break;case 16:!k&&h.isPlaying&&h.repeatCount===h.repeatNum&&h.stop();case 17:case"end":return T.stop()}},g)}))()},P.chain=function(){for(var h=arguments.length,g=new Array(h),k=0;k<h;k++)g[k]=arguments[k];var R=this;return(0,i.Z)(g).forEach(function(T){T instanceof S&&R.children.push(T)}),this.chainedList.push((0,i.Z)(g)),this},P.repeat=function(h){return this.repeatNum=h,this},P.timeout=function(h){return this.chain(function(){return new Promise(function(g){return setTimeout(g,h)})}),this},P.traverse=function(h){h(this),this.children.forEach(function(g){g.traverse(h)})},S}(),l=b(713),w=b(695),E=b(644);function M(S){if(S.material){var P=Array.isArray(S.material)?S.material:[S.material];P.forEach(function(d){var h,g;(h=d.color)===null||h===void 0||h.convertSRGBToLinear(),(g=d.emissive)===null||g===void 0||g.convertSRGBToLinear(),d.map&&(d.map.encoding=E.sRGBEncoding),d.emissiveMap&&(d.emissiveMap.encoding=E.sRGBEncoding)})}}var j=b(738),V=b(924),Z=b(360),L=Z.del,G=Z.clear,D=function(){var S=(0,u.Z)(s().mark(function P(d,h){var g,k,R,T,y,O,N,K,r;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return g=h.type,k=g===void 0?"blob":g,R=h.version,T=R===void 0?"1":R,e.next=4,(0,Z.get)(d);case 4:if(O=e.sent,!(O&&O[T])){e.next=9;break}y=O[T],e.next=15;break;case 9:return e.next=11,(0,c.Z)(fetch(d).then(function(_){if(_.ok)return _[k]();throw new Error}));case 11:N=e.sent,K=N.res,r=N.err,r||(y=K,(0,Z.set)(d,(0,V.Z)({},T,K)));case 15:return e.abrupt("return",y?{url:k==="json"?d:URL.createObjectURL(y),store:y}:{url:d});case 16:case"end":return e.stop()}},P)}));return function(d,h){return S.apply(this,arguments)}}(),C=b(490),B=b(705)})(),module.exports=F})();
@@ -1 +0,0 @@
1
- import*as F from"idb-keyval";import*as Y from"three";var Q={666:function(d){var c=function(i){"use strict";var u=Object.prototype,s=u.hasOwnProperty,a,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",f=n.asyncIterator||"@@asyncIterator",_=n.toStringTag||"@@toStringTag";function m(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{m({},"")}catch(e){m=function(t,r,p){return t[r]=p}}function b(e,t,r,p){var l=t&&t.prototype instanceof G?t:G,C=Object.create(l.prototype),V=new W(p||[]);return C._invoke=T(e,r,V),C}i.wrap=b;function E(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(p){return{type:"throw",arg:p}}}var L="suspendedStart",x="suspendedYield",R="executing",Z="completed",O={};function G(){}function A(){}function j(){}var I={};m(I,o,function(){return this});var M=Object.getPrototypeOf,k=M&&M(M(K([])));k&&k!==u&&s.call(k,o)&&(I=k);var v=j.prototype=G.prototype=Object.create(I);A.prototype=j,m(v,"constructor",j),m(j,"constructor",A),A.displayName=m(j,_,"GeneratorFunction");function h(e){["next","throw","return"].forEach(function(t){m(e,t,function(r){return this._invoke(t,r)})})}i.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===A||(t.displayName||t.name)==="GeneratorFunction":!1},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,j):(e.__proto__=j,m(e,_,"GeneratorFunction")),e.prototype=Object.create(v),e},i.awrap=function(e){return{__await:e}};function w(e,t){function r(C,V,U,B){var D=E(e[C],e,V);if(D.type==="throw")B(D.arg);else{var J=D.arg,$=J.value;return $&&typeof $=="object"&&s.call($,"__await")?t.resolve($.__await).then(function(N){r("next",N,U,B)},function(N){r("throw",N,U,B)}):t.resolve($).then(function(N){J.value=N,U(J)},function(N){return r("throw",N,U,B)})}}var p;function l(C,V){function U(){return new t(function(B,D){r(C,V,B,D)})}return p=p?p.then(U,U):U()}this._invoke=l}h(w.prototype),m(w.prototype,f,function(){return this}),i.AsyncIterator=w,i.async=function(e,t,r,p,l){l===void 0&&(l=Promise);var C=new w(b(e,t,r,p),l);return i.isGeneratorFunction(t)?C:C.next().then(function(V){return V.done?V.value:C.next()})};function T(e,t,r){var p=L;return function(C,V){if(p===R)throw new Error("Generator is already running");if(p===Z){if(C==="throw")throw V;return X()}for(r.method=C,r.arg=V;;){var U=r.delegate;if(U){var B=z(U,r);if(B){if(B===O)continue;return B}}if(r.method==="next")r.sent=r._sent=r.arg;else if(r.method==="throw"){if(p===L)throw p=Z,r.arg;r.dispatchException(r.arg)}else r.method==="return"&&r.abrupt("return",r.arg);p=R;var D=E(e,t,r);if(D.type==="normal"){if(p=r.done?Z:x,D.arg===O)continue;return{value:D.arg,done:r.done}}else D.type==="throw"&&(p=Z,r.method="throw",r.arg=D.arg)}}}function z(e,t){var r=e.iterator[t.method];if(r===a){if(t.delegate=null,t.method==="throw"){if(e.iterator.return&&(t.method="return",t.arg=a,z(e,t),t.method==="throw"))return O;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return O}var p=E(r,e.iterator,t.arg);if(p.type==="throw")return t.method="throw",t.arg=p.arg,t.delegate=null,O;var l=p.arg;if(!l)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O;if(l.done)t[e.resultName]=l.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=a);else return l;return t.delegate=null,O}h(v),m(v,_,"Generator"),m(v,o,function(){return this}),m(v,"toString",function(){return"[object Generator]"});function y(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function g(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function W(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(y,this),this.reset(!0)}i.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function p(){for(;t.length;){var l=t.pop();if(l in e)return p.value=l,p.done=!1,p}return p.done=!0,p}};function K(e){if(e){var t=e[o];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var r=-1,p=function l(){for(;++r<e.length;)if(s.call(e,r))return l.value=e[r],l.done=!1,l;return l.value=a,l.done=!0,l};return p.next=p}}return{next:X}}i.values=K;function X(){return{value:a,done:!0}}return W.prototype={constructor:W,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(g),!e)for(var t in this)t.charAt(0)==="t"&&s.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=a)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(B,D){return C.type="throw",C.arg=e,t.next=B,D&&(t.method="next",t.arg=a),!!D}for(var p=this.tryEntries.length-1;p>=0;--p){var l=this.tryEntries[p],C=l.completion;if(l.tryLoc==="root")return r("end");if(l.tryLoc<=this.prev){var V=s.call(l,"catchLoc"),U=s.call(l,"finallyLoc");if(V&&U){if(this.prev<l.catchLoc)return r(l.catchLoc,!0);if(this.prev<l.finallyLoc)return r(l.finallyLoc)}else if(V){if(this.prev<l.catchLoc)return r(l.catchLoc,!0)}else if(U){if(this.prev<l.finallyLoc)return r(l.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var p=this.tryEntries[r];if(p.tryLoc<=this.prev&&s.call(p,"finallyLoc")&&this.prev<p.finallyLoc){var l=p;break}}l&&(e==="break"||e==="continue")&&l.tryLoc<=t&&t<=l.finallyLoc&&(l=null);var C=l?l.completion:{};return C.type=e,C.arg=t,l?(this.method="next",this.next=l.finallyLoc,O):this.complete(C)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),O},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),g(r),O}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var p=r.completion;if(p.type==="throw"){var l=p.arg;g(r)}return l}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:K(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=a),O}},i}(d.exports);try{regeneratorRuntime=c}catch(i){typeof globalThis=="object"?globalThis.regeneratorRuntime=c:Function("r","regeneratorRuntime = r")(c)}},695:function(d,c,i){i.d(c,{Z:function(){return u}});function u(s){if(s.geometry&&s.geometry.dispose(),s.material){var a=Array.isArray(s.material)?s.material:[s.material];a.forEach(function(n){var o,f,_,m,b,E,L,x,R,Z,O,G,A;(o=n.map)===null||o===void 0||o.dispose(),(f=n.lightMap)===null||f===void 0||f.dispose(),(_=n.bumpMap)===null||_===void 0||_.dispose(),(m=n.normalMap)===null||m===void 0||m.dispose(),(b=n.specularMap)===null||b===void 0||b.dispose(),(E=n.envMap)===null||E===void 0||E.dispose(),(L=n.alphaMap)===null||L===void 0||L.dispose(),(x=n.aoMap)===null||x===void 0||x.dispose(),(R=n.displacementMap)===null||R===void 0||R.dispose(),(Z=n.emissiveMap)===null||Z===void 0||Z.dispose(),(O=n.gradientMap)===null||O===void 0||O.dispose(),(G=n.metalnessMap)===null||G===void 0||G.dispose(),(A=n.roughnessMap)===null||A===void 0||A.dispose(),n.dispose()})}}},490:function(d,c,i){i.d(c,{U:function(){return s},v:function(){return u}});var u=function(a){for(var n=a.offsetLeft,o=a.offsetParent;o!==null;)n+=o.offsetLeft,o=o.offsetParent;var f;return document.compatMode==="BackCompat"||document.documentElement.scrollTop===0?f=document.body.scrollLeft:f=document.documentElement.scrollLeft,n-f},s=function(a){for(var n=a.offsetTop,o=a.offsetParent;o!==null;)n+=o.offsetTop,o=o.offsetParent;var f;return document.compatMode==="BackCompat"||document.documentElement.scrollTop===0?f=document.body.scrollTop:f=document.documentElement.scrollTop,n-f}},738:function(d,c,i){i.d(c,{Z:function(){return s}});function u(a){return Object.prototype.toString.call(a)==="[object Object]"}function s(a){if(u(a)===!1)return!1;var n=a.constructor;if(n===void 0)return!0;var o=n.prototype;return!(u(o)===!1||o.hasOwnProperty("isPrototypeOf")===!1)}},282:function(d,c,i){i.d(c,{Z:function(){return s}});var u=i(484);function s(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o={};return o.promise=new Promise(function(f,_){o.resolve=f,o.reject=_}),a&&(o.promise=(0,u.Z)(o.promise,n)),o}},713:function(d,c,i){i.d(c,{Z:function(){return u}});function u(s,a){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=(90-a)*Math.PI/180,f=(90-s)*Math.PI/180;return[n*Math.sin(o)*Math.cos(f),n*Math.cos(o),n*Math.sin(o)*Math.sin(f)]}},618:function(d,c,i){i.d(c,{Z:function(){return a}});var u=i(438),s=function(){"use strict";function n(f){(0,u.Z)(this,n),this.onTick_=f,this.cancelPending_=null}var o=n.prototype;return o.tickAfter=function(_){var m=this;this.stop();var b=!0,E;this.cancelPending_=function(){clearTimeout(E),b=!1};var L=function(){b&&m.onTick_()};return E=window.setTimeout(L,_),this},o.stop=function(){this.cancelPending_&&(this.cancelPending_(),this.cancelPending_=null)},n}(),a=function(){"use strict";function n(f){(0,u.Z)(this,n),this.onTick_=f,this.ticker_=null}var o=n.prototype;return o.tickNow=function(){return this.stop(),this.onTick_(),this},o.tickAfter=function(_){var m=this;return this.stop(),this.ticker_=new s(function(){m.onTick_()}).tickAfter(_),this},o.tickEvery=function(_){var m=this;return this.stop(),this.ticker_=new s(function(){var b;(b=m.ticker_)===null||b===void 0||b.tickAfter(_),m.onTick_()}).tickAfter(_),this},o.stop=function(){this.ticker_&&(this.ticker_.stop(),this.ticker_=null)},n}()},484:function(d,c,i){i.d(c,{Z:function(){return s}});var u=i(42);function s(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a.then(function(o){return(0,u.Z)({err:null,res:o},n)}).catch(function(o){return(0,u.Z)({err:o,res:void 0},n)})}},705:function(d,c,i){i.d(c,{C:function(){return n},y:function(){return a}});var u=i(949),s=new Map,a=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(f,_,m,b,E){var L=_[m*3],x=_[m*3+1],R=_[b*3],Z=_[b*3+1],O=_[E*3],G=_[E*3+1],A;if(s.has(f))A=s.get(f);else{var j=o.box3||new u.Box3;if(!o.box3){var I=f.parameters.shapes.getPoints();j.setFromArray(I.map(function(w){return[w.x,w.y,0]}).flat())}var M=j.getSize(new u.Vector3);o.split&&(M.y/=o.split),A={box:j,size:M},s.set(f,A)}var k=A.box,v=A.size,h=o.split?1-o.split:0;return[new u.Vector2((L-k.min.x)/v.x,(x-k.min.y)/v.y+h),new u.Vector2((R-k.min.x)/v.x,(Z-k.min.y)/v.y+h),new u.Vector2((O-k.min.x)/v.x,(G-k.min.y)/v.y+h)]},generateSideWallUV:function(f,_,m,b,E,L){var x=_[m*3],R=_[m*3+1],Z=_[m*3+2],O=_[b*3],G=_[b*3+1],A=_[b*3+2],j=_[E*3],I=_[E*3+1],M=_[E*3+2],k=_[L*3],v=_[L*3+1],h=_[L*3+2],w;if(s.has(_))w=s.get(_);else{var T=new u.Box3;T.setFromArray(_);var z=T.getSize(new u.Vector3);o.split&&(z.z/=1-o.split),w={box:T,size:z},s.set(_,w)}var y=w.box,g=w.size;return Math.abs(R-G)<Math.abs(x-O)?[new u.Vector2((x-y.min.x)/g.x,(Z-y.min.z)/g.z),new u.Vector2((O-y.min.x)/g.x,(A-y.min.z)/g.z),new u.Vector2((j-y.min.x)/g.x,(M-y.min.z)/g.z),new u.Vector2((k-y.min.x)/g.x,(h-y.min.z)/g.z)]:[new u.Vector2((R-y.min.y)/g.y,(Z-y.min.z)/g.z),new u.Vector2((G-y.min.y)/g.y,(A-y.min.z)/g.z),new u.Vector2((I-y.min.y)/g.y,(M-y.min.z)/g.z),new u.Vector2((v-y.min.y)/g.y,(h-y.min.z)/g.z)]}}},n=function(){s.clear()}},77:function(d,c,i){var u=a=>{var n={};return i.d(n,a),n},s=a=>()=>a;d.exports=u({clear:()=>F.clear,del:()=>F.del,get:()=>F.get,set:()=>F.set})},949:function(d,c,i){var u=a=>{var n={};return i.d(n,a),n},s=a=>()=>a;d.exports=u({Box3:()=>Y.Box3,Vector2:()=>Y.Vector2,Vector3:()=>Y.Vector3,sRGBEncoding:()=>Y.sRGBEncoding})},943:function(d,c,i){i.d(c,{Z:function(){return u}});function u(s,a){(a==null||a>s.length)&&(a=s.length);for(var n=0,o=new Array(a);n<a;n++)o[n]=s[n];return o}},982:function(d,c,i){i.d(c,{Z:function(){return s}});var u=i(943);function s(a){if(Array.isArray(a))return(0,u.Z)(a)}},568:function(d,c,i){i.d(c,{Z:function(){return s}});function u(a,n,o,f,_,m,b){try{var E=a[m](b),L=E.value}catch(x){o(x);return}E.done?n(L):Promise.resolve(L).then(f,_)}function s(a){return function(){var n=this,o=arguments;return new Promise(function(f,_){var m=a.apply(n,o);function b(L){u(m,f,_,b,E,"next",L)}function E(L){u(m,f,_,b,E,"throw",L)}b(void 0)})}}},438:function(d,c,i){i.d(c,{Z:function(){return u}});function u(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}},924:function(d,c,i){i.d(c,{Z:function(){return u}});function u(s,a,n){return a in s?Object.defineProperty(s,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):s[a]=n,s}},375:function(d,c,i){i.d(c,{Z:function(){return u}});function u(s){if(typeof Symbol!="undefined"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}},270:function(d,c,i){i.d(c,{Z:function(){return u}});function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},42:function(d,c,i){i.d(c,{Z:function(){return s}});var u=i(924);function s(a){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{},f=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(f=f.concat(Object.getOwnPropertySymbols(o).filter(function(_){return Object.getOwnPropertyDescriptor(o,_).enumerable}))),f.forEach(function(_){(0,u.Z)(a,_,o[_])})}return a}},342:function(d,c,i){i.d(c,{Z:function(){return o}});var u=i(982),s=i(375),a=i(270),n=i(566);function o(f){return(0,u.Z)(f)||(0,s.Z)(f)||(0,n.Z)(f)||(0,a.Z)()}},566:function(d,c,i){i.d(c,{Z:function(){return s}});var u=i(943);function s(a,n){if(!!a){if(typeof a=="string")return(0,u.Z)(a,n);var o=Object.prototype.toString.call(a).slice(8,-1);if(o==="Object"&&a.constructor&&(o=a.constructor.name),o==="Map"||o==="Set")return Array.from(o);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return(0,u.Z)(a,n)}}}},H={};function P(d){var c=H[d];if(c!==void 0)return c.exports;var i=H[d]={exports:{}};return Q[d](i,i.exports,P),i.exports}(function(){P.n=function(d){var c=d&&d.__esModule?function(){return d.default}:function(){return d};return P.d(c,{a:c}),c}})(),function(){P.d=function(d,c){for(var i in c)P.o(c,i)&&!P.o(d,i)&&Object.defineProperty(d,i,{enumerable:!0,get:c[i]})}}(),function(){P.o=function(d,c){return Object.prototype.hasOwnProperty.call(d,c)}}();var S={};(function(){P.d(S,{qo:function(){return _},B7:function(){return i.Z},CL:function(){return I.C},eK:function(){return G},LK:function(){return O},ZL:function(){return L},wf:function(){return b.Z},lJ:function(){return A},vP:function(){return j.v},Up:function(){return j.U},y_:function(){return I.y},PO:function(){return x.Z},Mf:function(){return d.Z},Rl:function(){return m.Z},to:function(){return c.Z}});var d=P(282),c=P(484),i=P(618),u=P(568),s=P(438),a=P(42),n=P(342),o=P(666),f=P.n(o),_=function(){"use strict";function M(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,s.Z)(this,M),this.index=0,this.repeatCount=0,this.repeatNum=0,this.isPlaying=!1,this.chainedList=[],this.children=[],this.options=(0,a.Z)({},{isdev:!1},v)}var k=M.prototype;return k.start=function(){return this.isPlaying?this:(this.index=0,this.isPlaying=!0,this.play())},k.stop1=function(){return this.isPlaying?(this.isPlaying=!1,this.repeatCount=0,this):this},k.stop=function(){return this.traverse(function(h){return h.stop1()}),this},k.dispose=function(){return this.stop(),this.chainedList=[],this.children=[],this},k.play=function(){var h=this;return(0,u.Z)(f().mark(function w(){var T;return f().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(T=h.chainedList[h.index],!(T&&h.isPlaying)){y.next=9;break}return y.next=4,Promise.all(T.map(function(g){return typeof g=="function"?g(h.repeatCount):g.start()}));case 4:return h.index+=1,y.next=7,h.play();case 7:y.next=17;break;case 9:if(!(!T&&h.isPlaying&&h.repeatCount<h.repeatNum)){y.next=16;break}return h.repeatCount+=1,h.index=0,y.next=14,h.play();case 14:y.next=17;break;case 16:!T&&h.isPlaying&&h.repeatCount===h.repeatNum&&h.stop();case 17:case"end":return y.stop()}},w)}))()},k.chain=function(){for(var h=arguments.length,w=new Array(h),T=0;T<h;T++)w[T]=arguments[T];var z=this;return(0,n.Z)(w).forEach(function(y){y instanceof M&&z.children.push(y)}),this.chainedList.push((0,n.Z)(w)),this},k.repeat=function(h){return this.repeatNum=h,this},k.timeout=function(h){return this.chain(function(){return new Promise(function(w){return setTimeout(w,h)})}),this},k.traverse=function(h){h(this),this.children.forEach(function(w){w.traverse(h)})},M}(),m=P(713),b=P(695),E=P(949);function L(M){if(M.material){var k=Array.isArray(M.material)?M.material:[M.material];k.forEach(function(v){var h,w;(h=v.color)===null||h===void 0||h.convertSRGBToLinear(),(w=v.emissive)===null||w===void 0||w.convertSRGBToLinear(),v.map&&(v.map.encoding=E.sRGBEncoding),v.emissiveMap&&(v.emissiveMap.encoding=E.sRGBEncoding)})}}var x=P(738),R=P(924),Z=P(77),O=Z.del,G=Z.clear,A=function(){var M=(0,u.Z)(f().mark(function k(v,h){var w,T,z,y,g,W,K,X,e;return f().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return w=h.type,T=w===void 0?"blob":w,z=h.version,y=z===void 0?"1":z,r.next=4,(0,Z.get)(v);case 4:if(W=r.sent,!(W&&W[y])){r.next=9;break}g=W[y],r.next=15;break;case 9:return r.next=11,(0,c.Z)(fetch(v).then(function(p){if(p.ok)return p[T]();throw new Error}));case 11:K=r.sent,X=K.res,e=K.err,e||(g=X,(0,Z.set)(v,(0,R.Z)({},y,X)));case 15:return r.abrupt("return",g?{url:T==="json"?v:URL.createObjectURL(g),store:g}:{url:v});case 16:case"end":return r.stop()}},k)}));return function(v,h){return M.apply(this,arguments)}}(),j=P(490),I=P(705)})();var q=S.qo,tt=S.B7,et=S.CL,rt=S.eK,nt=S.LK,ot=S.ZL,at=S.wf,it=S.lJ,ut=S.vP,st=S.Up,ct=S.y_,ft=S.PO,_t=S.Mf,lt=S.Rl,pt=S.to;export{q as Chain,tt as Timer,et as claerUVGenerator,rt as clearAllCache,nt as clearCache,ot as colorCorrection,at as disposeMesh,it as getCache,ut as getElementViewLeft,st as getElementViewTop,ct as getUVGenerator,ft as isPlainObject,_t as makePromiseCreator,lt as polar2Cartesian,pt as to};
@@ -1 +0,0 @@
1
- export default function isPlainObject(o: any): boolean;
@@ -1,6 +0,0 @@
1
- declare const _default: (useto?: boolean, ext?: {}) => {
2
- promise: Promise<any>;
3
- resolve: (value?: any) => void;
4
- reject: (value?: any) => void;
5
- };
6
- export default _default;
@@ -1 +0,0 @@
1
- export default function polar2Cartesian(lng: number, lat: number, r?: number): number[];
@@ -1,9 +0,0 @@
1
- export default class {
2
- private onTick_;
3
- private ticker_;
4
- constructor(onTick_: () => void);
5
- tickNow(): this;
6
- tickAfter(milliseconds: number): this;
7
- tickEvery(milliseconds: number): this;
8
- stop(): void;
9
- }
@@ -1,8 +0,0 @@
1
- declare const _default: (promise: Promise<any>, ext?: {}) => Promise<{
2
- err: null;
3
- res: any;
4
- } | {
5
- err: any;
6
- res: undefined;
7
- }>;
8
- export default _default;
@@ -1,9 +0,0 @@
1
- import * as THREE from 'three';
2
- export declare const getUVGenerator: (options?: {
3
- box3?: THREE.Box3;
4
- split?: number;
5
- }) => {
6
- generateTopUV(geometry: any, vertices: number[], indexA: number, indexB: number, indexC: number): THREE.Vector2[];
7
- generateSideWallUV(geometry: any, vertices: number[], indexA: number, indexB: number, indexC: number, indexD: number): THREE.Vector2[];
8
- };
9
- export declare const claerUVGenerator: () => void;