react-game-engine
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -72,8 +72,2 @@ module.exports = | ||
/* 0 */ | ||
/***/ (function(module, exports) { | ||
module.exports = require("react"); | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -163,2 +157,8 @@ | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports) { | ||
module.exports = require("react"); | ||
/***/ }), | ||
/* 2 */ | ||
@@ -176,15 +176,45 @@ /***/ (function(module, exports, __webpack_require__) { | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _react = __webpack_require__(1); | ||
var _react2 = _interopRequireDefault(_react); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.default = function (state, window) { | ||
return Object.keys(state).filter(function (key) { | ||
return state[key].renderer; | ||
}).map(function (key) { | ||
var entity = state[key]; | ||
if (_typeof(entity.renderer) === "object") return _react2.default.createElement(entity.renderer.type, _extends({ key: key }, entity, { window: window }));else if (typeof entity.renderer === "function") return _react2.default.createElement(entity.renderer, _extends({ key: key }, entity, { window: window })); | ||
}); | ||
}; | ||
/***/ }), | ||
/* 3 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = __webpack_require__(0); | ||
var _react = __webpack_require__(1); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _DefaultTimer = __webpack_require__(1); | ||
var _Timer = __webpack_require__(0); | ||
var _DefaultTimer2 = _interopRequireDefault(_DefaultTimer); | ||
var _Timer2 = _interopRequireDefault(_Timer); | ||
var _DefaultRenderer = __webpack_require__(4); | ||
var _Renderer = __webpack_require__(2); | ||
var _DefaultRenderer2 = _interopRequireDefault(_DefaultRenderer); | ||
var _Renderer2 = _interopRequireDefault(_Renderer); | ||
@@ -329,3 +359,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
}; | ||
_this.timer = props.timer || new _DefaultTimer2.default(); | ||
_this.timer = props.timer || new _Timer2.default(); | ||
_this.timer.subscribe(_this.updateHandler); | ||
@@ -423,3 +453,3 @@ _this.input = []; | ||
entities: {}, | ||
renderer: _DefaultRenderer2.default, | ||
renderer: _Renderer2.default, | ||
running: true | ||
@@ -435,3 +465,3 @@ }; | ||
/***/ }), | ||
/* 3 */ | ||
/* 4 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -450,9 +480,9 @@ | ||
var _react = __webpack_require__(0); | ||
var _react = __webpack_require__(1); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _DefaultTimer = __webpack_require__(1); | ||
var _Timer = __webpack_require__(0); | ||
var _DefaultTimer2 = _interopRequireDefault(_DefaultTimer); | ||
var _Timer2 = _interopRequireDefault(_Timer); | ||
@@ -520,3 +550,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
_this.timer = props.timer || new _DefaultTimer2.default(); | ||
_this.timer = props.timer || new _Timer2.default(); | ||
_this.timer.subscribe(_this.updateHandler); | ||
@@ -580,3 +610,3 @@ _this.input = []; | ||
/***/ }), | ||
/* 4 */ | ||
/* 5 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -588,44 +618,22 @@ | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
exports.Timer = exports.Renderer = exports.GameEngine = exports.GameLoop = undefined; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _GameLoop = __webpack_require__(4); | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _GameLoop2 = _interopRequireDefault(_GameLoop); | ||
var _react = __webpack_require__(0); | ||
var _GameEngine = __webpack_require__(3); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _GameEngine2 = _interopRequireDefault(_GameEngine); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _Renderer = __webpack_require__(2); | ||
exports.default = function (state, window) { | ||
return Object.keys(state).filter(function (key) { | ||
return state[key].renderer; | ||
}).map(function (key) { | ||
var entity = state[key]; | ||
if (_typeof(entity.renderer) === "object") return _react2.default.createElement(entity.renderer.type, _extends({ key: key }, entity, { window: window }));else if (typeof entity.renderer === "function") return _react2.default.createElement(entity.renderer, _extends({ key: key }, entity, { window: window })); | ||
}); | ||
}; | ||
var _Renderer2 = _interopRequireDefault(_Renderer); | ||
/***/ }), | ||
/* 5 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var _Timer = __webpack_require__(0); | ||
"use strict"; | ||
var _Timer2 = _interopRequireDefault(_Timer); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.GameEngine = exports.GameLoop = undefined; | ||
var _GameLoop = __webpack_require__(3); | ||
var _GameLoop2 = _interopRequireDefault(_GameLoop); | ||
var _GameEngine = __webpack_require__(2); | ||
var _GameEngine2 = _interopRequireDefault(_GameEngine); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -635,4 +643,6 @@ | ||
exports.GameEngine = _GameEngine2.default; | ||
exports.Renderer = _Renderer2.default; | ||
exports.Timer = _Timer2.default; | ||
/***/ }) | ||
/******/ ]); |
{ | ||
"name": "react-game-engine", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "A lightweight game engine for React projects", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24689
514