diff --git a/package-lock.json b/package-lock.json index a10fa9df1..51b39edfa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "license": "Apache-2.0", "dependencies": { "@actions/core": "^1.10.0", - "@dcl/protocol": "1.0.0-28050011172.commit-c96236d", + "@dcl/protocol": "1.0.0-28974105118.commit-a598406", "@dcl/quickjs-emscripten": "^0.21.0-3680274614.commit-1808aa1", "@dcl/ts-proto": "1.153.0", "@types/fs-extra": "^9.0.12", @@ -580,9 +580,9 @@ } }, "node_modules/@dcl/protocol": { - "version": "1.0.0-28050011172.commit-c96236d", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-28050011172.commit-c96236d.tgz", - "integrity": "sha512-Osksqww4UrUaeuCVqUe3G+4qsm4dF6FN3QZFaS9OPazXu46hmEgz3OHsDjq4ehZJLqikyBdjLHIyWglyD4sMpg==", + "version": "1.0.0-28974105118.commit-a598406", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-28974105118.commit-a598406.tgz", + "integrity": "sha512-wUPTxo6Efk/pFenm7rKGiSIlia+m/FeTlICUT2CmJxZwD5XDpsYl8q9szWWccltqeKFP8zrJsOWu2C2gFfCw2Q==", "license": "Apache-2.0", "dependencies": { "@dcl/ts-proto": "1.154.0", @@ -8382,9 +8382,9 @@ } }, "@dcl/protocol": { - "version": "1.0.0-28050011172.commit-c96236d", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-28050011172.commit-c96236d.tgz", - "integrity": "sha512-Osksqww4UrUaeuCVqUe3G+4qsm4dF6FN3QZFaS9OPazXu46hmEgz3OHsDjq4ehZJLqikyBdjLHIyWglyD4sMpg==", + "version": "1.0.0-28974105118.commit-a598406", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-28974105118.commit-a598406.tgz", + "integrity": "sha512-wUPTxo6Efk/pFenm7rKGiSIlia+m/FeTlICUT2CmJxZwD5XDpsYl8q9szWWccltqeKFP8zrJsOWu2C2gFfCw2Q==", "requires": { "@dcl/ts-proto": "1.154.0", "protobufjs": "7.2.4" diff --git a/package.json b/package.json index ec776a1e8..a3870200e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/decentraland/js-sdk-toolchain/issues", "dependencies": { "@actions/core": "^1.10.0", - "@dcl/protocol": "1.0.0-28050011172.commit-c96236d", + "@dcl/protocol": "1.0.0-28974105118.commit-a598406", "@dcl/quickjs-emscripten": "^0.21.0-3680274614.commit-1808aa1", "@dcl/ts-proto": "1.153.0", "@types/fs-extra": "^9.0.12", diff --git a/packages/@dcl/playground-assets/etc/playground-assets.api.md b/packages/@dcl/playground-assets/etc/playground-assets.api.md index f32ac00a8..0fecc814e 100644 --- a/packages/@dcl/playground-assets/etc/playground-assets.api.md +++ b/packages/@dcl/playground-assets/etc/playground-assets.api.md @@ -196,7 +196,8 @@ export const AvatarModifierArea: LastWriteWinElementSetComponentDefinition { const Billboard = components.Billboard(newEngine) testComponentSerialization(Billboard, { - billboardMode: BillboardMode.BM_Y + billboardMode: BillboardMode.BM_Y, + targetEntity: undefined + }) + }) + + it('should serialize/deserialize Billboard with targetEntity', () => { + const newEngine = Engine() + const Billboard = components.Billboard(newEngine) + + testComponentSerialization(Billboard, { + billboardMode: BillboardMode.BM_Y, + targetEntity: 512 + }) + }) + + it('should serialize/deserialize Billboard without targetEntity', () => { + const newEngine = Engine() + const Billboard = components.Billboard(newEngine) + + testComponentSerialization(Billboard, { + billboardMode: BillboardMode.BM_ALL, + targetEntity: undefined }) }) }) diff --git a/test/snapshots/development-bundles/static-scene.test.ts.crdt b/test/snapshots/development-bundles/static-scene.test.ts.crdt index ebe206ae2..7c283e26f 100644 --- a/test/snapshots/development-bundles/static-scene.test.ts.crdt +++ b/test/snapshots/development-bundles/static-scene.test.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=565k bytes +SCENE_COMPILED_JS_SIZE_PROD=565.4k bytes THE BUNDLE HAS SOURCEMAPS (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k @@ -12,7 +12,7 @@ EVAL test/snapshots/development-bundles/static-scene.test.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 73k - MALLOC_COUNT = 16304 + MALLOC_COUNT = 16305 ALIVE_OBJS_DELTA ~= 3.24k CALL onStart() main.crdt: PUT_COMPONENT e=0x200 c=1 t=0 data={"position":{"x":5.880000114440918,"y":2.7916901111602783,"z":7.380000114440918},"rotation":{"x":0,"y":0,"z":0,"w":1},"scale":{"x":1,"y":1,"z":1},"parent":0} @@ -57,4 +57,4 @@ CALL onUpdate(0.1) OPCODES ~= 5k MALLOC_COUNT = -5 ALIVE_OBJS_DELTA ~= 0.00k - MEMORY_USAGE_COUNT ~= 1427.87k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1428.31k bytes \ No newline at end of file diff --git a/test/snapshots/development-bundles/testing-fw.test.ts.crdt b/test/snapshots/development-bundles/testing-fw.test.ts.crdt index b67840ba5..6e6c4d1d4 100644 --- a/test/snapshots/development-bundles/testing-fw.test.ts.crdt +++ b/test/snapshots/development-bundles/testing-fw.test.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=565.5k bytes +SCENE_COMPILED_JS_SIZE_PROD=565.9k bytes THE BUNDLE HAS SOURCEMAPS (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k @@ -12,7 +12,7 @@ EVAL test/snapshots/development-bundles/testing-fw.test.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 83k - MALLOC_COUNT = 16856 + MALLOC_COUNT = 16857 ALIVE_OBJS_DELTA ~= 3.40k CALL onStart() LOG: ["Adding one to position.y=0"] @@ -63,4 +63,4 @@ CALL onUpdate(0.1) OPCODES ~= 6k MALLOC_COUNT = -53 ALIVE_OBJS_DELTA ~= -0.01k - MEMORY_USAGE_COUNT ~= 1433.63k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1434.07k bytes \ No newline at end of file diff --git a/test/snapshots/development-bundles/two-way-crdt.test.ts.crdt b/test/snapshots/development-bundles/two-way-crdt.test.ts.crdt index 62dec0994..f11d0b5eb 100644 --- a/test/snapshots/development-bundles/two-way-crdt.test.ts.crdt +++ b/test/snapshots/development-bundles/two-way-crdt.test.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=565.5k bytes +SCENE_COMPILED_JS_SIZE_PROD=565.9k bytes THE BUNDLE HAS SOURCEMAPS (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k @@ -12,7 +12,7 @@ EVAL test/snapshots/development-bundles/two-way-crdt.test.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 83k - MALLOC_COUNT = 16856 + MALLOC_COUNT = 16857 ALIVE_OBJS_DELTA ~= 3.40k CALL onStart() LOG: ["Adding one to position.y=0"] @@ -63,4 +63,4 @@ CALL onUpdate(0.1) OPCODES ~= 6k MALLOC_COUNT = -53 ALIVE_OBJS_DELTA ~= -0.01k - MEMORY_USAGE_COUNT ~= 1433.64k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1434.08k bytes \ No newline at end of file diff --git a/test/snapshots/package-lock.json b/test/snapshots/package-lock.json index 608be56d4..7f74502e9 100644 --- a/test/snapshots/package-lock.json +++ b/test/snapshots/package-lock.json @@ -170,7 +170,7 @@ "@dcl/inspector": "7.34.3", "@dcl/linker-dapp": "0.15.2", "@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be", - "@dcl/protocol": "1.0.0-28050011172.commit-c96236d", + "@dcl/protocol": "1.0.0-28974105118.commit-a598406", "@dcl/quests-client": "^1.0.3", "@dcl/quests-manager": "^0.1.4", "@dcl/rpc": "^1.1.1", diff --git a/test/snapshots/production-bundles/append-value-crdt.ts.crdt b/test/snapshots/production-bundles/append-value-crdt.ts.crdt index 6d414f426..bda045a93 100644 --- a/test/snapshots/production-bundles/append-value-crdt.ts.crdt +++ b/test/snapshots/production-bundles/append-value-crdt.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=248.5k bytes +SCENE_COMPILED_JS_SIZE_PROD=248.6k bytes (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k MALLOC_COUNT = 1005 @@ -10,7 +10,7 @@ EVAL test/snapshots/production-bundles/append-value-crdt.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 85k - MALLOC_COUNT = 15164 + MALLOC_COUNT = 15165 ALIVE_OBJS_DELTA ~= 3.40k CALL onStart() Renderer: APPEND_VALUE e=0x200 c=1063 t=0 data={"button":0,"hit":{"position":{"x":1,"y":2,"z":3},"globalOrigin":{"x":1,"y":2,"z":3},"direction":{"x":1,"y":2,"z":3},"normalHit":{"x":1,"y":2,"z":3},"length":10,"meshName":"mesh","entityId":512},"state":1,"timestamp":1,"analog":5,"tickNumber":0} @@ -56,4 +56,4 @@ CALL onUpdate(0.1) OPCODES ~= 15k MALLOC_COUNT = 31 ALIVE_OBJS_DELTA ~= 0.01k - MEMORY_USAGE_COUNT ~= 1069.95k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1070.25k bytes \ No newline at end of file diff --git a/test/snapshots/production-bundles/billboard.ts.crdt b/test/snapshots/production-bundles/billboard.ts.crdt index 39d144573..a676ff6ad 100644 --- a/test/snapshots/production-bundles/billboard.ts.crdt +++ b/test/snapshots/production-bundles/billboard.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=289.3k bytes +SCENE_COMPILED_JS_SIZE_PROD=289.5k bytes (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k MALLOC_COUNT = 1005 @@ -10,7 +10,7 @@ EVAL test/snapshots/production-bundles/billboard.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 87k - MALLOC_COUNT = 17681 + MALLOC_COUNT = 17683 ALIVE_OBJS_DELTA ~= 3.87k CALL onStart() OPCODES ~= 0k @@ -78,4 +78,4 @@ CALL onUpdate(0.1) OPCODES ~= 12k MALLOC_COUNT = 0 ALIVE_OBJS_DELTA ~= 0.00k - MEMORY_USAGE_COUNT ~= 1255.93k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1256.31k bytes \ No newline at end of file diff --git a/test/snapshots/production-bundles/cube-deleted.ts.crdt b/test/snapshots/production-bundles/cube-deleted.ts.crdt index 0b9775fd7..b6f06fdc1 100644 --- a/test/snapshots/production-bundles/cube-deleted.ts.crdt +++ b/test/snapshots/production-bundles/cube-deleted.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=244.7k bytes +SCENE_COMPILED_JS_SIZE_PROD=244.9k bytes (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k MALLOC_COUNT = 1005 @@ -10,7 +10,7 @@ EVAL test/snapshots/production-bundles/cube-deleted.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 76k - MALLOC_COUNT = 14284 + MALLOC_COUNT = 14285 ALIVE_OBJS_DELTA ~= 3.17k CALL onStart() OPCODES ~= 0k @@ -43,4 +43,4 @@ CALL onUpdate(0.1) OPCODES ~= 6k MALLOC_COUNT = 1 ALIVE_OBJS_DELTA ~= 0.00k - MEMORY_USAGE_COUNT ~= 1032.22k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1032.52k bytes \ No newline at end of file diff --git a/test/snapshots/production-bundles/cube.ts.crdt b/test/snapshots/production-bundles/cube.ts.crdt index 538379f95..26ce195d2 100644 --- a/test/snapshots/production-bundles/cube.ts.crdt +++ b/test/snapshots/production-bundles/cube.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=244.6k bytes +SCENE_COMPILED_JS_SIZE_PROD=244.7k bytes (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k MALLOC_COUNT = 1005 @@ -10,7 +10,7 @@ EVAL test/snapshots/production-bundles/cube.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 75k - MALLOC_COUNT = 14257 + MALLOC_COUNT = 14258 ALIVE_OBJS_DELTA ~= 3.16k CALL onStart() OPCODES ~= 0k @@ -33,4 +33,4 @@ CALL onUpdate(0.1) OPCODES ~= 3k MALLOC_COUNT = 0 ALIVE_OBJS_DELTA ~= 0.00k - MEMORY_USAGE_COUNT ~= 1021.97k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1022.28k bytes \ No newline at end of file diff --git a/test/snapshots/production-bundles/cubes.ts.crdt b/test/snapshots/production-bundles/cubes.ts.crdt index 5a2a571c5..b9816110d 100644 --- a/test/snapshots/production-bundles/cubes.ts.crdt +++ b/test/snapshots/production-bundles/cubes.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=289.7k bytes +SCENE_COMPILED_JS_SIZE_PROD=289.9k bytes (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k MALLOC_COUNT = 1005 @@ -10,7 +10,7 @@ EVAL test/snapshots/production-bundles/cubes.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 127k - MALLOC_COUNT = 21018 + MALLOC_COUNT = 21020 ALIVE_OBJS_DELTA ~= 5.16k CALL onStart() OPCODES ~= 0k @@ -1653,4 +1653,4 @@ CALL onUpdate(0.1) OPCODES ~= 725k MALLOC_COUNT = 0 ALIVE_OBJS_DELTA ~= 0.00k - MEMORY_USAGE_COUNT ~= 1480.40k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1480.79k bytes \ No newline at end of file diff --git a/test/snapshots/production-bundles/pointer-events.ts.crdt b/test/snapshots/production-bundles/pointer-events.ts.crdt index 0c9d850b9..add932a39 100644 --- a/test/snapshots/production-bundles/pointer-events.ts.crdt +++ b/test/snapshots/production-bundles/pointer-events.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=245.5k bytes +SCENE_COMPILED_JS_SIZE_PROD=245.7k bytes (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k MALLOC_COUNT = 1005 @@ -10,7 +10,7 @@ EVAL test/snapshots/production-bundles/pointer-events.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 77k - MALLOC_COUNT = 14550 + MALLOC_COUNT = 14551 ALIVE_OBJS_DELTA ~= 3.24k CALL onStart() OPCODES ~= 0k @@ -44,4 +44,4 @@ CALL onUpdate(0.1) OPCODES ~= 3k MALLOC_COUNT = 0 ALIVE_OBJS_DELTA ~= 0.00k - MEMORY_USAGE_COUNT ~= 1041.67k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1041.98k bytes \ No newline at end of file diff --git a/test/snapshots/production-bundles/schema-components.ts.crdt b/test/snapshots/production-bundles/schema-components.ts.crdt index a17fd6a3a..ff5ebdfa4 100644 --- a/test/snapshots/production-bundles/schema-components.ts.crdt +++ b/test/snapshots/production-bundles/schema-components.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=244.6k bytes +SCENE_COMPILED_JS_SIZE_PROD=244.8k bytes (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k MALLOC_COUNT = 1005 @@ -10,7 +10,7 @@ EVAL test/snapshots/production-bundles/schema-components.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 79k - MALLOC_COUNT = 14389 + MALLOC_COUNT = 14390 ALIVE_OBJS_DELTA ~= 3.19k CALL onStart() OPCODES ~= 0k @@ -32,4 +32,4 @@ CALL onUpdate(0.1) OPCODES ~= 3k MALLOC_COUNT = 0 ALIVE_OBJS_DELTA ~= 0.00k - MEMORY_USAGE_COUNT ~= 1024.42k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1024.73k bytes \ No newline at end of file diff --git a/test/snapshots/production-bundles/ui.ts.crdt b/test/snapshots/production-bundles/ui.ts.crdt index 50f1f6a70..320c2eb61 100644 --- a/test/snapshots/production-bundles/ui.ts.crdt +++ b/test/snapshots/production-bundles/ui.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=406.6k bytes +SCENE_COMPILED_JS_SIZE_PROD=406.7k bytes (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k MALLOC_COUNT = 1005 @@ -10,7 +10,7 @@ EVAL test/snapshots/production-bundles/ui.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 88k - MALLOC_COUNT = 22271 + MALLOC_COUNT = 22272 ALIVE_OBJS_DELTA ~= 4.49k CALL onStart() OPCODES ~= 0k @@ -66,4 +66,4 @@ CALL onUpdate(0.1) OPCODES ~= 74k MALLOC_COUNT = 0 ALIVE_OBJS_DELTA ~= 0.00k - MEMORY_USAGE_COUNT ~= 1891.24k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 1891.55k bytes \ No newline at end of file diff --git a/test/snapshots/production-bundles/with-main-function.ts.crdt b/test/snapshots/production-bundles/with-main-function.ts.crdt index c98963031..cec0d76bb 100644 --- a/test/snapshots/production-bundles/with-main-function.ts.crdt +++ b/test/snapshots/production-bundles/with-main-function.ts.crdt @@ -1,4 +1,4 @@ -SCENE_COMPILED_JS_SIZE_PROD=608.2k bytes +SCENE_COMPILED_JS_SIZE_PROD=608.6k bytes (start empty vm 0.21.0-3680274614.commit-1808aa1) OPCODES ~= 0k MALLOC_COUNT = 1005 @@ -10,7 +10,7 @@ EVAL test/snapshots/production-bundles/with-main-function.js REQUIRE: ~system/EngineApi REQUIRE: ~system/Runtime OPCODES ~= 222k - MALLOC_COUNT = 43889 + MALLOC_COUNT = 43890 ALIVE_OBJS_DELTA ~= 9.89k CALL onStart() OPCODES ~= 0k @@ -38,4 +38,4 @@ CALL onUpdate(0.1) OPCODES ~= 5k MALLOC_COUNT = 13 ALIVE_OBJS_DELTA ~= 0.00k - MEMORY_USAGE_COUNT ~= 2968.03k bytes \ No newline at end of file + MEMORY_USAGE_COUNT ~= 2968.93k bytes \ No newline at end of file