Socket
Socket
Sign inDemoInstall

aura

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.2 to 0.11.3

2

package.json
{
"name": "aura",
"version": "0.11.2",
"version": "0.11.3",
"author": "optionallychained",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -66,14 +66,2 @@ import { Component } from '../component';

/**
* Remove a Component from the Entity by Component class
*
* @param component the Component to remove
*/
removeComponent(component: Component): void;
/**
* Remove a list of Components from the Entity by Component class
*
* @param components the Components to remove
*/
removeComponents(...components: Array<Component>): void;
/**
* Remove a Component from the Entity by Component name

@@ -83,3 +71,3 @@ *

*/
removeComponentByName(name: string): void;
removeComponent(name: string): void;
/**

@@ -90,3 +78,3 @@ * Remove a list of Components from the Entity by Component name

*/
removeComponentsByName(...names: Array<string>): void;
removeComponents(...names: Array<string>): void;
/**

@@ -93,0 +81,0 @@ * Check if the Entity has a Component by Component name

@@ -155,36 +155,22 @@ "use strict";

};
// TODO dead for the same reason as addComponentByType above
// /**
// * Remove a Component from the Entity by Component class
// *
// * @param component the Component to remove
// */
// public removeComponent(component: Component): void {
// this.components.delete(component.name);
// }
// /**
// * Remove a list of Components from the Entity by Component class
// *
// * @param components the Components to remove
// */
// public removeComponents(...components: Array<Component>): void {
// for (const c of components) {
// this.removeComponent(c);
// }
// }
/**
* Remove a Component from the Entity by Component class
*
* @param component the Component to remove
*/
Entity.prototype.removeComponent = function (component) {
this.components.delete(component.name);
};
/**
* Remove a list of Components from the Entity by Component class
*
* @param components the Components to remove
*/
Entity.prototype.removeComponents = function () {
var e_2, _a;
var components = [];
for (var _i = 0; _i < arguments.length; _i++) {
components[_i] = arguments[_i];
}
try {
for (var components_2 = __values(components), components_2_1 = components_2.next(); !components_2_1.done; components_2_1 = components_2.next()) {
var c = components_2_1.value;
this.removeComponent(c);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (components_2_1 && !components_2_1.done && (_a = components_2.return)) _a.call(components_2);
}
finally { if (e_2) throw e_2.error; }
}
};
/**
* Remove a Component from the Entity by Component name

@@ -194,3 +180,3 @@ *

*/
Entity.prototype.removeComponentByName = function (name) {
Entity.prototype.removeComponent = function (name) {
this.components.delete(name);

@@ -203,4 +189,4 @@ };

*/
Entity.prototype.removeComponentsByName = function () {
var e_3, _a;
Entity.prototype.removeComponents = function () {
var e_2, _a;
var names = [];

@@ -213,6 +199,6 @@ for (var _i = 0; _i < arguments.length; _i++) {

var n = names_1_1.value;
this.removeComponentByName(n);
this.removeComponent(n);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {

@@ -222,3 +208,3 @@ try {

}
finally { if (e_3) throw e_3.error; }
finally { if (e_2) throw e_2.error; }
}

@@ -246,3 +232,3 @@ };

Entity.prototype.hasComponents = function () {
var e_4, _a;
var e_3, _a;
var names = [];

@@ -260,3 +246,3 @@ for (var _i = 0; _i < arguments.length; _i++) {

}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {

@@ -266,3 +252,3 @@ try {

}
finally { if (e_4) throw e_4.error; }
finally { if (e_3) throw e_3.error; }
}

@@ -269,0 +255,0 @@ return true;

@@ -67,4 +67,4 @@ "use strict";

TextureAtlas.prototype.resolveTextureCoordinates = function (coords, column, row, columnSpan, rowSpan) {
var u = (column + coords[0]) / (this.columns - columnSpan + 1);
var v = 1 - ((row + coords[1]) / (this.rows - rowSpan + 1));
var u = (column + coords[0]) * (columnSpan / this.columns) - (((columnSpan - 1) / this.columns) * column);
var v = 1 - ((row + coords[1]) * (rowSpan / this.rows) - (((rowSpan - 1) / this.rows) * row));
// TODO this seems kinda messy...but it does work

@@ -71,0 +71,0 @@ // "issue" seems to be caused by want to generalise the solution here for both left-most and right-most coordinates, rather than in

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc