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

0g

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

0g - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

6

dist/ArchetypeManager.js

@@ -34,2 +34,7 @@ import { EventSubscriber } from '@a-type/utils';

}
const newArchetypeId = (this.entityLookup[entityId] = this.flipBit(oldArchetypeId, instance.$.type.id));
if (oldArchetypeId === newArchetypeId) {
// not currently supported...
throw new Error(`Tried to add component ${instance.$.type.id} to ${entityId}, but it already has that component`);
}
const oldArchetype = this.getOrCreate(oldArchetypeId);

@@ -39,3 +44,2 @@ // remove data from old archetype

entity.__addComponent(instance);
const newArchetypeId = (this.entityLookup[entityId] = this.flipBit(oldArchetypeId, instance.$.type.id));
const archetype = this.getOrCreate(newArchetypeId);

@@ -42,0 +46,0 @@ // copy entity from old to new

2

package.json
{
"name": "0g",
"version": "0.2.1",
"version": "0.2.2",
"description": "",

@@ -5,0 +5,0 @@ "type": "module",

@@ -62,2 +62,13 @@ import { EventSubscriber } from '@a-type/utils';

}
const newArchetypeId = (this.entityLookup[entityId] = this.flipBit(
oldArchetypeId,
instance.$.type.id,
));
if (oldArchetypeId === newArchetypeId) {
// not currently supported...
throw new Error(
`Tried to add component ${instance.$.type.id} to ${entityId}, but it already has that component`,
);
}
const oldArchetype = this.getOrCreate(oldArchetypeId);

@@ -69,6 +80,2 @@

const newArchetypeId = (this.entityLookup[entityId] = this.flipBit(
oldArchetypeId,
instance.$.type.id,
));
const archetype = this.getOrCreate(newArchetypeId);

@@ -75,0 +82,0 @@ // copy entity from old to new

Sorry, the diff of this file is not supported yet

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