New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-game-engine

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-game-engine - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

35

build/index.js

@@ -335,11 +335,12 @@ module.exports =

var newState = _this.props.systems.reduce(function (state, sys) {
return sys(state, args);
}, _this.state.entities);
_this.input.length = 0;
_this.events.length = 0;
_this.previousTime = currentTime;
_this.previousDelta = args.time.delta;
_this.setState({ entities: newState });
_this.setState(function (prevState) {
var newEntities = _this.props.systems.reduce(function (state, sys) {
return sys(state, args);
}, prevState.entities);
_this.input.length = 0;
_this.events.length = 0;
_this.previousTime = currentTime;
_this.previousDelta = args.time.delta;
return { entities: newEntities };
});
};

@@ -364,3 +365,2 @@

_this.timer = props.timer || new _DefaultTimer2.default();
_this.timer.subscribe(_this.updateHandler);
_this.input = [];

@@ -385,16 +385,18 @@ _this.previousTime = null;

case 0:
this.timer.subscribe(this.updateHandler);
entities = getEntitiesFromProps(this.props);
if (!isPromise(entities)) {
_context2.next = 5;
_context2.next = 6;
break;
}
_context2.next = 4;
_context2.next = 5;
return entities;
case 4:
case 5:
entities = _context2.sent;
case 5:
case 6:

@@ -407,3 +409,3 @@ this.setState({

case 6:
case 7:
case "end":

@@ -558,3 +560,2 @@ return _context2.stop();

_this.timer = props.timer || new _DefaultTimer2.default();
_this.timer.subscribe(_this.updateHandler);
_this.input = [];

@@ -570,2 +571,4 @@ _this.previousTime = null;

value: function componentDidMount() {
this.timer.subscribe(this.updateHandler);
if (this.props.running) this.start();

@@ -572,0 +575,0 @@ }

{
"name": "react-game-engine",
"version": "1.1.0",
"version": "1.2.0",
"description": "A lightweight game engine for React projects",

@@ -5,0 +5,0 @@ "main": "build/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc