Comparing version 0.3.31 to 0.3.32
{ | ||
"name": "bitecs", | ||
"version": "0.3.31", | ||
"version": "0.3.32", | ||
"description": "Functional, minimal, data-driven, ultra-high performance ECS library written in Javascript", | ||
@@ -5,0 +5,0 @@ "license": "MPL-2.0", |
@@ -22,3 +22,3 @@ <h1 align="center"> | ||
<p align="center"> | ||
Functional, minimal, <a href="https://www.dataorienteddesign.com/dodbook/">data-oriented</a>, ultra-high performance <a herf="https://en.wikipedia.org/wiki/Entity_component_system">ECS</a> library written using JavaScript TypedArrays. | ||
Functional, minimal, <a href="https://www.dataorienteddesign.com/dodbook/">data-oriented</a>, ultra-high performance <a href="https://en.wikipedia.org/wiki/Entity_component_system">ECS</a> library written using JavaScript TypedArrays. | ||
</p> | ||
@@ -25,0 +25,0 @@ |
@@ -10,2 +10,3 @@ import assert, { strictEqual } from 'assert' | ||
import { pipe } from '../../src/index.js' | ||
import { strict } from 'assert/strict' | ||
@@ -47,3 +48,3 @@ const Types = TYPES_ENUM | ||
const serialize = defineSerializer([TestComponent]) | ||
const deserialize = defineDeserializer(world) | ||
const deserialize = defineDeserializer([TestComponent]) | ||
@@ -69,3 +70,3 @@ const packet = serialize(world) | ||
const serialize = defineSerializer([TestComponent]) | ||
const deserialize = defineDeserializer(world) | ||
const deserialize = defineDeserializer([TestComponent]) | ||
@@ -381,4 +382,22 @@ const packet = serialize(query(world)) | ||
strictEqual(packet.byteLength, 0) | ||
}) | ||
it('should output an array of unique EIDs when deserializing', () => { | ||
const world = createWorld() | ||
const TestComponent = defineComponent({ value0: Types.f32, value1: Types.f32 }) | ||
const eid0 = addEntity(world) | ||
addComponent(world, TestComponent, eid0) | ||
const eid1 = addEntity(world) | ||
addComponent(world, TestComponent, eid1) | ||
const serialize = defineSerializer([TestComponent]) | ||
const deserialize = defineDeserializer([TestComponent]) | ||
const packet = serialize(world) | ||
const ents = deserialize(world, packet) | ||
strictEqual(ents.length, 2) | ||
strictEqual(ents[0], 0) | ||
strictEqual(ents[1], 1) | ||
}) | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
283590
3142