Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sam-ecs

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sam-ecs - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

2

dist/Entity.js

@@ -157,3 +157,3 @@ "use strict";

for (var componentName in this._components) {
components[componentName] = this._components[componentName].state;
components[componentName] = Object.assign({}, this._components[componentName].state);
}

@@ -160,0 +160,0 @@ return {

@@ -540,3 +540,4 @@ 'use strict';

// 'state': currentState,
'action': action
'action': action,
'revert': action.revert
});

@@ -572,2 +573,32 @@ }

/**
* @description - Rolls back the state of the manager by reverting actions,
* instead of replacing the current state
* @param {Number} - the number indicating at what state to roll back to
*/
}, {
key: 'rollback_actions',
value: function rollback_actions(number) {
if (number > this._stateCounter) {
this._stateCounter = number;
}
var index = this._stateQueue.length - 1;
if (index < 0) {
return;
}
var currentNumber = this._stateQueue[index].number;
while (currentNumber > number && index >= 0) {
currentNumber = this._stateQueue[index].number;
if (currentNumber != number) {
this._stateQueue[index].revert();
index--;
}
}
this._stateQueue.splice(0, index + 1);
}
/**
* @description - Takes the entire state queue and re applies all of the states

@@ -574,0 +605,0 @@ * This typically would happen after a rollback

{
"name": "sam-ecs",
"version": "3.2.0",
"version": "3.2.1",
"description": "A specialized entity component system",

@@ -5,0 +5,0 @@ "main": "./dist/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