gl-draw 0.0.1 → 0.0.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 (49) hide show
  1. package/dist/constants.d.ts +4 -0
  2. package/dist/core/BaseObject.d.ts +47 -0
  3. package/dist/core/CSSRenderer.d.ts +19 -0
  4. package/dist/core/Camera.d.ts +31 -0
  5. package/dist/core/Composer.d.ts +60 -0
  6. package/dist/core/Control.d.ts +28 -0
  7. package/dist/core/GUIObject.d.ts +38 -0
  8. package/dist/core/Pencil.d.ts +144 -0
  9. package/dist/core/Renderer.d.ts +49 -0
  10. package/dist/core/Scene.d.ts +19 -0
  11. package/dist/core/pass/bloom/UnrealBloomPass.d.ts +46 -0
  12. package/dist/core/pass/bloom/index.d.ts +33 -0
  13. package/dist/core/pass/outline/index.d.ts +37 -0
  14. package/dist/core/pass/ssr/index.d.ts +38 -0
  15. package/dist/index.d.ts +2 -0
  16. package/dist/index.js +2038 -1
  17. package/dist/objects/cache.d.ts +3 -0
  18. package/dist/objects/css2dbind/index.d.ts +16 -0
  19. package/dist/objects/image/index.d.ts +20 -0
  20. package/dist/objects/index.d.ts +7 -0
  21. package/dist/objects/index.js +132 -0
  22. package/dist/objects/line/index.d.ts +1 -0
  23. package/dist/objects/line/line.d.ts +41 -0
  24. package/dist/objects/line/meshLine/index.d.ts +89 -0
  25. package/dist/objects/line/meshLine/shader/fragment.d.ts +2 -0
  26. package/dist/objects/line/meshLine/shader/vertex.d.ts +2 -0
  27. package/dist/objects/spriteImage/index.d.ts +20 -0
  28. package/dist/objects/spriteVideo/index.d.ts +28 -0
  29. package/dist/objects/text/index.d.ts +24 -0
  30. package/dist/objects/video/index.d.ts +28 -0
  31. package/dist/plugins/Cache.d.ts +10 -0
  32. package/dist/plugins/Draw.d.ts +32 -0
  33. package/dist/plugins/index.d.ts +2 -0
  34. package/dist/plugins/index.js +1 -0
  35. package/dist/shims.d.ts +5 -0
  36. package/dist/utils/chain.d.ts +23 -0
  37. package/dist/utils/colorCorrection.d.ts +2 -0
  38. package/dist/utils/disposeMesh.d.ts +2 -0
  39. package/dist/utils/exception.d.ts +26 -0
  40. package/dist/utils/getCache.d.ts +8 -0
  41. package/dist/utils/getElementView.d.ts +2 -0
  42. package/dist/utils/index.d.ts +10 -0
  43. package/dist/utils/index.js +1 -0
  44. package/dist/utils/isPlainObject.d.ts +1 -0
  45. package/dist/utils/makePromiseCreator.d.ts +6 -0
  46. package/dist/utils/polar2Cartesian.d.ts +1 -0
  47. package/dist/utils/timer.d.ts +9 -0
  48. package/dist/utils/to.d.ts +8 -0
  49. package/package.json +26 -11
