@woosh/meep-engine 2.126.12 → 2.126.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Pure JavaScript game engine. Fully featured and production ready.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.126.
|
|
8
|
+
"version": "2.126.14",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -149,13 +149,13 @@ class BinaryBufferSerializer {
|
|
|
149
149
|
|
|
150
150
|
dataset.traverseComponents(componentType, function (componentInstance, entity) {
|
|
151
151
|
if (isEntityTransient(entity, dataset, smComponentIndex, componentInstance)) {
|
|
152
|
-
//skip
|
|
152
|
+
// skip
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
assert.ok(entity >= lastEntity, `entity[=${entity}] < lastEntity[=${lastEntity}]`);
|
|
157
157
|
|
|
158
|
-
//write only the entity step
|
|
158
|
+
// write only the entity step
|
|
159
159
|
const step = entity - lastEntity;
|
|
160
160
|
|
|
161
161
|
lastEntity = entity;
|
|
@@ -174,22 +174,22 @@ class BinaryBufferSerializer {
|
|
|
174
174
|
|
|
175
175
|
const currentPosition = buffer.position;
|
|
176
176
|
|
|
177
|
-
//print size of the component set
|
|
177
|
+
// print size of the component set
|
|
178
178
|
const componentsByteSize = currentPosition - positionComponentsStart;
|
|
179
179
|
console.log(`Component ${componentType.typeName} written. Count: ${numComponentsWritten}, Bytes: ${componentsByteSize}, Bytes/component: ${Math.ceil(componentsByteSize / numComponentsWritten)}. Time taken: ${((__end_time - __start_time) * 1000).toFixed(2)}ms`);
|
|
180
180
|
} else {
|
|
181
|
-
//no elements written, lets re-wind to skip the type
|
|
181
|
+
// no elements written, lets re-wind to skip the type
|
|
182
182
|
buffer.position = positionComponentsStart;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
//go back and patch actual number of written classes
|
|
186
|
+
// go back and patch actual number of written classes
|
|
187
187
|
const p = buffer.position;
|
|
188
188
|
|
|
189
189
|
buffer.position = typeCountAddress;
|
|
190
|
-
buffer.
|
|
190
|
+
buffer.writeUint16(numTypesWritten);
|
|
191
191
|
|
|
192
|
-
//restore position
|
|
192
|
+
// restore position
|
|
193
193
|
buffer.position = p;
|
|
194
194
|
|
|
195
195
|
console.timeEnd('serializing');
|