From d9e3bec5637b6cef47ac088cda87fbdd3c8b9aff Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Melucci <163010988+AlejandroAlvarezMelucciDCL@users.noreply.github.com> Date: Fri, 18 Oct 2024 13:30:06 -0300 Subject: [PATCH] chore: move alpha_texture from PBRMaterial to UnlitMaterial (#1019) * Pointed to this chore branch in protocol, this will reverted before merging * Updated build file with the changes from protocl * Fixed Material test * Updated protocol to point latest commit * Updated sdk-commands to use latest protocol --- package-lock.json | 15 ++++++------ package.json | 2 +- .../etc/playground-assets.api.md | 2 ++ packages/@dcl/sdk-commands/package-lock.json | 15 ++++++------ packages/@dcl/sdk-commands/package.json | 2 +- test/ecs/components/Material.spec.ts | 23 +++---------------- 6 files changed, 21 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 28c1da52d..caa76a49b 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-10955038136.commit-7fe9554", + "@dcl/protocol": "1.0.0-11406954347.commit-ba19c4f", "@dcl/quickjs-emscripten": "^0.21.0-3680274614.commit-1808aa1", "@dcl/ts-proto": "1.153.0", "@types/fs-extra": "^9.0.12", @@ -577,10 +577,9 @@ } }, "node_modules/@dcl/protocol": { - "version": "1.0.0-10955038136.commit-7fe9554", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-10955038136.commit-7fe9554.tgz", - "integrity": "sha512-0BcRTJxFhxpX1k4oN8ErL+HiJYDmd98aDh6Kti54zoCph3SlJqkq0r1KshHAeMaXLSKNRtljjgkf4KkB8MriKA==", - "license": "Apache-2.0", + "version": "1.0.0-11406954347.commit-ba19c4f", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-11406954347.commit-ba19c4f.tgz", + "integrity": "sha512-oMoq5IKAe1gout5SbP2w3Jq3Im+tbUiREW70BC+aVwwOly0YDtTWTZG9FyjeF36RDhyCg7z6jwtHL/rbWp0skw==", "dependencies": { "@dcl/ts-proto": "1.154.0" } @@ -8233,9 +8232,9 @@ } }, "@dcl/protocol": { - "version": "1.0.0-10955038136.commit-7fe9554", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-10955038136.commit-7fe9554.tgz", - "integrity": "sha512-0BcRTJxFhxpX1k4oN8ErL+HiJYDmd98aDh6Kti54zoCph3SlJqkq0r1KshHAeMaXLSKNRtljjgkf4KkB8MriKA==", + "version": "1.0.0-11406954347.commit-ba19c4f", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-11406954347.commit-ba19c4f.tgz", + "integrity": "sha512-oMoq5IKAe1gout5SbP2w3Jq3Im+tbUiREW70BC+aVwwOly0YDtTWTZG9FyjeF36RDhyCg7z6jwtHL/rbWp0skw==", "requires": { "@dcl/ts-proto": "1.154.0" }, diff --git a/package.json b/package.json index 8d25b1363..0c809b80a 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-10955038136.commit-7fe9554", + "@dcl/protocol": "1.0.0-11406954347.commit-ba19c4f", "@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 65c42270e..c05702bbc 100644 --- a/packages/@dcl/playground-assets/etc/playground-assets.api.md +++ b/packages/@dcl/playground-assets/etc/playground-assets.api.md @@ -2418,6 +2418,7 @@ export namespace PBMaterial { export interface PBMaterial_PbrMaterial { albedoColor?: PBColor4 | undefined; alphaTest?: number | undefined; + // @deprecated (undocumented) alphaTexture?: TextureUnion | undefined; bumpTexture?: TextureUnion | undefined; castShadows?: boolean | undefined; @@ -2444,6 +2445,7 @@ export namespace PBMaterial_PbrMaterial { // @public (undocumented) export interface PBMaterial_UnlitMaterial { alphaTest?: number | undefined; + alphaTexture?: TextureUnion | undefined; castShadows?: boolean | undefined; diffuseColor?: PBColor4 | undefined; texture?: TextureUnion | undefined; diff --git a/packages/@dcl/sdk-commands/package-lock.json b/packages/@dcl/sdk-commands/package-lock.json index d0a6039db..bab6fbf37 100644 --- a/packages/@dcl/sdk-commands/package-lock.json +++ b/packages/@dcl/sdk-commands/package-lock.json @@ -15,7 +15,7 @@ "@dcl/inspector": "file:../inspector", "@dcl/linker-dapp": "^0.14.2", "@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be", - "@dcl/protocol": "1.0.0-10955038136.commit-7fe9554", + "@dcl/protocol": "1.0.0-11406954347.commit-ba19c4f", "@dcl/quests-client": "^1.0.3", "@dcl/quests-manager": "^0.1.4", "@dcl/rpc": "^1.1.1", @@ -239,10 +239,9 @@ } }, "node_modules/@dcl/protocol": { - "version": "1.0.0-10955038136.commit-7fe9554", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-10955038136.commit-7fe9554.tgz", - "integrity": "sha512-0BcRTJxFhxpX1k4oN8ErL+HiJYDmd98aDh6Kti54zoCph3SlJqkq0r1KshHAeMaXLSKNRtljjgkf4KkB8MriKA==", - "license": "Apache-2.0", + "version": "1.0.0-11406954347.commit-ba19c4f", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-11406954347.commit-ba19c4f.tgz", + "integrity": "sha512-oMoq5IKAe1gout5SbP2w3Jq3Im+tbUiREW70BC+aVwwOly0YDtTWTZG9FyjeF36RDhyCg7z6jwtHL/rbWp0skw==", "dependencies": { "@dcl/ts-proto": "1.154.0" } @@ -3229,9 +3228,9 @@ } }, "@dcl/protocol": { - "version": "1.0.0-10955038136.commit-7fe9554", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-10955038136.commit-7fe9554.tgz", - "integrity": "sha512-0BcRTJxFhxpX1k4oN8ErL+HiJYDmd98aDh6Kti54zoCph3SlJqkq0r1KshHAeMaXLSKNRtljjgkf4KkB8MriKA==", + "version": "1.0.0-11406954347.commit-ba19c4f", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-11406954347.commit-ba19c4f.tgz", + "integrity": "sha512-oMoq5IKAe1gout5SbP2w3Jq3Im+tbUiREW70BC+aVwwOly0YDtTWTZG9FyjeF36RDhyCg7z6jwtHL/rbWp0skw==", "requires": { "@dcl/ts-proto": "1.154.0" } diff --git a/packages/@dcl/sdk-commands/package.json b/packages/@dcl/sdk-commands/package.json index 79c748b0b..e92c50308 100644 --- a/packages/@dcl/sdk-commands/package.json +++ b/packages/@dcl/sdk-commands/package.json @@ -13,7 +13,7 @@ "@dcl/inspector": "file:../inspector", "@dcl/linker-dapp": "^0.14.2", "@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be", - "@dcl/protocol": "1.0.0-10955038136.commit-7fe9554", + "@dcl/protocol": "1.0.0-11406954347.commit-ba19c4f", "@dcl/quests-client": "^1.0.3", "@dcl/quests-manager": "^0.1.4", "@dcl/rpc": "^1.1.1", diff --git a/test/ecs/components/Material.spec.ts b/test/ecs/components/Material.spec.ts index a66398250..a5f9c8e68 100644 --- a/test/ecs/components/Material.spec.ts +++ b/test/ecs/components/Material.spec.ts @@ -48,16 +48,7 @@ describe('Generated Material ProtoBuf', () => { } } }, - alphaTexture: { - tex: { - $case: 'texture', - texture: { - filterMode: undefined, - wrapMode: undefined, - src: 'not-casla' - } - } - }, + alphaTexture: undefined, castShadows: true, metallic: 1, roughness: 1, @@ -79,16 +70,7 @@ describe('Generated Material ProtoBuf', () => { createPbrMaterial({ albedoColor: { r: 0, g: 1, b: 1, a: 1 }, alphaTest: 1, - alphaTexture: { - tex: { - $case: 'texture', - texture: { - wrapMode: TextureWrapMode.TWM_CLAMP, - filterMode: TextureFilterMode.TFM_BILINEAR, - src: 'not-casla' - } - } - }, + alphaTexture: undefined, bumpTexture: { tex: { $case: 'texture', @@ -136,6 +118,7 @@ describe('Generated Material ProtoBuf', () => { createUnlitMaterial({ castShadows: true, diffuseColor: { r: 0, g: 1, b: 1, a: 1 }, + alphaTexture: undefined, alphaTest: undefined, texture: undefined })