-
Notifications
You must be signed in to change notification settings - Fork 2
/
aframe-area-light-component.min.js.map
1 lines (1 loc) · 10.4 KB
/
aframe-area-light-component.min.js.map
1
{"version":3,"sources":["webpack:///aframe-area-light-component.min.js","webpack:///webpack/bootstrap cbdfdd777ea7884199cb?ff92","webpack:///./index.js?2645"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","AFRAME","Error","THREE","registerComponent","schema","intensity","type","default","color","width","height","helperColor","undefined","showHelper","init","this","setHelperColor","bind","rectLight","RectAreaLight","data","position","set","el","object3D","add","rectLightHelper","RectAreaLightHelper","x","children","forEach","node","material","update","oldData","visible"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDMM,SAAUI,EAAQD,GAEvB,YEtCD,IAAsB,mBAAXQ,QACT,KAAM,IAAIC,OAAM,+DAGlB,IAAqB,mBAAVC,OACT,KAAM,IAAID,OAAM,8DAGlBD,QAAOG,kBAAkB,cACvBC,QACEC,WACEC,KAAM,SACNC,QAAS,GAEXC,OACEF,KAAM,QACNC,QAAS,WAEXE,OACEH,KAAM,SACNC,QAAS,GAEXG,QACEJ,KAAM,SACNC,QAAS,GAEXI,aACEL,KAAM,QACNC,QAASK,QAEXC,YACEP,KAAM,UACNC,SAAS,IAIbO,KAAM,WACJC,KAAKC,eAAiBD,KAAKC,eAAeC,KAAKF,MAE/CA,KAAKG,UAAY,GAAIhB,OAAMiB,cAAcJ,KAAKK,KAAKZ,MAAOO,KAAKK,KAAKf,UAAWU,KAAKK,KAAKX,MAAOM,KAAKK,KAAKV,QAC1GK,KAAKG,UAAUG,SAASC,IAAIP,KAAKK,KAAKX,MAAQ,EAAG,EAAG,GACpDM,KAAKQ,GAAGC,SAASC,IAAIV,KAAKG,WAGtBH,KAAKK,KAAKP,aAEZE,KAAKW,gBAAkB,GAAIxB,OAAMyB,oBAAoBZ,KAAKG,WAC1DH,KAAKW,gBAAgBL,SAASC,IAAIP,KAAKG,UAAUG,SAASO,EAAG,EAAG,GAChEb,KAAKQ,GAAGC,SAASC,IAAIV,KAAKW,iBAGId,SAA1BG,KAAKK,KAAKT,YACZI,KAAKC,eAAeD,KAAKK,KAAKT,aAE9BI,KAAKC,eAAeD,KAAKK,KAAKZ,SAMpCQ,eAAgB,SAASR,GAGvBO,KAAKW,gBAAgBG,SAASC,QAAQ,SAAAC,GAAA,MAAQA,GAAKC,SAASxB,MAAMc,IAAId,MAGxEyB,OAAQ,SAASC,GAGfnB,KAAKG,UAAUb,UAAYU,KAAKK,KAAKf,UACrCU,KAAKG,UAAUT,MAAQM,KAAKK,KAAKX,MACjCM,KAAKG,UAAUR,OAASK,KAAKK,KAAKV,OAClCK,KAAKG,UAAUV,MAAMc,IAAKP,KAAKK,KAAKZ,OAEPI,SAAzBG,KAAKW,kBACPX,KAAKW,gBAAgBS,QAAUpB,KAAKK,KAAKP,WAGzCE,KAAKW,gBAAgBO,SAESrB,SAA1BG,KAAKK,KAAKT,YACZI,KAAKC,eAAeD,KAAKK,KAAKT,aAE9BI,KAAKC,eAAeD,KAAKK,KAAKZ","file":"aframe-area-light-component.min.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * A-Frame Wrapper for THREE.JS RectAreaLight\n\t * @author Mo Kargas (DEVLAD) [email protected]\n\t */\n\t\n\t/* global AFRAME */\n\t/* global THREE */\n\t\n\tif (typeof AFRAME === 'undefined') {\n\t throw new Error('Component attempted to register before AFRAME was available.');\n\t}\n\t\n\tif (typeof THREE === 'undefined') {\n\t throw new Error('Component attempted to register before THREE was available.');\n\t}\n\t\n\tAFRAME.registerComponent('area-light', {\n\t schema: {\n\t intensity: {\n\t type: 'number',\n\t default: 1.0\n\t },\n\t color: {\n\t type: 'color',\n\t default: '#FFFFFF'\n\t },\n\t width: {\n\t type: 'number',\n\t default: 2.0\n\t },\n\t height: {\n\t type: 'number',\n\t default: 2.0\n\t },\n\t helperColor: {\n\t type: 'color',\n\t default: undefined\n\t },\n\t showHelper: {\n\t type: 'boolean',\n\t default: true\n\t }\n\t },\n\t\n\t init: function init() {\n\t this.setHelperColor = this.setHelperColor.bind(this);\n\t\n\t this.rectLight = new THREE.RectAreaLight(this.data.color, this.data.intensity, this.data.width, this.data.height);\n\t this.rectLight.position.set(this.data.width / 2, 0, 0);\n\t this.el.object3D.add(this.rectLight);\n\t\n\t //Helper set, assign to scene\n\t if (this.data.showHelper) {\n\t\n\t this.rectLightHelper = new THREE.RectAreaLightHelper(this.rectLight);\n\t this.rectLightHelper.position.set(this.rectLight.position.x, 0, 0);\n\t this.el.object3D.add(this.rectLightHelper);\n\t\n\t //Determine if we have a different helperColor set\n\t if (this.data.helperColor !== undefined) {\n\t this.setHelperColor(this.data.helperColor);\n\t } else {\n\t this.setHelperColor(this.data.color);\n\t }\n\t }\n\t },\n\t\n\t setHelperColor: function setHelperColor(color) {\n\t //Set helper material color if enabled\n\t //NOTE: RectLightHelper consists of submeshes https://github.com/mrdoob/three.js/blob/master/src/helpers/RectAreaLightHelper.js\n\t this.rectLightHelper.children.forEach(function (node) {\n\t return node.material.color.set(color);\n\t });\n\t },\n\t\n\t update: function update(oldData) {\n\t\n\t //Update light values\n\t this.rectLight.intensity = this.data.intensity;\n\t this.rectLight.width = this.data.width;\n\t this.rectLight.height = this.data.height;\n\t this.rectLight.color.set(this.data.color);\n\t\n\t if (this.rectLightHelper !== undefined) {\n\t this.rectLightHelper.visible = this.data.showHelper;\n\t\n\t //Update, as child light may have changed dimensions\n\t this.rectLightHelper.update();\n\t\n\t if (this.data.helperColor !== undefined) {\n\t this.setHelperColor(this.data.helperColor);\n\t } else {\n\t this.setHelperColor(this.data.color);\n\t }\n\t }\n\t }\n\t});\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// aframe-area-light-component.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap cbdfdd777ea7884199cb","/**\n * A-Frame Wrapper for THREE.JS RectAreaLight\n * @author Mo Kargas (DEVLAD) [email protected]\n */\n\n/* global AFRAME */\n/* global THREE */\n\nif (typeof AFRAME === 'undefined') {\n throw new Error('Component attempted to register before AFRAME was available.')\n}\n\nif (typeof THREE === 'undefined') {\n throw new Error('Component attempted to register before THREE was available.')\n}\n\nAFRAME.registerComponent('area-light', {\n schema: {\n intensity: {\n type: 'number',\n default: 1.0\n },\n color: {\n type: 'color',\n default: '#FFFFFF'\n },\n width: {\n type: 'number',\n default: 2.0\n },\n height: {\n type: 'number',\n default: 2.0\n },\n helperColor: {\n type: 'color',\n default: undefined\n },\n showHelper: {\n type: 'boolean',\n default: true\n },\n },\n\n init: function() {\n this.setHelperColor = this.setHelperColor.bind(this)\n\n this.rectLight = new THREE.RectAreaLight(this.data.color, this.data.intensity, this.data.width, this.data.height)\n this.rectLight.position.set(this.data.width / 2, 0, 0)\n this.el.object3D.add(this.rectLight)\n\n //Helper set, assign to scene\n if (this.data.showHelper) {\n\n this.rectLightHelper = new THREE.RectAreaLightHelper(this.rectLight)\n this.rectLightHelper.position.set(this.rectLight.position.x, 0, 0)\n this.el.object3D.add(this.rectLightHelper)\n\n //Determine if we have a different helperColor set\n if (this.data.helperColor !== undefined) {\n this.setHelperColor(this.data.helperColor)\n } else {\n this.setHelperColor(this.data.color)\n }\n }\n\n },\n\n setHelperColor: function(color) {\n //Set helper material color if enabled\n //NOTE: RectLightHelper consists of submeshes https://github.com/mrdoob/three.js/blob/master/src/helpers/RectAreaLightHelper.js\n this.rectLightHelper.children.forEach(node => node.material.color.set(color))\n },\n\n update: function(oldData) {\n\n //Update light values\n this.rectLight.intensity = this.data.intensity\n this.rectLight.width = this.data.width\n this.rectLight.height = this.data.height\n this.rectLight.color.set( this.data.color )\n\n if (this.rectLightHelper !== undefined) {\n this.rectLightHelper.visible = this.data.showHelper\n\n //Update, as child light may have changed dimensions\n this.rectLightHelper.update()\n\n if (this.data.helperColor !== undefined) {\n this.setHelperColor(this.data.helperColor)\n } else {\n this.setHelperColor(this.data.color)\n }\n\n\n }\n }\n});\n\n\n\n// WEBPACK FOOTER //\n// ./index.js"],"sourceRoot":""}