{“ast”:null,“code”:“import _regeneratorRuntime from "/runtime/regenerator";nnfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }nnfunction _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }nnfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr(), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i != null) _i(); } finally { if (_d) throw _e; } } return _arr; }nnfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }nnfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen(arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }nnfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }nnfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }nnfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }nnfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }nnimport * as THREE from 'three';nimport { Interaction } from 'three.interaction';nimport { OrbitControls } from '../kmz/jsm/controls/OrbitControls.js';nimport GltfLoadAnimatedObject from '../eZii-bricklayer-game/gltf-load-animated-object.js';nnvar EZIIBrickLayerGameMain =n/*#__PURE__*/nfunction () {n function EZIIBrickLayerGameMain() {n _classCallCheck(this, EZIIBrickLayerGameMain);nn this.mixers = {};n this.stoppedMixers = {};n this.scene = undefined;n this.cubes = [];n this.docking = undefined;n this.camera = undefined;n this.renderer = undefined;n this.controls = undefined;n this.clock = new THREE.Clock();n this.rayCaster = new THREE.Raycaster();n this.mousePosition = new THREE.Vector2();n }nn _createClass(EZIIBrickLayerGameMain, [{n key: "every10MilliSeconds",n value: function every10MilliSeconds(callback) {n setInterval(callback, 10);n }n }, {n key: "findDomDockingPoint",n value: function findDomDockingPoint() {n var _this = this;nn var promise = new Promise(function (resolve, reject) {n var notFound = true;n var i = 0;nn while (notFound) {n _this.docking = document.body.querySelector('#docking-point-for-threejs');nn if (!_this.docking) {n i++;nn if (i < 40) {n continue;n } else {n reject("couldn't find element with id docking-point-for-threejs");n }nn ;n } else {n resolve();n notFound = false;n }n }n });n return promise;n }n }, {n key: "init",n value: function init() {n this.scene = new THREE.Scene();n var geometry = new THREE.BoxGeometry(100, 100, 10);n var material = new THREE.MeshBasicMaterial({n color: 0x00ff00n }); // §nn this.cubes.push(new THREE.Mesh(geometry, material));n this.scene.add(this.cubes);n var geometry2 = new THREE.BoxGeometry(100, 100, 10);n var material2 = new THREE.MeshBasicMaterial({n color: 0x0000ffn }); // §nn this.cubes.push(new THREE.Mesh(geometry2, material2));n this.scene.add(this.cubes);n this.scene.background = new THREE.Color(0x999999);n var light = new THREE.DirectionalLight(0xffffff);n light.position.set(0.5, 1.0, 0.5).normalize();n this.scene.add(light);n this.camera = new THREE.PerspectiveCamera(35, this.docking.clientWidth / this.docking.clientHeight, 1, 500);n this.camera.position.y = 5;n this.camera.position.z = 10;n this.scene.add(this.camera);n this.grid = new THREE.GridHelper(1000, 1000, 0xffffff, 0x555555);n this.scene.add(this.grid);n this.renderer = new THREE.WebGLRenderer({n antialias: truen });n this.renderer.setPixelRatio(window.devicePixelRatio);n this.renderer.setSize(this.docking.clientWidth, this.docking.clientHeight);n this.canvas = this.renderer.domElement;n this.docking.appendChild(this.canvas);n this.canvasPosition = $(this.canvas).position();n this.interaction = new Interaction(this.renderer, this.scene, this.camera);n this.controls = new OrbitControls(this.camera, this.renderer.domElement); // controls.addEventListener( 'change', render );nn this.controls.update();n window.addEventListener('resize', this.onWindowResize, false);n }n }, {n key: "onWindowResize",n value: function onWindowResize() {n this.camera.aspect = this.docking.clientWidth / this.docking.clientHeight;n this.camera.updateProjectionMatrix();n this.renderer.setSize(this.docking.clientWidth, this.docking.clientHeight);n this.render();n }n }, {n key: "render",n value: function render() {n this.renderer.render(this.scene, this.camera);n }n }, {n key: "moveObjectZAxis",n value: function moveObjectZAxis(object) {n object.position.z += 10;n }n }, {n key: "addObject",n value: function () {n var _addObject = _asyncToGenerator(n /*#__PURE__*/n _regeneratorRuntime.mark(function _callee2(id) {n var loadObject, promise;n return _regeneratorRuntime.wrap(function _callee2$(_context2) {n while (1) {n switch (_context2.prev = _context2.next) {n case 0:n loadObject = new GltfLoadAnimatedObject(this.scene);n promise = new Promise(n /*#__PURE__*/n function () {n var _ref = _asyncToGenerator(n /*#__PURE__*/n _regeneratorRuntime.mark(function _callee(resolve, reject) {n var _ref2, _ref3, object, mixer;nn return _regeneratorRuntime.wrap(function _callee$(_context) {n while (1) {n switch (_context.prev = _context.next) {n case 0:n _context.next = 2;n return loadObject.addObject(id);nn case 2:n _ref2 = _context.sent;n _ref3 = _slicedToArray(_ref2, 2);n object = _ref3;n mixer = _ref3;n resolve([object, mixer, id]);nn case 7:n case "end":n return _context.stop();n }n }n }, _callee);n }));nn return function (_x2, _x3) {n return _ref.apply(this, arguments);n };n }());n return _context2.abrupt("return", promise);nn case 3:n case "end":n return _context2.stop();n }n }n }, _callee2, this);n }));nn function addObject(_x) {n return _addObject.apply(this, arguments);n }nn return addObject;n }()n }, {n key: "animate",n value: function animate(id) {n var _this2 = this;nn // debugger;n requestAnimationFrame(function () {n _this2.animate.bind(_this2)(id);n });n if (this.mixers) this.mixers.update(this.clock.getDelta());n this.controls.update();n this.render();n }n }, {n key: "stopAnimation",n value: function stopAnimation(id) {n this.stoppedMixers = this.mixers;n delete this.mixers;n }n }, {n key: "startAnimation",n value: function startAnimation(id) {n if (this.mixers !== undefined) return;n this.mixers = this.stoppedMixers;n delete this.stoppedMixers;n }n }, {n key: "tiltCurrentlySelectedObjectUpwards",n value: function tiltCurrentlySelectedObjectUpwards() {n if (window.currentlySelectedObject !== undefined) {n window.currentlySelectedObject.tiltUpwards();n } else {n console.warn("currentlySelectedObject is undefined");n }n }n }, {n key: "tiltCurrentlySelectedObjectDownwards",n value: function tiltCurrentlySelectedObjectDownwards() {n if (window.currentlySelectedObject !== undefined) {n window.currentlySelectedObject.tiltDownwards();n } else {n console.warn("currentlySelectedObject is undefined");n }n } //n // getClicked3DPoint(evt) {n // evt.preventDefault();n //n // this.mousePosition.x = ((evt.clientX - this.canvasPosition.left) / this.docking.width) * 2 - 1;n // this.mousePosition.y = -((evt.clientY - this.canvasPosition.top) / this.docking.height) * 2 + 1;n //n // this.rayCaster.setFromCamera(this.mousePosition, this.camera);n // tdebugger;n // var intersects = this.rayCaster.intersectObjects(this.cubes, true);n //n // if (intersects.length > 0)n // return intersects.point;n // };nn }]);nn return EZIIBrickLayerGameMain;n}();nnexport { EZIIBrickLayerGameMain as default };”,“map”:{“version”:3,“sources”:[“/Users/lemonandroid/Banal Dropbox/random/redux-os/app/javascript/packs/eZii-bricklayer-game/main.js”],“names”:,“mappings”:“;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,WAAT,QAA4B,mBAA5B;AAEA,SAASC,aAAT,QAA8B,sCAA9B;AACA,OAAOC,sBAAP,MAAmC,sDAAnC;;IAEqBC,sB;;;AACpB,oCAAc;AAAA;;AACb,SAAKC,MAAL,GAAc,EAAd;AACA,SAAKC,aAAL,GAAqB,EAArB;AACA,SAAKC,KAAL,GAAaC,SAAb;AACA,SAAKC,KAAL,GAAa,EAAb;A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EAAnB,IAAyB,KAAKtE,MAAL,CAAYsE,EAAZ,CAAzB;AAEA,aAAO,KAAKtE,MAAL,CAAYsE,EAAZ,CAAP;AACA;;;mCAEcA,E,EAAI;AAClB,UAAG,KAAKtE,MAAL,CAAYsE,EAAZ,MAAoBnE,SAAvB,EAAkC;AAClC,WAAKH,MAAL,CAAYsE,EAAZ,IAAkB,KAAKrE,aAAL,CAAmBqE,EAAnB,CAAlB;AAEA,aAAO,KAAKrE,aAAL,CAAmBqE,EAAnB,CAAP;AACA;;;yDAGoC;AACpC,UAAGhB,MAAM,CAACwB,uBAAP,KAAmC3E,SAAtC,EAAiD;AAChDmD,QAAAA,MAAM,CAACwB,uBAAP,CAA+BC,WAA/B;AAEA,OAHD,MAGO;AACNC,QAAAA,OAAO,CAACC,IAAR,CAAa,sCAAb;AACA;AACD;;;2DAEsC;AACtC,UAAG3B,MAAM,CAACwB,uBAAP,KAAmC3E,SAAtC,EAAiD;AAChDmD,QAAAA,MAAM,CAACwB,uBAAP,CAA+BI,aAA/B;AAEA,OAHD,MAGO;AACNF,QAAAA,OAAO,CAACC,IAAR,CAAa,sCAAb;AACA;AACD,K,CAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;SAxLoBlF,sB”,“sourcesContent”:[“import * as THREE from 'three';nimport { Interaction } from 'three.interaction';nnimport { OrbitControls } from '../kmz/jsm/controls/OrbitControls.js';nimport GltfLoadAnimatedObject from '../eZii-bricklayer-game/gltf-load-animated-object.js';nnexport default class EZIIBrickLayerGameMain {ntconstructor() {nttthis.mixers = {};nttthis.stoppedMixers = {};nttthis.scene = undefined;nttthis.cubes = [];nttthis.docking = undefined;nttthis.camera = undefined;nttthis.renderer = undefined;nttthis.controls = undefined;nttthis.clock = new THREE.Clock();nttnt this.rayCaster = new THREE.Raycaster();nt this.mousePosition = new THREE.Vector2();nttnt}ntntntevery10MilliSeconds(callback) {nttsetInterval(callback, 10);nt}ntntntfindDomDockingPoint() {nttvar promise = new Promise((resolve, reject) => {ntttvar notFound = true;ntttvar i = 0;ntttwhile(notFound) {nttttthis.docking = document.body.querySelector('#docking-point-for-threejs');nttttif(!this.docking) {nttttti++;ntttttif (i < 40) { continue } else { reject("couldn't find element with id docking-point-for-threejs") };ntttt} else {ntttttntttttresolve();ntttttnotFound = false;ntttt}nttt}ttntt});nttnttreturn promise;nt}ntntntinit() {nnttthis.scene = new THREE.Scene();ntnttvar geometry = new THREE.BoxGeometry( 100, 100, 10 );nttvar material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );ntntt// §nttthis.cubes.push(new THREE.Mesh( geometry, material ));nttthis.scene.add( this.cubes );ntnttvar geometry2 = new THREE.BoxGeometry( 100, 100, 10 );nttvar material2 = new THREE.MeshBasicMaterial( {color: 0x0000ff} );ntntt// §nttthis.cubes.push(new THREE.Mesh( geometry2, material2 ));nttthis.scene.add(t this.cubes );ntnttthis.scene.background = new THREE.Color( 0x999999 );nttvar light = new THREE.DirectionalLight( 0xffffff );nttlight.position.set( 0.5, 1.0, 0.5 ).normalize();nttthis.scene.add( light );nttthis.camera = new THREE.PerspectiveCamera( 35, this.docking.clientWidth / this.docking.clientHeight, 1, 500 );nttthis.camera.position.y = 5;nttthis.camera.position.z = 10;nttthis.scene.add( this.camera );nttthis.grid = new THREE.GridHelper( 1000, 1000, 0xffffff, 0x555555 );nttthis.scene.add( this.grid );nttthis.renderer = new THREE.WebGLRenderer( { antialias: true } );nttthis.renderer.setPixelRatio( window.devicePixelRatio );nttthis.renderer.setSize( this.docking.clientWidth, this.docking.clientHeight );nttthis.canvas = this.renderer.domElement;nttnttthis.docking.appendChild( this.canvas );nttnttthis.canvasPosition = $(this.canvas).position(); ntntnttthis.interaction = new Interaction(this.renderer, this.scene, this.camera);ntnt this.controls = new OrbitControls( this.camera, this.renderer.domElement );ntt// controls.addEventListener( 'change', render );nttthis.controls.update();nttwindow.addEventListener( 'resize', this.onWindowResize, false );nt}ntnnnnntonWindowResize() {nttthis.camera.aspect = this.docking.clientWidth / this.docking.clientHeight;nttthis.camera.updateProjectionMatrix();nttthis.renderer.setSize( this.docking.clientWidth, this.docking.clientHeight );nttthis.render();nt}ntntntntrender() {nttthis.renderer.render( this.scene, this.camera );nt}ntntnnntmoveObjectZAxis(object) {nttobject.position.z += 10;nt}ntntnnntasync addObject(id) {tnttvar loadObject = new GltfLoadAnimatedObject(this.scene)nttnttlet promise = new Promise(async function(resolve, reject) {ntttlet [object, mixer] = await loadObject.addObject(id);ntttresolve([object, mixer, id])nntt});nttnttreturn promise;nt}ntntntntanimate(id) {ntt// debugger;nttttrequestAnimationFrame( () => { this.animate.bind(this)(id) } );nttttif ( this.mixers ) this.mixers.update( this.clock.getDelta() );nttttthis.controls.update();nttttthis.render();nt}ntntstopAnimation(id) {nttthis.stoppedMixers = this.mixers;nttnttdelete this.mixers;nt}ntntstartAnimation(id) {nttif(this.mixers !== undefined) return;nttthis.mixers = this.stoppedMixers;nttnttdelete this.stoppedMixers;nt}ntntnttiltCurrentlySelectedObjectUpwards() {nttif(window.currentlySelectedObject !== undefined) {ntttwindow.currentlySelectedObject.tiltUpwards();nntt} else {ntttconsole.warn("currentlySelectedObject is undefined");ntt}nt}ntnttiltCurrentlySelectedObjectDownwards() {nttif(window.currentlySelectedObject !== undefined) {ntttwindow.currentlySelectedObject.tiltDownwards();ntttntt} else {ntttconsole.warn("currentlySelectedObject is undefined");ntt}nt}ntnt//nt// getClicked3DPoint(evt) {nt// evt.preventDefault();nt//nt// this.mousePosition.x = ((evt.clientX - this.canvasPosition.left) / this.docking.width) * 2 - 1;nt// this.mousePosition.y = -((evt.clientY - this.canvasPosition.top) / this.docking.height) * 2 + 1;nt//nt// this.rayCaster.setFromCamera(this.mousePosition, this.camera);nt// tdebugger;nt// var intersects = this.rayCaster.intersectObjects(this.cubes, true);nt//nt// if (intersects.length > 0)nt// return intersects.point;nt// };ntn}”]},“metadata”:{},“sourceType”:“module”}