{ "pandav:/index.js": { "cubeCode": "Cube('pandav:/com/ringIndicator3d/1.0.0',['pandav:/npm/bcore/0.0.18/event','pandav:/npm/react/17.0.2','pandav:/npm/react-dom/17.0.2','pandav:/com/ringIndicator3d/1.0.0/src/com.jsx','pandav:/npm/jquery/2.1.4'],function(a,b,c){var d=c('pandav:/npm/bcore/0.0.18/event'),e=c('pandav:/npm/react/17.0.2'),f=c('pandav:/npm/react-dom/17.0.2'),g=c('pandav:/com/ringIndicator3d/1.0.0/src/com.jsx'),h=c('pandav:/npm/jquery/2.1.4');return a.exports=d.extend(function(a,b){this.config={theme:{}},this.container=a,this.apis=b.apis,this.containSize={boxWidth:h(a)&&h(a).width(),boxHeight:h(a)&&h(a).height()},this.init(b)},{init:function(a){this.mergeConfig(a)},mergeConfig:function(a){var b;return a?(b=a,this.config=a):b=this.config,b},updateOptions:function(a){this.render(this._data,a)},data:function(a){return a&&(this._data=a),this._data},resize:function(a,b){this.containSize={boxWidth:a,boxHeight:b},this.render(this._data,this.config)},render:function(a,b){a=this.data(a);var c=this.mergeConfig(b);f.render(e.createElement(g,Object.assign({width:this.containSize.boxWidth,height:this.containSize.boxHeight,emit:this.emit.bind(this),configuration:c?.options,data:a,id:this.__id})),this.container)},destroy:function(){return!!this.container&&void(f.unmountComponentAtNode(this.container),this.container.innerHTML='')}}),a.exports});", "requires": [ "pandav:/src/com.jsx" ], "buildLevel": 1, "outputDir": "/com/ringIndicator3d/1.0.0", "outputPath": "/com/ringIndicator3d/1.0.0/index.js", "fileName": "/index.js" }, "pandav:/src/Label.jsx": { "cubeCode": "Cube('pandav:/com/ringIndicator3d/1.0.0/src/Label.jsx',['pandav:/npm/three/0.100.0/build/three'],function(a,b,c){function d(a){\"@babel/helpers - typeof\";return d='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},d(a)}function f(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function g(a,b){for(var c,d=0;darguments.length?a:c):f.value}},q.apply(this,arguments)}function r(a,b){for(;!Object.prototype.hasOwnProperty.call(a,b)&&(a=s(a),null!==a););return a}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function b(a){return a.__proto__||Object.getPrototypeOf(a)},s(a)}function t(a,b){if('function'!=typeof b&&null!==b)throw new TypeError('Super expression must either be null or a function');a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,'prototype',{writable:!1}),b&&u(a,b)}function u(a,b){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function c(a,b){return a.__proto__=b,a},u(a,b)}var v=c('pandav:/npm/three/0.100.0/build/three'),w=new v.Vector3,x=new v.Quaternion,y=new v.Vector3,z=function(a){function b(a){var c;return f(this,b),c=l(this,b),c.element=a||document.createElement('div'),c.element.style.position='absolute',c.element.style.pointerEvents='auto',c.element.style.userSelect='none',c.element.setAttribute('draggable',!1),c.addEventListener('removed',function(){c.traverse(function(a){return a.element instanceof Element&&null!==a.element.parentNode&&a.element.parentNode.removeChild(a.element)})}),c}return t(b,a),h(b,[{key:'copy',value:function d(a,c){return q(s(b.prototype),'copy',this).call(this,a,c),this.element=a.element.cloneNode(!0),this}}]),b}(v.Object3D);z.prototype.isCSS3DObject=!0;var A=function(a){function b(a){var c;return f(this,b),c=l(this,b,[a]),c.rotation2D=0,c}return t(b,a),h(b,[{key:'copy',value:function d(a,c){return q(s(b.prototype),'copy',this).call(this,a,c),this.rotation2D=a.rotation2D,this}}]),b}(z);A.prototype.isCSS3DSprite=!0;var B=new v.Matrix4,C=new v.Matrix4,D=h(function a(){function b(a){var b=Math.abs;return 1e-10>b(a)?0:a}function c(a){var c=a.elements;return'matrix3d('+b(c[0])+','+b(-c[1])+','+b(c[2])+','+b(c[3])+','+b(c[4])+','+b(-c[5])+','+b(c[6])+','+b(c[7])+','+b(c[8])+','+b(-c[9])+','+b(c[10])+','+b(c[11])+','+b(c[12])+','+b(-c[13])+','+b(c[14])+','+b(c[15])+')'}function d(a){var c=a.elements;return'translate(-50%,-50%)matrix3d('+b(c[0])+','+b(c[1])+','+b(c[2])+','+b(c[3])+','+b(-c[4])+','+b(-c[5])+','+b(-c[6])+','+b(-c[7])+','+b(c[8])+','+b(c[9])+','+b(c[10])+','+b(c[11])+','+b(c[12])+','+b(c[13])+','+b(c[14])+','+b(c[15])+')'}f(this,a);var g,h,j,k,l=this,e={camera:{fov:0,style:''},objects:new WeakMap},m=document.createElement('div');m.style.overflow='hidden',this.domElement=m;var n=document.createElement('div');n.style.transformStyle='preserve-3d',n.style.pointerEvents='none',m.appendChild(n),this.getSize=function(){return{width:g,height:h}},this.render=function(a,f){function g(a,b,c,f){if(a.isCSS3DObject){var h;a.onBeforeRender(l,b,c),a.isCSS3DSprite?(B.copy(c.matrixWorldInverse),B.transpose(),0!==a.rotation2D&&B.multiply(C.makeRotationZ(a.rotation2D)),a.matrixWorld.decompose(w,x,y),B.setPosition(w),B.scale(y),B.elements[3]=0,B.elements[7]=0,B.elements[11]=0,B.elements[15]=1,h=d(B)):h=d(a.matrixWorld);var i=a.element,j=e.objects.get(a);(void 0===j||j.style!==h)&&(i.style.transform=h,e.objects.set(a,{style:h})),i.style.display=a.visible?'':'none',i.parentNode!==n&&n.appendChild(i),a.onAfterRender(l,b,c)}a.children.map(function(a){return g(a,b,c,f)})}var h,i,o=f.projectionMatrix.elements[5]*k;e.camera.fov!==o&&(m.style.perspective=f.isPerspectiveCamera?''.concat(o,'px'):'',e.camera.fov=o),!0===a.autoUpdate&&a.updateMatrixWorld(),null===f.parent&&f.updateMatrixWorld(),f.isOrthographicCamera&&(h=-(f.right+f.left)/2,i=(f.top+f.bottom)/2);var p=f.isOrthographicCamera?'scale('.concat(o,')translate(').concat(b(h),'px, ').concat(b(i),'px)').concat(c(f.matrixWorldInverse)):'translateZ('.concat(o,'px)').concat(c(f.matrixWorldInverse)),q=''.concat(p,'translate(').concat(j,'px, ').concat(k,'px)');e.camera.style!==q&&(n.style.transform=q,e.camera.style=q),g(a,a,f,p)},this.setSize=function(a,b){g=a,h=b,j=g/2,k=h/2,m.style.width=a+'px',m.style.height=b+'px',n.style.width=a+'px',n.style.height=b+'px'}});return a.exports={BaseObject:z,FaceCameraLabel:A,Renderer:D},a.exports});", "requires": [], "buildLevel": 4, "outputDir": "/com/ringIndicator3d/1.0.0/src", "outputPath": "/com/ringIndicator3d/1.0.0/src/Label.jsx", "fileName": "/src/Label.jsx" }, "pandav:/src/Board.jsx": { "cubeCode": "Cube('pandav:/com/ringIndicator3d/1.0.0/src/Board.jsx',['pandav:/npm/react/17.0.2','pandav:/npm/react-dom/17.0.2','pandav:/com/ringIndicator3d/1.0.0/src/Label.jsx','pandav:/com/tween-animation/2.0.0','pandav:/com/submodule-three-3d/1.0.0'],function(a,b,c){function d(a){\"@babel/helpers - typeof\";return d='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},d(a)}function e(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function f(a,b){for(var c,d=0;d=this.timerCarousel&&(this.timerCarousel=this.carouselDuration,this.switch(this.curIndex+1*this.carouselDir)),this.timerCarousel-=a),this.aniRotate.update(),this.updateBoard(this.aniRotate.value)}},{key:'initThree',value:function a(){var b=this.props,c=b.width,d=b.height;this.renderer=new C,this.renderer.setSize(c,d),this.domContainer.appendChild(this.renderer.domElement),this.scene=new u.Scene,this.camera=new u.PerspectiveCamera(45,c/d,.001,1e5)}},{key:'initBoard',value:function a(){for(;0a?this.data.length+a:a,a%this.data.length}},{key:'carousel',value:function a(){this.timerCarousel&&clearInterval(this.timerCarousel);var b=this.config.chart,c=b.duration,d=b.carousel,e=d.show,f=d.interval,g=d.clickPauseDuration,h=d.direction;this.clickPauseDuration=1e3*g,e&&(this.carouselDuration=1e3*(f+c),this.timerCarousel=this.carouselDuration),this.autoSwitch=e,this.carouselDir='\\u987A\\u65F6\\u9488'==h?1:-1,this.isHover=!1,this.carouselHoverEnable=this.config.chart.carousel.hover}},{key:'refreshIconMap',value:function a(){var b=this;this.selectedIconMap.clear(),Object.values(this.config.board.selected.iconList).forEach(function(a){return b.selectedIconMap.set(a.name,a)}),this.normalIconMap.clear(),Object.values(this.config.board.normal.iconList).forEach(function(a){return b.normalIconMap.set(a.name,a)})}},{key:'refresh',value:function b(a){this.data=this.reduceData(a.data)}},{key:'preloadImage',value:function b(a){var c=this;Object.values(a).forEach(function(a){var b=a.image;c.preloadMap.has(b)||fetch(b).then(function(a){a.blob().then(function(a){var d=URL.createObjectURL(a);c.preloadMap.set(b,d),c.forceUpdate()})})})}},{key:'lateRender',value:function a(){var b=this,c=this.config,d=c.chart,e=d.faceCamera,f=d.cameraPosition,g=d.radius,h=d.carousel,i=d.duration,j=c.board;this.hook('refreshSelectedIconList',function(){b.preloadImage(j.selected.iconList)},[j.selected.iconList,j.normal.iconList]),this.hook('refreshNormalIconList',function(){b.preloadImage(j.normal.iconList)},[j.normal.iconList]),this.camera.position.set(f.x,f.y,f.z),this.camera.lookAt(new u.Vector3(0,0,0)),this.radius=g,this.initRotationMap(),this.refreshIconMap(),this.hook('initBoard',function(){b.initBoard(),b.aniRotate=new A(0),b.aniRotate.enable=!0},[this.data],[e]),this.aniRotate.setDuration(1e3*this.config.chart.duration),this.boardList.forEach(function(a,c){return a.refresh(b.config,b.data[c])}),this.hook('carousel',function(){0f?2*b+f:f;this.aniRotate._value=g,this.aniRotate.value=function(a,c){var d=Math.abs,e=d(c-a),f=a