forked from mokargas/aframe-colorwheel-component
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aframe-colorwheel-component.min.js
2 lines (2 loc) · 20.3 KB
/
aframe-colorwheel-component.min.js
1
2
!function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="/dist/",e(0)}([function(t,e,r){t.exports=r(1)},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var n=r(2),s=i(n),o=r(4),a=i(o),h=r(5);AFRAME.registerComponent("colorwheel",{dependencies:["raycaster"],tweenDuration:280,tweenEasing:TWEEN.Easing.Cubic.Out,padding:.15,hsv:{h:0,s:0,v:1},defaultMaterial:{color:"#ffffff",flatShading:!0,transparent:!0,shader:"flat",fog:!1,side:"double"},color:"#ffffff",schema:{disabled:{type:"boolean",default:!1},backgroundColor:{type:"color",default:"#FFF"},wheelSize:{type:"number",default:.4},showSelection:{type:"boolean",default:!0},selectionSize:{type:"number",default:.1},showHexValue:{type:"boolean",default:!1},showSwatches:{type:"boolean",default:!1},swatches:{type:"array",default:["#000000","#FFFFFF","#ff0045","#2aa8dc","#ffed00","#4c881d","#b14bff"]}},init:function(){var t=this,e=this,r=this.padding,i=this.defaultMaterial;if(this.swatchReady=!1,this.backgroundWidth=this.backgroundHeight=2*this.data.wheelSize,this.brightnessSliderHeight=2*(this.data.wheelSize+r),this.brightnessSliderWidth=.1,AFRAME.components.hasOwnProperty("rounded")?(this.background=document.createElement("a-rounded"),this.background.setAttribute("radius",.02),this.background.setAttribute("position",{x:-(this.data.wheelSize+r),y:-(this.data.wheelSize+r),z:-.001})):(this.background=document.createElement("a-plane"),this.background.setAttribute("position",{x:0,y:0,z:-.001})),this.background.setAttribute("width",this.backgroundWidth+2*r),this.background.setAttribute("height",this.backgroundHeight+2*r),this.background.setAttribute("material","shader","flat"),this.background.setAttribute("side","double"),this.el.appendChild(this.background),this.swatchContainer=document.createElement("a-plane"),this.swatchContainer.setAttribute("class","swatch-container"),this.swatchContainer.setAttribute("material",this.defaultMaterial),this.swatchContainer.addEventListener("loaded",this.onSwatchReady.bind(this)),this.swatchContainer.setAttribute("rotation",{x:-30,y:0,z:0}),this.el.appendChild(this.swatchContainer),this.data.showHexValue){var n=.1,s=2*(this.data.wheelSize+r);this.hexValueText=document.createElement("a-entity"),this.hexValueText.setAttribute("geometry",{primitive:"plane",width:s-this.brightnessSliderWidth,height:n}),this.hexValueText.setAttribute("material",i),this.hexValueText.setAttribute("position",{x:-this.brightnessSliderWidth,y:this.data.wheelSize+n,z:0}),this.hexValueText.setAttribute("material","opacity",0),this.hexValueText.setAttribute("text",{width:s,height:n,align:"right",baseline:"center",wrapCount:20.4,color:"#666"}),this.hexValueText.addEventListener("click",this.onHexValueClicked.bind(this)),this.el.appendChild(this.hexValueText)}this.colorWheel=document.createElement("a-circle"),this.colorWheel.setAttribute("radius",this.data.wheelSize),this.colorWheel.setAttribute("material",i),this.colorWheel.setAttribute("position",{x:0,y:0,z:.001}),this.el.appendChild(this.colorWheel),this.brightnessSlider=document.createElement("a-plane"),this.brightnessSlider.setAttribute("width",this.brightnessSliderWidth),this.brightnessSlider.setAttribute("height",this.brightnessSliderHeight),this.brightnessSlider.setAttribute("material",i),this.brightnessSlider.setAttribute("position",{x:this.data.wheelSize+this.brightnessSliderWidth,y:0,z:.001}),this.el.appendChild(this.brightnessSlider),this.data.showSelection&&(this.selectionEl=document.createElement("a-circle"),this.selectionEl.setAttribute("radius",this.data.selectionSize),this.selectionEl.setAttribute("material",i),this.selectionEl.setAttribute("position",{x:-this.data.wheelSize,y:this.data.wheelSize,z:.001}),this.el.appendChild(this.selectionEl)),this.colorCursorOptions={cursorRadius:.025,cursorSegments:32,cursorColor:new THREE.Color(0)},this.colorCursorOptions.cursorMaterial=new THREE.MeshBasicMaterial({color:this.colorCursorOptions.cursorColor,transparent:!0}),this.colorCursor=document.createElement("a-entity"),this.brightnessCursor=document.createElement("a-entity");var o=new THREE.TorusBufferGeometry(this.colorCursorOptions.cursorRadius,this.colorCursorOptions.cursorRadius-.02,this.colorCursorOptions.cursorSegments,this.colorCursorOptions.cursorSegments/4);this.colorCursor.setObject3D("mesh",new THREE.Mesh(o,this.colorCursorOptions.cursorMaterial)),this.brightnessCursor.setObject3D("mesh",new THREE.Mesh(o,this.colorCursorOptions.cursorMaterial)),this.el.appendChild(this.colorCursor),this.brightnessSlider.appendChild(this.brightnessCursor),this.brightnessCursor.setAttribute("position",{x:0,y:this.brightnessSliderHeight/2,z:0}),this.bindMethods(),setTimeout(function(){e.el.initColorWheel(),e.el.initBrightnessSlider(),e.el.refreshRaycaster(),e.data.showSwatches&&e.el.generateSwatches(e.data.swatches),e.colorWheel.addEventListener("click",t.onColorWheelClicked.bind(t)),e.brightnessSlider.addEventListener("click",t.onBrightnessSliderClicked.bind(t))},5)},setPositionTween:function(t,e,r){return this.tween=new TWEEN.Tween(e).to(r,this.tweenDuration).onUpdate(function(){t.position.x=this.x,t.position.y=this.y,t.position.z=this.z}).easing(this.tweenEasing).start(),this.tween},setColorTween:function(t,e,r){return this.tween=new TWEEN.Tween(new THREE.Color(e)).to(r,this.tweenDuration).onUpdate(function(){t.color.r=this.r,t.color.g=this.g,t.color.b=this.b}).easing(this.tweenEasing).start(),this.tween},onColorWheelClicked:function(t){this.data.disabled||this.el.onHueDown(t.detail.intersection.point)},onBrightnessSliderClicked:function(t){this.data.disabled||this.el.onBrightnessDown(t.detail.intersection.point)},onHexValueClicked:function(){(0,s.default)(this.hexValueText.getAttribute("text").value)},generateSwatches:function(t){if(void 0!==t){var e=2*(this.data.wheelSize+this.padding),r=.15,i=e/t.length;this.swatchContainer.setAttribute("width",e),this.swatchContainer.setAttribute("height",r),this.swatchContainer.setAttribute("position",{x:0,y:-this.backgroundHeight+r,z:.03});for(var n=0;n<t.length;n++){var s=t[n],o=document.createElement("a-plane");o.setAttribute("material",this.defaultMaterial),o.setAttribute("width",i),o.setAttribute("height",r),o.setAttribute("color",s),o.setAttribute("class","swatch"),o.setAttribute("position",{x:-(e-i)/2+n*i,y:0,z:.001}),o.addEventListener("click",this.onSwatchClicked.bind(this,s)),this.swatchContainer.appendChild(o)}this.el.refreshRaycaster()}},bindMethods:function(){this.el.generateSwatches=this.generateSwatches.bind(this),this.el.initColorWheel=this.initColorWheel.bind(this),this.el.initBrightnessSlider=this.initBrightnessSlider.bind(this),this.el.updateColor=this.updateColor.bind(this),this.el.onHueDown=this.onHueDown.bind(this),this.el.onBrightnessDown=this.onBrightnessDown.bind(this),this.el.refreshRaycaster=this.refreshRaycaster.bind(this),this.el.clearSwatches=this.clearSwatches.bind(this)},onSwatchReady:function(){this.swatchReady=!0},clearSwatches:function(){if(this.swatchReady)for(;this.swatchContainer.firstChild;)this.swatchContainer.removeChild(this.swatchContainer.firstChild)},refreshRaycaster:function(){var t=AFRAME.scenes[0].querySelector("[raycaster]");t.components.raycaster.refreshObjects()},initBrightnessSlider:function(){var t="\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }\n ",e="\n uniform vec3 color1;\n uniform vec3 color2;\n varying vec2 vUv;\n\n void main(){\n vec4 c1 = vec4(color1, 1.0);\n \t vec4 c2 = vec4(color2, 1.0);\n\n vec4 color = mix(c2, c1, smoothstep(0.0, 1.0, vUv.y));\n gl_FragColor = color;\n }\n ",r=new THREE.ShaderMaterial({uniforms:{color1:{type:"c",value:new THREE.Color(16777215)},color2:{type:"c",value:new THREE.Color(0)}},vertexShader:t,fragmentShader:e});this.brightnessSlider.getObject3D("mesh").material=r,this.brightnessSlider.getObject3D("mesh").material.needsUpdate=!0},initColorWheel:function(){var t=this.colorWheel.getObject3D("mesh"),e="\n\n varying vec2 vUv;\n void main() {\n vUv = uv;\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * mvPosition;\n }\n ",r="\n #define M_PI2 6.28318530718\n uniform float brightness;\n varying vec2 vUv;\n vec3 hsb2rgb(in vec3 c){\n vec3 rgb = clamp(abs(mod(c.x * 6.0 + vec3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0, 0.0, 1.0 );\n rgb = rgb * rgb * (3.0 - 2.0 * rgb);\n return c.z * mix( vec3(1.0), rgb, c.y);\n }\n\n void main() {\n vec2 toCenter = vec2(0.5) - vUv;\n float angle = atan(toCenter.y, toCenter.x);\n float radius = length(toCenter) * 2.0;\n vec3 color = hsb2rgb(vec3((angle / M_PI2) + 0.5, radius, brightness));\n gl_FragColor = vec4(color, 1.0);\n }\n ",i=new THREE.ShaderMaterial({uniforms:{brightness:{type:"f",value:this.hsv.v}},vertexShader:e,fragmentShader:r});t.material=i,t.material.needsUpdate=!0},onSwatchClicked:function(t){var e=this.colorWheel.getObject3D("mesh"),r=this.brightnessCursor.getObject3D("mesh"),i=(this.brightnessSlider.getObject3D("mesh"),this.hexToRgb(t));this.hsv=this.rgbToHsv(i.r,i.g,i.b);var n=2*this.hsv.h*Math.PI,s=this.hsv.s*this.data.wheelSize,o=s*Math.cos(n),a=s*Math.sin(n),h=e.position.z,l=new THREE.Vector3(o,a,h);e.localToWorld(l),this.onHueDown(l);var c=this.hsv.v*this.brightnessSliderHeight,u=c-this.brightnessSliderHeight,d=new THREE.Vector3(0,u,0);this.setPositionTween(r,r.position,d),e.material.uniforms.brightness.value=this.hsv.v},onBrightnessDown:function(t){var e=this.brightnessSlider.getObject3D("mesh"),r=this.brightnessCursor.getObject3D("mesh"),i=this.colorWheel.getObject3D("mesh");e.updateMatrixWorld(),e.worldToLocal(t);var n=t.y+this.brightnessSliderHeight/2,s=n/this.brightnessSliderHeight,o={x:0,y:t.y-this.brightnessSliderHeight/2,z:0};this.setPositionTween(r,r.position,o),i.material.uniforms.brightness.value=s,this.hsv.v=s,this.el.updateColor()},onHueDown:function(t){var e=this.colorWheel.getObject3D("mesh"),r=this.colorCursor.getObject3D("mesh"),i=this.data.wheelSize;e.updateMatrixWorld(),e.worldToLocal(t),this.setPositionTween(r,r.position,t);var n={r:Math.sqrt(t.x*t.x+t.y*t.y),theta:Math.PI+Math.atan2(t.y,t.x)},s=(n.theta*(180/Math.PI)+180)%360;this.hsv.h=s/360,this.hsv.s=n.r/i,this.el.updateColor()},updateColor:function(){var t=this.hsvToRgb(this.hsv),e="rgb("+t.r+", "+t.g+", "+t.b+")",r="#"+new THREE.Color(e).getHexString(),i=this.selectionEl.getObject3D("mesh"),n=this.colorCursor.getObject3D("mesh"),s=this.brightnessCursor.getObject3D("mesh");this.data.showSelection&&(this.setColorTween(i.material,i.material.color,new THREE.Color(e)),i.material.needsUpdate=!0),this.hsv.v>=.5?(this.setColorTween(n.material,n.material.color,new THREE.Color(0)),this.setColorTween(s.material,s.material.color,new THREE.Color(0))):(this.setColorTween(n.material,n.material.color,new THREE.Color(16777215)),this.setColorTween(s.material,s.material.color,new THREE.Color(16777215))),this.data.showHexValue&&this.hexValueText.setAttribute("text","value",r);var o={style:e,rgb:t,hsv:this.hsv,hex:r};h.emit(this.el,"changecolor",o),h.emit(document.body,"didchangecolor",o)},hexToRgb:function(t){var e=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,r,i){return"#"+e+e+r+r+i+i}).substring(1).match(/.{2}/g).map(function(t){return parseInt(t,16)});return{r:e[0],g:e[1],b:e[2]}},rgbToHsv:function(t,e,r){var i,n=Math.max(t,e,r),s=Math.min(t,e,r),o=n-s,a=0===n?0:o/n,h=n;switch(1===arguments.length&&(e=t.g,r=t.b,t=t.r),n){case s:i=0;break;case t:i=e-r+o*(e<r?6:0),i/=6*o;break;case e:i=r-t+2*o,i/=6*o;break;case r:i=t-e+4*o,i/=6*o}return{h:i,s:a,v:h/255}},hsvToRgb:function(t){var e,r,i,n,s,o,a,h,l=THREE.Math.clamp(t.h,0,1),c=THREE.Math.clamp(t.s,0,1),u=t.v;switch(n=Math.floor(6*l),s=6*l-n,o=u*(1-c),a=u*(1-s*c),h=u*(1-(1-s)*c),n%6){case 0:e=u,r=h,i=o;break;case 1:e=a,r=u,i=o;break;case 2:e=o,r=u,i=h;break;case 3:e=o,r=a,i=u;break;case 4:e=h,r=o,i=u;break;case 5:e=u,r=o,i=a}return{r:Math.round(255*e),g:Math.round(255*r),b:Math.round(255*i)}},update:function(t){if(t){this.data.backgroundColor!==t.backgroundColor&&this.background.setAttribute("color",this.data.backgroundColor);var e=(0,a.default)(t.swatches,this.data.swatches).length>0;e&&this.data.showSwatches&&this.data.swatches.filter(function(t){return 7===t.length}).length===this.data.swatches.length&&this.swatchReady&&(this.el.clearSwatches(),this.el.generateSwatches(this.data.swatches))}},tick:function(){},remove:function(){var t=this;this.colorWheel.removeEventListener("click",this.onColorWheelClicked),this.brightnessSlider.removeEventListener("click",this.onBrightnessSliderClicked),this.swatchContainer.removeEventListener("loaded",this.onSwatchReady),this.hexValueText.removeEventListener("click",this.onHexValueClicked),this.swatchContainer&&this.swatchContainer.getObject3D("mesh").children.forEach(function(e){return e.removeEventListener("click",t)})},pause:function(){},play:function(){}}),AFRAME.registerPrimitive("a-colorwheel",{defaultComponents:{colorwheel:{}},mappings:{disabled:"colorwheel.disabled",backgroundcolor:"colorwheel.backgroundColor",showselection:"colorwheel.showSelection",wheelsize:"colorwheel.wheelSize",selectionsize:"colorwheel.selectionSize",showhexvalue:"colorwheel.showHexValue",showswatches:"colorwheel.showSwatches",swatches:"colorwheel.swatches"}})},function(t,e,r){"use strict";function i(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}function n(t,e){var r,n,a,h,l,c,u=!1;e||(e={}),r=e.debug||!1;try{a=s(),h=document.createRange(),l=document.getSelection(),c=document.createElement("span"),c.textContent=t,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",document.body.appendChild(c),h.selectNode(c),l.addRange(h);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");u=!0}catch(s){r&&console.error("unable to copy using execCommand: ",s),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData("text",t),u=!0}catch(s){r&&console.error("unable to copy using clipboardData: ",s),r&&console.error("falling back to prompt"),n=i("message"in e?e.message:o),window.prompt(n,t)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(h):l.removeAllRanges()),c&&document.body.removeChild(c),a()}return u}var s=r(3),o="Copy to clipboard: #{key}, Enter";t.exports=n},function(t,e){t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],i=0;i<t.rangeCount;i++)r.push(t.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||r.forEach(function(e){t.addRange(e)}),e&&e.focus()}}},function(t,e){(function(e){function r(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function i(t,e){var r=t?t.length:0;return!!r&&h(t,e,0)>-1}function n(t,e,r){for(var i=-1,n=t?t.length:0;++i<n;)if(r(e,t[i]))return!0;return!1}function s(t,e){for(var r=-1,i=t?t.length:0,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}function o(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}function a(t,e,r,i){for(var n=t.length,s=r+(i?1:-1);i?s--:++s<n;)if(e(t[s],s,t))return s;return-1}function h(t,e,r){if(e!==e)return a(t,l,r);for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}function l(t){return t!==t}function c(t){return function(e){return t(e)}}function u(t,e){return t.has(e)}function d(t,e){return null==t?void 0:t[e]}function g(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function f(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function b(){this.__data__=Tt?Tt(null):{}}function p(t){return this.has(t)&&delete this.__data__[t]}function v(t){var e=this.__data__;if(Tt){var r=e[t];return r===et?void 0:r}return vt.call(e,t)?e[t]:void 0}function w(t){var e=this.__data__;return Tt?void 0!==e[t]:vt.call(e,t)}function m(t,e){var r=this.__data__;return r[t]=Tt&&void 0===e?et:e,this}function y(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function C(){this.__data__=[]}function S(t){var e=this.__data__,r=D(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():St.call(e,r,1),!0}function E(t){var e=this.__data__,r=D(e,t);return r<0?void 0:e[r][1]}function x(t){return D(this.__data__,t)>-1}function _(t,e){var r=this.__data__,i=D(r,t);return i<0?r.push([t,e]):r[i][1]=e,this}function T(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function A(){this.__data__={hash:new f,map:new(_t||y),string:new f}}function k(t){return U(this,t).delete(t)}function R(t){return U(this,t).get(t)}function H(t){return U(this,t).has(t)}function M(t,e){return U(this,t).set(t,e),this}function O(t){var e=-1,r=t?t.length:0;for(this.__data__=new T;++e<r;)this.add(t[e])}function z(t){return this.__data__.set(t,et),this}function j(t){return this.__data__.has(t)}function D(t,e){for(var r=t.length;r--;)if(q(t[r][0],e))return r;return-1}function W(t,e,r,o){var a=-1,h=i,l=!0,d=t.length,g=[],f=e.length;if(!d)return g;r&&(e=s(e,c(r))),o?(h=n,l=!1):e.length>=tt&&(h=u,l=!1,e=new O(e));t:for(;++a<d;){var b=t[a],p=r?r(b):b;if(b=o||0!==b?b:0,l&&p===p){for(var v=f;v--;)if(e[v]===p)continue t;g.push(b)}else h(e,p,o)||g.push(b)}return g}function V(t,e,r,i,n){var s=-1,a=t.length;for(r||(r=L),n||(n=[]);++s<a;){var h=t[s];e>0&&r(h)?e>1?V(h,e-1,r,i,n):o(n,h):i||(n[n.length]=h)}return n}function F(t){if(!Y(t)||$(t))return!1;var e=K(t)||g(t)?mt:at;return e.test(N(t))}function P(t,e){return e=xt(void 0===e?t.length-1:e,0),function(){for(var i=arguments,n=-1,s=xt(i.length-e,0),o=Array(s);++n<s;)o[n]=i[e+n];n=-1;for(var a=Array(e+1);++n<e;)a[n]=i[n];return a[e]=o,r(t,this,a)}}function U(t,e){var r=t.__data__;return I(e)?r["string"==typeof e?"string":"hash"]:r.map}function B(t,e){var r=d(t,e);return F(r)?r:void 0}function L(t){return kt(t)||G(t)||!!(Et&&t&&t[Et])}function I(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function $(t){return!!bt&&bt in t}function N(t){if(null!=t){try{return pt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function q(t,e){return t===e||t!==t&&e!==e}function G(t){return J(t)&&vt.call(t,"callee")&&(!Ct.call(t,"callee")||wt.call(t)==it)}function X(t){return null!=t&&Q(t.length)&&!K(t)}function J(t){return Z(t)&&X(t)}function K(t){var e=Y(t)?wt.call(t):"";return e==nt||e==st}function Q(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=rt}function Y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Z(t){return!!t&&"object"==typeof t}var tt=200,et="__lodash_hash_undefined__",rt=9007199254740991,it="[object Arguments]",nt="[object Function]",st="[object GeneratorFunction]",ot=/[\\^$.*+?()[\]{}|]/g,at=/^\[object .+?Constructor\]$/,ht="object"==typeof e&&e&&e.Object===Object&&e,lt="object"==typeof self&&self&&self.Object===Object&&self,ct=ht||lt||Function("return this")(),ut=Array.prototype,dt=Function.prototype,gt=Object.prototype,ft=ct["__core-js_shared__"],bt=function(){var t=/[^.]+$/.exec(ft&&ft.keys&&ft.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),pt=dt.toString,vt=gt.hasOwnProperty,wt=gt.toString,mt=RegExp("^"+pt.call(vt).replace(ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yt=ct.Symbol,Ct=gt.propertyIsEnumerable,St=ut.splice,Et=yt?yt.isConcatSpreadable:void 0,xt=Math.max,_t=B(ct,"Map"),Tt=B(Object,"create");f.prototype.clear=b,f.prototype.delete=p,f.prototype.get=v,f.prototype.has=w,f.prototype.set=m,y.prototype.clear=C,y.prototype.delete=S,y.prototype.get=E,y.prototype.has=x,y.prototype.set=_,T.prototype.clear=A,T.prototype.delete=k,T.prototype.get=R,T.prototype.has=H,T.prototype.set=M,O.prototype.add=O.prototype.push=z,O.prototype.has=j;var At=P(function(t,e){return J(t)?W(t,V(e,1,J,!0)):[]}),kt=Array.isArray;t.exports=At}).call(e,function(){return this}())},function(t,e){"use strict";t.exports={emit:function(t,e,r){t.dispatchEvent(new CustomEvent(e,{detail:r}))}}}]);
//# sourceMappingURL=aframe-colorwheel-component.min.js.map