@dcl/ecs 7.1.1-4386019452.commit-8b1daa0 → 7.1.1-4387085842.commit-f2a09ff

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.
@@ -97,10 +97,10 @@ export function defineTransformComponent(engine) {
97
97
  return {
98
98
  ...transformDef,
99
99
  create(entity, val) {
100
- return transformDef.create(entity, val);
100
+ return transformDef.create(entity, TransformSchema.extend(val));
101
101
  },
102
102
  createOrReplace(entity, val) {
103
- return transformDef.createOrReplace(entity, val);
103
+ return transformDef.createOrReplace(entity, TransformSchema.extend(val));
104
104
  }
105
105
  };
106
106
  }
@@ -4,6 +4,8 @@
4
4
  *
5
5
  * - Use read and write function to generate or consume data.
6
6
  * - Use set and get only if you are sure that you're doing.
7
+ *
8
+ * It always passes littleEndian param as true
7
9
  */
8
10
  export declare class ReadWriteByteBuffer implements ByteBuffer {
9
11
  #private;
@@ -23,6 +23,8 @@ const defaultInitialCapacity = 10240;
23
23
  *
24
24
  * - Use read and write function to generate or consume data.
25
25
  * - Use set and get only if you are sure that you're doing.
26
+ *
27
+ * It always passes littleEndian param as true
26
28
  */
27
29
  export class ReadWriteByteBuffer {
28
30
  /**
@@ -60,41 +62,41 @@ export class ReadWriteByteBuffer {
60
62
  return this.woffset - this.roffset;
61
63
  }
62
64
  readFloat32() {
63
- return this.view.getFloat32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 4));
65
+ return this.view.getFloat32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true
64
66
  }
65
67
  readFloat64() {
66
- return this.view.getFloat64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 8));
68
+ return this.view.getFloat64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 8), true); // littleEndian = true
67
69
  }
68
70
  readInt8() {
69
71
  return this.view.getInt8(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 1));
70
72
  }
71
73
  readInt16() {
72
- return this.view.getInt16(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 2));
74
+ return this.view.getInt16(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 2), true); // littleEndian = true
73
75
  }
74
76
  readInt32() {
75
- return this.view.getInt32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 4));
77
+ return this.view.getInt32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true
76
78
  }
77
79
  readInt64() {
78
- return this.view.getBigInt64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 8));
80
+ return this.view.getBigInt64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 8), true); // littleEndian = true
79
81
  }
80
82
  readUint8() {
81
83
  return this.view.getUint8(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 1));
82
84
  }
83
85
  readUint16() {
84
- return this.view.getUint16(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 2));
86
+ return this.view.getUint16(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 2), true); // littleEndian = true
85
87
  }
86
88
  readUint32() {
87
- return this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 4));
89
+ return this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true
88
90
  }
89
91
  readUint64() {
90
- return this.view.getBigUint64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 8));
92
+ return this.view.getBigUint64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 8), true); // littleEndian = true
91
93
  }
92
94
  readBuffer() {
93
- const length = this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 4));
95
+ const length = this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true
94
96
  return this._buffer.subarray(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, length), __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 0));
95
97
  }
96
98
  readUtf8String() {
97
- const length = this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 4));
99
+ const length = this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true
98
100
  return utf8.read(this._buffer, __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, length), __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_roAdd).call(this, 0));
99
101
  }
100
102
  incrementWriteOffset(amount) {
@@ -123,11 +125,11 @@ export class ReadWriteByteBuffer {
123
125
  }
124
126
  writeFloat32(value) {
125
127
  const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_woAdd).call(this, 4);
126
- this.view.setFloat32(o, value);
128
+ this.view.setFloat32(o, value, true); // littleEndian = true
127
129
  }
128
130
  writeFloat64(value) {
129
131
  const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_woAdd).call(this, 8);
130
- this.view.setFloat64(o, value);
132
+ this.view.setFloat64(o, value, true); // littleEndian = true
131
133
  }
132
134
  writeInt8(value) {
133
135
  const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_woAdd).call(this, 1);
@@ -135,15 +137,15 @@ export class ReadWriteByteBuffer {
135
137
  }
136
138
  writeInt16(value) {
137
139
  const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_woAdd).call(this, 2);
138
- this.view.setInt16(o, value);
140
+ this.view.setInt16(o, value, true); // littleEndian = true
139
141
  }
140
142
  writeInt32(value) {
141
143
  const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_woAdd).call(this, 4);
142
- this.view.setInt32(o, value);
144
+ this.view.setInt32(o, value, true); // littleEndian = true
143
145
  }
144
146
  writeInt64(value) {
145
147
  const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_woAdd).call(this, 8);
146
- this.view.setBigInt64(o, value);
148
+ this.view.setBigInt64(o, value, true); // littleEndian = true
147
149
  }
148
150
  writeUint8(value) {
149
151
  const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_woAdd).call(this, 1);
@@ -151,76 +153,76 @@ export class ReadWriteByteBuffer {
151
153
  }
152
154
  writeUint16(value) {
153
155
  const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_woAdd).call(this, 2);
154
- this.view.setUint16(o, value);
156
+ this.view.setUint16(o, value, true); // littleEndian = true
155
157
  }
156
158
  writeUint32(value) {
157
159
  const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_woAdd).call(this, 4);
158
- this.view.setUint32(o, value);
160
+ this.view.setUint32(o, value, true); // littleEndian = true
159
161
  }
160
162
  writeUint64(value) {
161
163
  const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, "m", _ReadWriteByteBuffer_woAdd).call(this, 8);
162
- this.view.setBigUint64(o, value);
164
+ this.view.setBigUint64(o, value, true); // littleEndian = true
163
165
  }
164
166
  // DataView Proxy
165
167
  getFloat32(offset) {
166
- return this.view.getFloat32(offset);
168
+ return this.view.getFloat32(offset, true); // littleEndian = true
167
169
  }
168
170
  getFloat64(offset) {
169
- return this.view.getFloat64(offset);
171
+ return this.view.getFloat64(offset, true); // littleEndian = true
170
172
  }
171
173
  getInt8(offset) {
172
174
  return this.view.getInt8(offset);
173
175
  }
174
176
  getInt16(offset) {
175
- return this.view.getInt16(offset);
177
+ return this.view.getInt16(offset, true); // littleEndian = true
176
178
  }
177
179
  getInt32(offset) {
178
- return this.view.getInt32(offset);
180
+ return this.view.getInt32(offset, true); // littleEndian = true
179
181
  }
180
182
  getInt64(offset) {
181
- return this.view.getBigInt64(offset);
183
+ return this.view.getBigInt64(offset, true); // littleEndian = true
182
184
  }
183
185
  getUint8(offset) {
184
186
  return this.view.getUint8(offset);
185
187
  }
186
188
  getUint16(offset) {
187
- return this.view.getUint16(offset);
189
+ return this.view.getUint16(offset, true); // littleEndian = true
188
190
  }
189
191
  getUint32(offset) {
190
- return this.view.getUint32(offset) >>> 0;
192
+ return this.view.getUint32(offset, true); // littleEndian = true >>> 0
191
193
  }
192
194
  getUint64(offset) {
193
- return this.view.getBigUint64(offset);
195
+ return this.view.getBigUint64(offset, true); // littleEndian = true
194
196
  }
195
197
  setFloat32(offset, value) {
196
- this.view.setFloat32(offset, value);
198
+ this.view.setFloat32(offset, value, true); // littleEndian = true
197
199
  }
198
200
  setFloat64(offset, value) {
199
- this.view.setFloat64(offset, value);
201
+ this.view.setFloat64(offset, value, true); // littleEndian = true
200
202
  }
201
203
  setInt8(offset, value) {
202
204
  this.view.setInt8(offset, value);
203
205
  }
204
206
  setInt16(offset, value) {
205
- this.view.setInt16(offset, value);
207
+ this.view.setInt16(offset, value, true); // littleEndian = true
206
208
  }
207
209
  setInt32(offset, value) {
208
- this.view.setInt32(offset, value);
210
+ this.view.setInt32(offset, value, true); // littleEndian = true
209
211
  }
210
212
  setInt64(offset, value) {
211
- this.view.setBigInt64(offset, value);
213
+ this.view.setBigInt64(offset, value, true); // littleEndian = true
212
214
  }
213
215
  setUint8(offset, value) {
214
216
  this.view.setUint8(offset, value);
215
217
  }
216
218
  setUint16(offset, value) {
217
- this.view.setUint16(offset, value);
219
+ this.view.setUint16(offset, value, true); // littleEndian = true
218
220
  }
219
221
  setUint32(offset, value) {
220
- this.view.setUint32(offset, value);
222
+ this.view.setUint32(offset, value, true); // littleEndian = true
221
223
  }
222
224
  setUint64(offset, value) {
223
- this.view.setBigUint64(offset, value);
225
+ this.view.setBigUint64(offset, value, true); // littleEndian = true
224
226
  }
225
227
  }
226
228
  _ReadWriteByteBuffer_instances = new WeakSet(), _ReadWriteByteBuffer_woAdd = function _ReadWriteByteBuffer_woAdd(amount) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/ecs",
3
- "version": "7.1.1-4386019452.commit-8b1daa0",
3
+ "version": "7.1.1-4387085842.commit-f2a09ff",
4
4
  "description": "Decentraland ECS",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "ts-proto": "^1.112.0"
28
28
  },
29
29
  "dependencies": {
30
- "@dcl/js-runtime": "7.1.1-4386019452.commit-8b1daa0",
30
+ "@dcl/js-runtime": "7.1.1-4387085842.commit-f2a09ff",
31
31
  "@dcl/protocol": "1.0.0-4177500465.commit-247c87f"
32
32
  },
33
33
  "files": [
@@ -40,5 +40,5 @@
40
40
  "displayName": "ECS",
41
41
  "tsconfig": "./tsconfig.json"
42
42
  },
43
- "commit": "8b1daa095e12f588f917054be41cfad6da952487"
43
+ "commit": "f2a09ff9326d0407ac01a79f3ddc15dc3b73bcf5"
44
44
  }