@@ -0,0 +1,2 @@
1
+ import * as THREE from 'three';
2
+ export default function disposeMesh(node: THREE.Mesh): void;
@@ -0,0 +1,26 @@
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 {};
@@ -0,0 +1,8 @@
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, { version, }: {
5
+ version: string;
6
+ }) => Promise<{
7
+ url: string;
8
+ }>;
@@ -0,0 +1,2 @@
1
+ export declare const getElementViewLeft: (element: HTMLElement) => number;
2
+ export declare const getElementViewTop: (element: HTMLElement) => number;
@@ -0,0 +1,10 @@
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';
@@ -0,0 +1 @@
1
+ (function(){var J={666:function(_){var s=function(o){"use strict";var l=Object.prototype,u=l.hasOwnProperty,a,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",v=r.toStringTag||"@@toStringTag";function d(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(t,i,h){return t[i]=h}}function g(e,t,i,h){var f=t&&t.prototype instanceof B?t:B,k=Object.create(f.prototype),C=new X(h||[]);return k._invoke=U(e,i,C),k}o.wrap=g;function P(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(h){return{type:"throw",arg:h}}}var T="suspendedStart",R="suspendedYield",W="executing",j="completed",L={};function B(){}function G(){}function I(){}var M={};d(M,n,function(){return this});var O=Object.getPrototypeOf,m=O&&O(O(A([])));m&&m!==l&&u.call(m,n)&&(M=m);var p=I.prototype=B.prototype=Object.create(M);G.prototype=I,d(p,"constructor",I),d(I,"constructor",G),G.displayName=d(I,v,"GeneratorFunction");function w(e){["next","throw","return"].forEach(function(t){d(e,t,function(i){return this._invoke(t,i)})})}o.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===G||(t.displayName||t.name)==="GeneratorFunction":!1},o.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,I):(e.__proto__=I,d(e,v,"GeneratorFunction")),e.prototype=Object.create(p),e},o.awrap=function(e){return{__await:e}};function b(e,t){function i(k,C,Z,D){var S=P(e[k],e,C);if(S.type==="throw")D(S.arg);else{var H=S.arg,Y=H.value;return Y&&typeof Y=="object"&&u.call(Y,"__await")?t.resolve(Y.__await).then(function(K){i("next",K,Z,D)},function(K){i("throw",K,Z,D)}):t.resolve(Y).then(function(K){H.value=K,Z(H)},function(K){return i("throw",K,Z,D)})}}var h;function f(k,C){function Z(){return new t(function(D,S){i(k,C,D,S)})}return h=h?h.then(Z,Z):Z()}this._invoke=f}w(b.prototype),d(b.prototype,c,function(){return this}),o.AsyncIterator=b,o.async=function(e,t,i,h,f){f===void 0&&(f=Promise);var k=new b(g(e,t,i,h),f);return o.isGeneratorFunction(t)?k:k.next().then(function(C){return C.done?C.value:k.next()})};function U(e,t,i){var h=T;return function(k,C){if(h===W)throw new Error("Generator is already running");if(h===j){if(k==="throw")throw C;return $()}for(i.method=k,i.arg=C;;){var Z=i.delegate;if(Z){var D=E(Z,i);if(D){if(D===L)continue;return D}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(h===T)throw h=j,i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);h=W;var S=P(e,t,i);if(S.type==="normal"){if(h=i.done?j:R,S.arg===L)continue;return{value:S.arg,done:i.done}}else S.type==="throw"&&(h=j,i.method="throw",i.arg=S.arg)}}}function E(e,t){var i=e.iterator[t.method];if(i===a){if(t.delegate=null,t.method==="throw"){if(e.iterator.return&&(t.method="return",t.arg=a,E(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=P(i,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=a);else return f;return t.delegate=null,L}w(p),d(p,v,"Generator"),d(p,n,function(){return this}),d(p,"toString",function(){return"[object Generator]"});function N(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 V(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function X(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}o.keys=function(e){var t=[];for(var i in e)t.push(i);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[n];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var i=-1,h=function f(){for(;++i<e.length;)if(u.call(e,i))return f.value=e[i],f.done=!1,f;return f.value=a,f.done=!0,f};return h.next=h}}return{next:$}}o.values=A;function $(){return{value:a,done:!0}}return X.prototype={constructor:X,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(V),!e)for(var t in this)t.charAt(0)==="t"&&u.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 i(D,S){return k.type="throw",k.arg=e,t.next=D,S&&(t.method="next",t.arg=a),!!S}for(var h=this.tryEntries.length-1;h>=0;--h){var f=this.tryEntries[h],k=f.completion;if(f.tryLoc==="root")return i("end");if(f.tryLoc<=this.prev){var C=u.call(f,"catchLoc"),Z=u.call(f,"finallyLoc");if(C&&Z){if(this.prev<f.catchLoc)return i(f.catchLoc,!0);if(this.prev<f.finallyLoc)return i(f.finallyLoc)}else if(C){if(this.prev<f.catchLoc)return i(f.catchLoc,!0)}else if(Z){if(this.prev<f.finallyLoc)return i(f.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var h=this.tryEntries[i];if(h.tryLoc<=this.prev&&u.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 k=f?f.completion:{};return k.type=e,k.arg=t,f?(this.method="next",this.next=f.finallyLoc,L):this.complete(k)},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 i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),V(i),L}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var h=i.completion;if(h.type==="throw"){var f=h.arg;V(i)}return f}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:A(e),resultName:t,nextLoc:i},this.method==="next"&&(this.arg=a),L}},o}(_.exports);try{regeneratorRuntime=s}catch(o){typeof globalThis=="object"?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}},695:function(_,s,o){"use strict";o.d(s,{Z:function(){return l}});function l(u){if(u.geometry&&u.geometry.dispose(),u.material){var a=Array.isArray(u.material)?u.material:[u.material];a.forEach(function(r){var n,c,v,d,g,P,T,R,W,j,L,B,G;(n=r.map)===null||n===void 0||n.dispose(),(c=r.lightMap)===null||c===void 0||c.dispose(),(v=r.bumpMap)===null||v===void 0||v.dispose(),(d=r.normalMap)===null||d===void 0||d.dispose(),(g=r.specularMap)===null||g===void 0||g.dispose(),(P=r.envMap)===null||P===void 0||P.dispose(),(T=r.alphaMap)===null||T===void 0||T.dispose(),(R=r.aoMap)===null||R===void 0||R.dispose(),(W=r.displacementMap)===null||W===void 0||W.dispose(),(j=r.emissiveMap)===null||j===void 0||j.dispose(),(L=r.gradientMap)===null||L===void 0||L.dispose(),(B=r.metalnessMap)===null||B===void 0||B.dispose(),(G=r.roughnessMap)===null||G===void 0||G.dispose(),r.dispose()})}}},490:function(_,s,o){"use strict";o.d(s,{U:function(){return u},v:function(){return l}});var l=function(a){for(var r=a.offsetLeft,n=a.offsetParent;n!==null;)r+=n.offsetLeft,n=n.offsetParent;var c;return document.compatMode==="BackCompat"||document.documentElement.scrollTop===0?c=document.body.scrollLeft:c=document.documentElement.scrollLeft,r-c},u=function(a){for(var r=a.offsetTop,n=a.offsetParent;n!==null;)r+=n.offsetTop,n=n.offsetParent;var c;return document.compatMode==="BackCompat"||document.documentElement.scrollTop===0?c=document.body.scrollTop:c=document.documentElement.scrollTop,r-c}},738:function(_,s,o){"use strict";o.d(s,{Z:function(){return u}});function l(a){return Object.prototype.toString.call(a)==="[object Object]"}function u(a){if(l(a)===!1)return!1;var r=a.constructor;if(r===void 0)return!0;var n=r.prototype;return!(l(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)}},282:function(_,s,o){"use strict";o.d(s,{Z:function(){return u}});var l=o(484);function u(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={};return n.promise=new Promise(function(c,v){n.resolve=c,n.reject=v}),a&&(n.promise=(0,l.Z)(n.promise,r)),n}},713:function(_,s,o){"use strict";o.d(s,{Z:function(){return l}});function l(u,a){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=(90-a)*Math.PI/180,c=(90-u)*Math.PI/180;return[r*Math.sin(n)*Math.cos(c),r*Math.cos(n),r*Math.sin(n)*Math.sin(c)]}},618:function(_,s,o){"use strict";o.d(s,{Z:function(){return a}});var l=o(438),u=function(){"use strict";function r(c){(0,l.Z)(this,r),this.onTick_=c,this.cancelPending_=null}var n=r.prototype;return n.tickAfter=function(v){var d=this;this.stop();var g=!0,P;this.cancelPending_=function(){clearTimeout(P),g=!1};var T=function(){g&&d.onTick_()};return P=window.setTimeout(T,v),this},n.stop=function(){this.cancelPending_&&(this.cancelPending_(),this.cancelPending_=null)},r}(),a=function(){"use strict";function r(c){(0,l.Z)(this,r),this.onTick_=c,this.ticker_=null}var n=r.prototype;return n.tickNow=function(){return this.stop(),this.onTick_(),this},n.tickAfter=function(v){var d=this;return this.stop(),this.ticker_=new u(function(){d.onTick_()}).tickAfter(v),this},n.tickEvery=function(v){var d=this;return this.stop(),this.ticker_=new u(function(){var g;(g=d.ticker_)===null||g===void 0||g.tickAfter(v),d.onTick_()}).tickAfter(v),this},n.stop=function(){this.ticker_&&(this.ticker_.stop(),this.ticker_=null)},r}()},484:function(_,s,o){"use strict";o.d(s,{Z:function(){return u}});var l=o(42);function u(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a.then(function(n){return(0,l.Z)({err:null,res:n},r)}).catch(function(n){return(0,l.Z)({err:n,res:void 0},r)})}},644:function(_){"use strict";_.exports=require("three")},943:function(_,s,o){"use strict";o.d(s,{Z:function(){return l}});function l(u,a){(a==null||a>u.length)&&(a=u.length);for(var r=0,n=new Array(a);r<a;r++)n[r]=u[r];return n}},982:function(_,s,o){"use strict";o.d(s,{Z:function(){return u}});var l=o(943);function u(a){if(Array.isArray(a))return(0,l.Z)(a)}},568:function(_,s,o){"use strict";o.d(s,{Z:function(){return u}});function l(a,r,n,c,v,d,g){try{var P=a[d](g),T=P.value}catch(R){n(R);return}P.done?r(T):Promise.resolve(T).then(c,v)}function u(a){return function(){var r=this,n=arguments;return new Promise(function(c,v){var d=a.apply(r,n);function g(T){l(d,c,v,g,P,"next",T)}function P(T){l(d,c,v,g,P,"throw",T)}g(void 0)})}}},438:function(_,s,o){"use strict";o.d(s,{Z:function(){return l}});function l(u,a){if(!(u instanceof a))throw new TypeError("Cannot call a class as a function")}},924:function(_,s,o){"use strict";o.d(s,{Z:function(){return l}});function l(u,a,r){return a in u?Object.defineProperty(u,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):u[a]=r,u}},375:function(_,s,o){"use strict";o.d(s,{Z:function(){return l}});function l(u){if(typeof Symbol!="undefined"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)}},270:function(_,s,o){"use strict";o.d(s,{Z:function(){return l}});function l(){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(_,s,o){"use strict";o.d(s,{Z:function(){return u}});var l=o(924);function u(a){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{},c=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(c=c.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),c.forEach(function(v){(0,l.Z)(a,v,n[v])})}return a}},342:function(_,s,o){"use strict";o.d(s,{Z:function(){return n}});var l=o(982),u=o(375),a=o(270),r=o(566);function n(c){return(0,l.Z)(c)||(0,u.Z)(c)||(0,r.Z)(c)||(0,a.Z)()}},566:function(_,s,o){"use strict";o.d(s,{Z:function(){return u}});var l=o(943);function u(a,r){if(!!a){if(typeof a=="string")return(0,l.Z)(a,r);var n=Object.prototype.toString.call(a).slice(8,-1);if(n==="Object"&&a.constructor&&(n=a.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return(0,l.Z)(a,r)}}}},z={};function y(_){var s=z[_];if(s!==void 0)return s.exports;var o=z[_]={exports:{}};return J[_](o,o.exports,y),o.exports}(function(){y.n=function(_){var s=_&&_.__esModule?function(){return _.default}:function(){return _};return y.d(s,{a:s}),s}})(),function(){y.d=function(_,s){for(var o in s)y.o(s,o)&&!y.o(_,o)&&Object.defineProperty(_,o,{enumerable:!0,get:s[o]})}}(),function(){y.o=function(_,s){return Object.prototype.hasOwnProperty.call(_,s)}}(),function(){y.r=function(_){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})}}();var F={};(function(){"use strict";y.r(F),y.d(F,{Chain:function(){return v},Timer:function(){return o.Z},clearAllCache:function(){return B},clearCache:function(){return L},colorCorrection:function(){return T},disposeMesh:function(){return g.Z},getCache:function(){return G},getElementViewLeft:function(){return I.v},getElementViewTop:function(){return I.U},isPlainObject:function(){return R.Z},makePromiseCreator:function(){return _.Z},polar2Cartesian:function(){return d.Z},to:function(){return s.Z}});var _=y(282),s=y(484),o=y(618),l=y(568),u=y(438),a=y(42),r=y(342),n=y(666),c=y.n(n),v=function(){"use strict";function M(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.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},m)}var O=M.prototype;return O.start=function(){return this.isPlaying?this:(this.index=0,this.isPlaying=!0,this.play())},O.stop1=function(){return this.isPlaying?(this.isPlaying=!1,this.repeatCount=0,this):this},O.stop=function(){return this.traverse(function(p){return p.stop1()}),this},O.dispose=function(){return this.stop(),this.chainedList=[],this.children=[],this},O.play=function(){var p=this;return(0,l.Z)(c().mark(function w(){var b;return c().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(b=p.chainedList[p.index],!(b&&p.isPlaying)){E.next=9;break}return E.next=4,Promise.all(b.map(function(N){return typeof N=="function"?N(p.repeatCount):N.start()}));case 4:return p.index+=1,E.next=7,p.play();case 7:E.next=17;break;case 9:if(!(!b&&p.isPlaying&&p.repeatCount<p.repeatNum)){E.next=16;break}return p.repeatCount+=1,p.index=0,E.next=14,p.play();case 14:E.next=17;break;case 16:!b&&p.isPlaying&&p.repeatCount===p.repeatNum&&p.stop();case 17:case"end":return E.stop()}},w)}))()},O.chain=function(){for(var p=arguments.length,w=new Array(p),b=0;b<p;b++)w[b]=arguments[b];var U=this;return(0,r.Z)(w).forEach(function(E){E instanceof M&&U.children.push(E)}),this.chainedList.push((0,r.Z)(w)),this},O.repeat=function(p){return this.repeatNum=p,this},O.timeout=function(p){return this.chain(function(){return new Promise(function(w){return setTimeout(w,p)})}),this},O.traverse=function(p){p(this),this.children.forEach(function(w){w.traverse(p)})},M}(),d=y(713),g=y(695),P=y(644);function T(M){if(M.material){var O=Array.isArray(M.material)?M.material:[M.material];O.forEach(function(m){var p,w;(p=m.color)===null||p===void 0||p.convertSRGBToLinear(),(w=m.emissive)===null||w===void 0||w.convertSRGBToLinear(),m.map&&(m.map.encoding=P.sRGBEncoding),m.emissiveMap&&(m.emissiveMap.encoding=P.sRGBEncoding)})}}var R=y(738),W=y(924),j=require("idb-keyval"),L=j.del,B=j.clear,G=function(){var M=(0,l.Z)(c().mark(function O(m,p){var w,b,U,E,N,V;return c().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return w=p.version,A.next=4,(0,j.get)(m);case 4:if(U=A.sent,!(U&&U[w])){A.next=9;break}b=U[w],A.next=15;break;case 9:return A.next=11,(0,s.Z)(fetch(m).then(function($){if($.ok)return $.blob();throw new Error}));case 11:E=A.sent,N=E.res,V=E.err,V||(b=N,(0,j.set)(m,(0,W.Z)({},w,N)));case 15:return A.abrupt("return",b?{url:URL.createObjectURL(b)}:{url:m});case 16:case"end":return A.stop()}},O)}));return function(m,p){return M.apply(this,arguments)}}(),I=y(490)})(),module.exports=F})();
@@ -0,0 +1 @@
1
+ export default function isPlainObject(o: any): boolean;
@@ -0,0 +1,6 @@
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;
@@ -0,0 +1 @@
1
+ export default function polar2Cartesian(lng: number, lat: number, r?: number): number[];
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,8 @@
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;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "gl-draw",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "author": "gitplus <hstits@gmail.com>",
5
5
  "scripts": {
6
- "start": "bundler-dev",
7
- "build": "BUILD_LIBRARY=src/vis/index bundler",
8
- "tsc": "tsc -p tsconfig.prod.json && tsc-alias -p tsconfig.prod.json && copyfiles -u 1 \"src/**/*.d.ts\" dist"
6
+ "start": "PORT=3002 bundler-dev",
7
+ "build": "BUILD_LIBRARY=src/vis/index bundler && yarn tsc",
8
+ "tsc": "tsc -p tsconfig.prod.json && tsc-alias -p tsconfig.prod.json && copyfiles -u 2 \"src/vis/**/*.d.ts\" dist"
9
9
  },
10
10
  "main": "dist/index.js",
11
11
  "files": [
@@ -27,27 +27,42 @@
27
27
  "memfs": "^3.4.4"
28
28
  },
29
29
  "devDependencies": {
30
+ "@types/three": "^0.136.0",
31
+ "copyfiles": "^2.4.1",
30
32
  "eslint-config-bundler": "^0.1.1",
31
33
  "eslint-import-resolver-webpack": "^0.13.2",
34
+ "events": "^3.3.0",
35
+ "ky": "^0.30.0",
32
36
  "msw": "^0.39.2",
37
+ "pinia": "^2.0.14",
33
38
  "regenerator-runtime": "^0.13.9",
34
39
  "stylelint": "^14.5.3",
35
40
  "stylelint-config-prettier": "^9.0.3",
36
41
  "stylelint-config-standard": "^25.0.0",
37
- "tailwindcss": "^3.1.4",
38
42
  "tailwind-config-bundler": "^0.1.0",
39
- "tsc-alias": "^1.6.4",
40
- "vue-bundler": "^0.1.27",
41
- "ky": "^0.30.0",
42
- "pinia": "^2.0.14",
43
+ "tailwindcss": "^3.1.4",
44
+ "tsc-alias": "^1.6.11",
43
45
  "vue": "^3.2.31",
44
46
  "vue-auto-routing": "^1.0.1",
47
+ "vue-bundler": "^0.1.28",
45
48
  "vue-router": "^4.0.14"
46
49
  },
47
50
  "dependencies": {
48
-
51
+ "@turf/boolean-clockwise": "^6.5.0",
52
+ "@turf/boolean-point-in-polygon": "^6.5",
53
+ "@tweenjs/tween.js": "^18.6.4",
54
+ "d3-array": "3",
55
+ "d3-geo": "3",
56
+ "d3-geo-voronoi": "^2.0",
57
+ "d3-scale": "4",
58
+ "deepmerge": "^4.2.2",
59
+ "delaunator": "5",
60
+ "earcut": "2",
61
+ "idb-keyval": "^6.1.0",
62
+ "lil-gui": "^0.16.1",
63
+ "three": "^0.136.0"
49
64
  },
50
65
  "msw": {
51
66
  "workerDirectory": "public"
52
67
  }
53
- }
68
+ }