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

bitecs

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitecs - npm Package Compare versions

Comparing version 0.3.11 to 0.3.12

23

dist/index.es.js

@@ -68,3 +68,3 @@ const TYPES_ENUM = {

if (!ArrayBuffer.isView(store)) {
const shadow = store[$parentArray].slice(0);
const shadow = store[$parentArray].slice(0).fill(0);

@@ -77,3 +77,3 @@ for (const k in store[key]) {

} else {
store[key] = store.slice(0);
store[key] = store.slice(0).fill(0);
}

@@ -359,3 +359,3 @@ };

const isWorld = Object.getOwnPropertySymbols(target).includes($componentMap);
let [componentProps, changedProps] = canonicalize(target); // TODO: calculate max bytes based on target
let [componentProps, changedProps] = canonicalize(target); // TODO: calculate max bytes based on target & recalc upon resize

@@ -406,7 +406,18 @@ const buffer = new ArrayBuffer(maxBytes);

} // skip if diffing and no change
// TODO: check array diff
// TODO: optimize array diff
if (diff && prop[eid] === prop[diff][eid]) {
continue;
if (diff) {
if (ArrayBuffer.isView(prop[eid])) {
let dirty = false;
for (let i = 0; i < prop[eid].length; i++) {
if (prop[eid][i] !== prop[eid][$serializeShadow][i]) {
dirty = true;
break;
}
}
if (dirty) continue;
} else if (prop[eid] === prop[diff][eid]) continue;
}

@@ -413,0 +424,0 @@

@@ -72,3 +72,3 @@ 'use strict';

if (!ArrayBuffer.isView(store)) {
const shadow = store[$parentArray].slice(0);
const shadow = store[$parentArray].slice(0).fill(0);

@@ -81,3 +81,3 @@ for (const k in store[key]) {

} else {
store[key] = store.slice(0);
store[key] = store.slice(0).fill(0);
}

@@ -363,3 +363,3 @@ };

const isWorld = Object.getOwnPropertySymbols(target).includes($componentMap);
let [componentProps, changedProps] = canonicalize(target); // TODO: calculate max bytes based on target
let [componentProps, changedProps] = canonicalize(target); // TODO: calculate max bytes based on target & recalc upon resize

@@ -410,7 +410,18 @@ const buffer = new ArrayBuffer(maxBytes);

} // skip if diffing and no change
// TODO: check array diff
// TODO: optimize array diff
if (diff && prop[eid] === prop[diff][eid]) {
continue;
if (diff) {
if (ArrayBuffer.isView(prop[eid])) {
let dirty = false;
for (let i = 0; i < prop[eid].length; i++) {
if (prop[eid][i] !== prop[eid][$serializeShadow][i]) {
dirty = true;
break;
}
}
if (dirty) continue;
} else if (prop[eid] === prop[diff][eid]) continue;
}

@@ -417,0 +428,0 @@

{
"name": "bitecs",
"version": "0.3.11",
"version": "0.3.12",
"description": "Functional, minimal, data-driven, ultra-high performance ECS library written in Javascript",

@@ -5,0 +5,0 @@ "license": "MPL-2.0",

Sorry, the diff of this file is not supported yet

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