From 943565b09caa260a2bd4becacb54e45546cc67c8 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Melucci Date: Wed, 20 Nov 2024 08:29:57 -0300 Subject: [PATCH 1/4] Small cleanup and proper check of Unity object lifetime --- .../Highlight/HighlightRendererFeature.cs | 161 ++++++++++-------- 1 file changed, 86 insertions(+), 75 deletions(-) diff --git a/Explorer/Assets/DCL/Rendering/Highlight/HighlightRendererFeature.cs b/Explorer/Assets/DCL/Rendering/Highlight/HighlightRendererFeature.cs index 5898b90adf..10a651b97b 100644 --- a/Explorer/Assets/DCL/Rendering/Highlight/HighlightRendererFeature.cs +++ b/Explorer/Assets/DCL/Rendering/Highlight/HighlightRendererFeature.cs @@ -25,10 +25,10 @@ internal class HighlightRendererFeature_Settings [SerializeField] internal float DepthSensitivity = 0.05f; [SerializeField] internal float NormalsSensitivity = 1.0f; [SerializeField] internal float ColorSensitivity = 0.5f; - [SerializeField] internal Color OutlineColor = new (1.0f, 1.0f, 1.0f, 0.5f); + //[SerializeField] internal Color OutlineColor = new (1.0f, 1.0f, 1.0f, 0.5f); } - public partial class HighlightRendererFeature : ScriptableRendererFeature + public partial class HighlightRendererFeature //: ScriptableRendererFeature { private const string k_ShaderName_HighlightInput = "DCL/HighlightInput_Override"; private const string k_ShaderName_HighlightInputBlur = "DCL/HighlightInput_Blur"; @@ -83,11 +83,11 @@ public override void SetupRenderPasses(ScriptableRenderer _renderer, in Renderin { // Highlight Input - Override Material & Shader, Colour & Depth Render Targets and pass setups { - if (highlightInputMaterial == null) + if (!highlightInputMaterial) { m_ShaderHighlightInput = Shader.Find(k_ShaderName_HighlightInput); - if (m_ShaderHighlightInput == null) + if (!m_ShaderHighlightInput) { ReportHub.LogError(m_ReportData, "m_ShaderHighlightInput not found."); return; @@ -95,14 +95,14 @@ public override void SetupRenderPasses(ScriptableRenderer _renderer, in Renderin highlightInputMaterial = CoreUtils.CreateEngineMaterial(m_ShaderHighlightInput); - if (highlightInputMaterial == null) + if (!highlightInputMaterial) { ReportHub.LogError(m_ReportData, "highlightInputMaterial not found."); return; } } - if (highlightInputBlurMaterial == null) + if (!highlightInputBlurMaterial) { m_ShaderHighlightInputBlur = Shader.Find(k_ShaderName_HighlightInputBlur); @@ -114,7 +114,7 @@ public override void SetupRenderPasses(ScriptableRenderer _renderer, in Renderin highlightInputBlurMaterial = CoreUtils.CreateEngineMaterial(m_ShaderHighlightInputBlur); - if (highlightInputBlurMaterial == null) + if (!highlightInputBlurMaterial) { ReportHub.LogError(m_ReportData, "highlightInputBlurMaterial not found."); return; @@ -123,81 +123,90 @@ public override void SetupRenderPasses(ScriptableRenderer _renderer, in Renderin // Highlight - Colour Texture { - var desc = new RenderTextureDescriptor(); - desc.autoGenerateMips = false; - desc.bindMS = false; - desc.colorFormat = RenderTextureFormat.ARGB32; - desc.depthBufferBits = 0; - desc.depthStencilFormat = GraphicsFormat.None; - desc.dimension = TextureDimension.Tex2D; - desc.enableRandomWrite = false; - desc.graphicsFormat = GraphicsFormat.R8G8B8A8_UNorm; - desc.height = _renderingData.cameraData.cameraTargetDescriptor.height; - desc.memoryless = RenderTextureMemoryless.None; - desc.mipCount = 0; - desc.msaaSamples = 1; - desc.shadowSamplingMode = ShadowSamplingMode.None; - desc.sRGB = false; - desc.stencilFormat = GraphicsFormat.None; - desc.useDynamicScale = false; - desc.useMipMap = false; - desc.volumeDepth = 0; - desc.vrUsage = VRTextureUsage.None; - desc.width = _renderingData.cameraData.cameraTargetDescriptor.width; + var desc = new RenderTextureDescriptor + { + autoGenerateMips = false, + bindMS = false, + colorFormat = RenderTextureFormat.ARGB32, + depthBufferBits = 0, + depthStencilFormat = GraphicsFormat.None, + dimension = TextureDimension.Tex2D, + enableRandomWrite = false, + graphicsFormat = GraphicsFormat.R8G8B8A8_UNorm, + height = _renderingData.cameraData.cameraTargetDescriptor.height, + memoryless = RenderTextureMemoryless.None, + mipCount = 0, + msaaSamples = 1, + shadowSamplingMode = ShadowSamplingMode.None, + sRGB = false, + stencilFormat = GraphicsFormat.None, + useDynamicScale = false, + useMipMap = false, + volumeDepth = 0, + vrUsage = VRTextureUsage.None, + width = _renderingData.cameraData.cameraTargetDescriptor.width, + }; + highlightRTDescriptor_Colour = desc; RenderingUtils.ReAllocateIfNeeded(ref highlightRTHandle_Colour, highlightRTDescriptor_Colour, FilterMode.Point, TextureWrapMode.Clamp, isShadowMap: false, anisoLevel: 1, mipMapBias: 0F, name: "_Highlight_ColourTexture"); } // Highlight - Depth Texture { - var desc = new RenderTextureDescriptor(); - desc.autoGenerateMips = false; - desc.bindMS = false; - desc.colorFormat = RenderTextureFormat.Shadowmap; - desc.depthBufferBits = 32; - desc.depthStencilFormat = GraphicsFormat.D32_SFloat; - desc.dimension = TextureDimension.Tex2D; - desc.enableRandomWrite = false; - desc.graphicsFormat = GraphicsFormat.R8G8B8A8_UNorm; - desc.height = _renderingData.cameraData.cameraTargetDescriptor.height; - desc.memoryless = RenderTextureMemoryless.None; - desc.mipCount = 0; - desc.msaaSamples = 1; - desc.shadowSamplingMode = ShadowSamplingMode.None; - desc.sRGB = false; - desc.stencilFormat = GraphicsFormat.None; - desc.useDynamicScale = false; - desc.useMipMap = false; - desc.volumeDepth = 0; - desc.vrUsage = VRTextureUsage.None; - desc.width = _renderingData.cameraData.cameraTargetDescriptor.width; + var desc = new RenderTextureDescriptor + { + autoGenerateMips = false, + bindMS = false, + colorFormat = RenderTextureFormat.Shadowmap, + depthBufferBits = 32, + depthStencilFormat = GraphicsFormat.D32_SFloat, + dimension = TextureDimension.Tex2D, + enableRandomWrite = false, + graphicsFormat = GraphicsFormat.R8G8B8A8_UNorm, + height = _renderingData.cameraData.cameraTargetDescriptor.height, + memoryless = RenderTextureMemoryless.None, + mipCount = 0, + msaaSamples = 1, + shadowSamplingMode = ShadowSamplingMode.None, + sRGB = false, + stencilFormat = GraphicsFormat.None, + useDynamicScale = false, + useMipMap = false, + volumeDepth = 0, + vrUsage = VRTextureUsage.None, + width = _renderingData.cameraData.cameraTargetDescriptor.width, + }; + highlightRTDescriptor_Depth = desc; RenderingUtils.ReAllocateIfNeeded(ref highlightRTHandle_Depth, highlightRTDescriptor_Depth, FilterMode.Point, TextureWrapMode.Clamp, isShadowMap: false, anisoLevel: 1, mipMapBias: 0F, name: "_Highlight_DepthTexture"); } // Highlight - Blur Texture (PING & PONG) { - var desc = new RenderTextureDescriptor(); - desc.autoGenerateMips = false; - desc.bindMS = false; - desc.colorFormat = RenderTextureFormat.ARGB32; - desc.depthBufferBits = 0; - desc.depthStencilFormat = GraphicsFormat.None; - desc.dimension = TextureDimension.Tex2D; - desc.enableRandomWrite = false; - desc.graphicsFormat = GraphicsFormat.R8G8B8A8_UNorm; - desc.height = _renderingData.cameraData.cameraTargetDescriptor.height; - desc.memoryless = RenderTextureMemoryless.None; - desc.mipCount = 0; - desc.msaaSamples = 1; - desc.shadowSamplingMode = ShadowSamplingMode.None; - desc.sRGB = false; - desc.stencilFormat = GraphicsFormat.None; - desc.useDynamicScale = false; - desc.useMipMap = false; - desc.volumeDepth = 0; - desc.vrUsage = VRTextureUsage.None; - desc.width = _renderingData.cameraData.cameraTargetDescriptor.width; + var desc = new RenderTextureDescriptor + { + autoGenerateMips = false, + bindMS = false, + colorFormat = RenderTextureFormat.ARGB32, + depthBufferBits = 0, + depthStencilFormat = GraphicsFormat.None, + dimension = TextureDimension.Tex2D, + enableRandomWrite = false, + graphicsFormat = GraphicsFormat.R8G8B8A8_UNorm, + height = _renderingData.cameraData.cameraTargetDescriptor.height, + memoryless = RenderTextureMemoryless.None, + mipCount = 0, + msaaSamples = 1, + shadowSamplingMode = ShadowSamplingMode.None, + sRGB = false, + stencilFormat = GraphicsFormat.None, + useDynamicScale = false, + useMipMap = false, + volumeDepth = 0, + vrUsage = VRTextureUsage.None, + width = _renderingData.cameraData.cameraTargetDescriptor.width, + }; + highlightRTDescriptor_Colour_Blur = desc; RenderingUtils.ReAllocateIfNeeded(ref highlightRTHandle_Colour_Blur_Ping, highlightRTDescriptor_Colour_Blur, FilterMode.Point, TextureWrapMode.Clamp, isShadowMap: false, anisoLevel: 1, mipMapBias: 0F, name: "_Highlight_ColourTexture_Blur_Ping"); RenderingUtils.ReAllocateIfNeeded(ref highlightRTHandle_Colour_Blur_Pong, highlightRTDescriptor_Colour_Blur, FilterMode.Point, TextureWrapMode.Clamp, isShadowMap: false, anisoLevel: 1, mipMapBias: 0F, name: "_Highlight_ColourTexture_Blur_Pong"); @@ -218,11 +227,11 @@ public override void SetupRenderPasses(ScriptableRenderer _renderer, in Renderin // Highlight Output Material, Shader, RenderTarget and pass setups { - if (highlightOutputMaterial == null) + if (!highlightOutputMaterial) { m_ShaderHighlightOutput = Shader.Find(k_ShaderName_HighlightOutput); - if (m_ShaderHighlightOutput == null) + if (!m_ShaderHighlightOutput) { ReportHub.LogError(m_ReportData, "m_ShaderHighlightOutput not found."); return; @@ -230,7 +239,7 @@ public override void SetupRenderPasses(ScriptableRenderer _renderer, in Renderin highlightOutputMaterial = CoreUtils.CreateEngineMaterial(m_ShaderHighlightOutput); - if (highlightOutputMaterial == null) + if (!highlightOutputMaterial) { ReportHub.LogError(m_ReportData, "highlightOutputMaterial not found."); return; @@ -244,10 +253,12 @@ public override void SetupRenderPasses(ScriptableRenderer _renderer, in Renderin public override void AddRenderPasses(ScriptableRenderer _renderer, ref RenderingData _renderingData) { // Highlight Input - if (highlightInputMaterial != null && m_ShaderHighlightInput != null && highlightRTHandle_Colour != null) { _renderer.EnqueuePass(highlightInputRenderPass); } + if (highlightInputMaterial && m_ShaderHighlightInput && highlightRTHandle_Colour != null) + _renderer.EnqueuePass(highlightInputRenderPass); // HighLight Output - if (highlightOutputMaterial != null && m_ShaderHighlightOutput != null) { _renderer.EnqueuePass(highlightOutputRenderPass); } + if (highlightOutputMaterial && m_ShaderHighlightOutput) + _renderer.EnqueuePass(highlightOutputRenderPass); } protected override void Dispose(bool _bDisposing) From 77b3208ef9516cc81012b237d187b6149b25a01d Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Melucci Date: Thu, 21 Nov 2024 11:43:40 -0300 Subject: [PATCH 2/4] Temporarily removed feature flag for festival initial spawn point --- Explorer/Assets/Scripts/Global/Dynamic/RealmNavigator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Explorer/Assets/Scripts/Global/Dynamic/RealmNavigator.cs b/Explorer/Assets/Scripts/Global/Dynamic/RealmNavigator.cs index 9327f47010..2049e035f9 100644 --- a/Explorer/Assets/Scripts/Global/Dynamic/RealmNavigator.cs +++ b/Explorer/Assets/Scripts/Global/Dynamic/RealmNavigator.cs @@ -258,7 +258,7 @@ public async UniTask InitializeTeleportToSpawnPointAsync(AsyncLoadProcessReport featureFlagsCache.Configuration.IsEnabled(FeatureFlagsStrings.GENESIS_STARTING_PARCEL) && featureFlagsCache.Configuration.TryGetTextPayload(FeatureFlagsStrings.GENESIS_STARTING_PARCEL, FeatureFlagsStrings.STRING_VARIANT, out string parcelCoords)) { - RealmHelper.TryParseParcelFromString(parcelCoords, out parcelToTeleport); + //RealmHelper.TryParseParcelFromString(parcelCoords, out parcelToTeleport); } waitForSceneReadiness = await TeleportToParcelAsync(parcelToTeleport, teleportLoadReport, ct); } From 1fa069d738d8e2d4245f3c09358d548252b28060 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Melucci Date: Fri, 22 Nov 2024 16:31:40 -0300 Subject: [PATCH 3/4] Testing a shot in the dark --- .../Assets/DCL/Rendering/Highlight/HighlightInputRenderPass.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Explorer/Assets/DCL/Rendering/Highlight/HighlightInputRenderPass.cs b/Explorer/Assets/DCL/Rendering/Highlight/HighlightInputRenderPass.cs index 549932f467..c8e90c5979 100644 --- a/Explorer/Assets/DCL/Rendering/Highlight/HighlightInputRenderPass.cs +++ b/Explorer/Assets/DCL/Rendering/Highlight/HighlightInputRenderPass.cs @@ -137,6 +137,7 @@ private void ExecuteCommand(ScriptableRenderContext context, RenderingData rende materialToUse.SetColor(highlightColour, !clear ? settings.Color : Color.clear); materialToUse.SetFloat(outlineWidth, !clear ? settings.Width : 0); materialToUse.SetVector(highlightObjectOffset, Vector3.zero); + commandBuffer.Clear(); commandBuffer.DrawRenderer(renderer, materialToUse, 0, 0); } } From 6abc3a7738a8740198a810c58f86e5eaf5b98df7 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Melucci Date: Thu, 28 Nov 2024 17:09:24 -0300 Subject: [PATCH 4/4] Added some debug log. Updated protocol. --- .../Highlight/HighlightInputRenderPass.cs | 1 + .../DecentralandProtocol/Material.gen.cs | 6 +- .../DecentralandProtocol/Texture.gen.cs | 142 +++++- .../DecentralandProtocol/Tween.gen.cs | 428 ++++++++++++++++-- scripts/package-lock.json | 14 +- scripts/package.json | 2 +- 6 files changed, 534 insertions(+), 59 deletions(-) diff --git a/Explorer/Assets/DCL/Rendering/Highlight/HighlightInputRenderPass.cs b/Explorer/Assets/DCL/Rendering/Highlight/HighlightInputRenderPass.cs index c8e90c5979..0043588a77 100644 --- a/Explorer/Assets/DCL/Rendering/Highlight/HighlightInputRenderPass.cs +++ b/Explorer/Assets/DCL/Rendering/Highlight/HighlightInputRenderPass.cs @@ -82,6 +82,7 @@ public override void Configure(CommandBuffer cmd, RenderTextureDescriptor camera public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) { + Debug.Log($"ALE - m_HighLightRenderers: {m_HighLightRenderers.Count}"); if (m_HighLightRenderers is not { Count: > 0 }) return; diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/Material.gen.cs b/Explorer/Assets/Protocol/DecentralandProtocol/Material.gen.cs index 90c927e6e0..2eede19b16 100644 --- a/Explorer/Assets/Protocol/DecentralandProtocol/Material.gen.cs +++ b/Explorer/Assets/Protocol/DecentralandProtocol/Material.gen.cs @@ -515,7 +515,7 @@ public void ClearCastShadows() { public const int AlphaTextureFieldNumber = 5; private global::Decentraland.Common.TextureUnion alphaTexture_; /// - /// default = null + /// default = null. Note that tilling and offset properties are ignored for this texture. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -932,7 +932,7 @@ public void ClearCastShadows() { public const int EmissiveTextureFieldNumber = 5; private global::Decentraland.Common.TextureUnion emissiveTexture_; /// - /// default = null + /// default = null. Note that tilling and offset properties are ignored for this texture. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -947,7 +947,7 @@ public void ClearCastShadows() { public const int BumpTextureFieldNumber = 6; private global::Decentraland.Common.TextureUnion bumpTexture_; /// - /// default = null + /// default = null. Note that tilling and offset properties are ignored for this texture. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/Texture.gen.cs b/Explorer/Assets/Protocol/DecentralandProtocol/Texture.gen.cs index 01a7d6e66f..18b1b40a12 100644 --- a/Explorer/Assets/Protocol/DecentralandProtocol/Texture.gen.cs +++ b/Explorer/Assets/Protocol/DecentralandProtocol/Texture.gen.cs @@ -25,31 +25,35 @@ static TextureReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "CiFkZWNlbnRyYWxhbmQvY29tbW9uL3RleHR1cmUucHJvdG8SE2RlY2VudHJh", - "bGFuZC5jb21tb24itAEKB1RleHR1cmUSCwoDc3JjGAEgASgJEjwKCXdyYXBf", - "bW9kZRgCIAEoDjIkLmRlY2VudHJhbGFuZC5jb21tb24uVGV4dHVyZVdyYXBN", - "b2RlSACIAQESQAoLZmlsdGVyX21vZGUYAyABKA4yJi5kZWNlbnRyYWxhbmQu", - "Y29tbW9uLlRleHR1cmVGaWx0ZXJNb2RlSAGIAQFCDAoKX3dyYXBfbW9kZUIO", - "CgxfZmlsdGVyX21vZGUivgEKDUF2YXRhclRleHR1cmUSDwoHdXNlcl9pZBgB", - "IAEoCRI8Cgl3cmFwX21vZGUYAiABKA4yJC5kZWNlbnRyYWx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EAASDQoJVFdNX0NM", + "QU1QEAESDgoKVFdNX01JUlJPUhACKkcKEVRleHR1cmVGaWx0ZXJNb2RlEg0K", + "CVRGTV9QT0lOVBAAEhAKDFRGTV9CSUxJTkVBUhABEhEKDVRGTV9UUklMSU5F", + "QVIQAmIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, + new pbr::FileDescriptor[] { global::Decentraland.Common.VectorsReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Decentraland.Common.TextureWrapMode), typeof(global::Decentraland.Common.TextureFilterMode), }, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Common.Texture), global::Decentraland.Common.Texture.Parser, new[]{ "Src", "WrapMode", "FilterMode" }, new[]{ "WrapMode", "FilterMode" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Common.Texture), global::Decentraland.Common.Texture.Parser, new[]{ "Src", "WrapMode", "FilterMode", "Offset", "Tiling" }, new[]{ "WrapMode", "FilterMode", "Offset", "Tiling" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Common.AvatarTexture), global::Decentraland.Common.AvatarTexture.Parser, new[]{ "UserId", "WrapMode", "FilterMode" }, new[]{ "WrapMode", "FilterMode" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Common.VideoTexture), global::Decentraland.Common.VideoTexture.Parser, new[]{ "VideoPlayerEntity", "WrapMode", "FilterMode" }, new[]{ "WrapMode", "FilterMode" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Common.TextureUnion), global::Decentraland.Common.TextureUnion.Parser, new[]{ "Texture", "AvatarTexture", "VideoTexture" }, new[]{ "Tex" }, null, null, null) @@ -113,6 +117,8 @@ public Texture(Texture other) : this() { src_ = other.src_; wrapMode_ = other.wrapMode_; filterMode_ = other.filterMode_; + offset_ = other.offset_ != null ? other.offset_.Clone() : null; + tiling_ = other.tiling_ != null ? other.tiling_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -190,6 +196,36 @@ public void ClearFilterMode() { _hasBits0 &= ~2; } + /// Field number for the "offset" field. + public const int OffsetFieldNumber = 4; + private global::Decentraland.Common.Vector2 offset_; + /// + /// Final uv = offset + (input_uv * tiling) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Decentraland.Common.Vector2 Offset { + get { return offset_; } + set { + offset_ = value; + } + } + + /// Field number for the "tiling" field. + public const int TilingFieldNumber = 5; + private global::Decentraland.Common.Vector2 tiling_; + /// + /// default = Vector2.One; Tiling multiplier for texture repetition, only works for the texture property in PbrMaterial or UnlitMaterial. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Decentraland.Common.Vector2 Tiling { + get { return tiling_; } + set { + tiling_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -208,6 +244,8 @@ public bool Equals(Texture other) { if (Src != other.Src) return false; if (WrapMode != other.WrapMode) return false; if (FilterMode != other.FilterMode) return false; + if (!object.Equals(Offset, other.Offset)) return false; + if (!object.Equals(Tiling, other.Tiling)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -218,6 +256,8 @@ public override int GetHashCode() { if (Src.Length != 0) hash ^= Src.GetHashCode(); if (HasWrapMode) hash ^= WrapMode.GetHashCode(); if (HasFilterMode) hash ^= FilterMode.GetHashCode(); + if (offset_ != null) hash ^= Offset.GetHashCode(); + if (tiling_ != null) hash ^= Tiling.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -248,6 +288,14 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(24); output.WriteEnum((int) FilterMode); } + if (offset_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Offset); + } + if (tiling_ != null) { + output.WriteRawTag(42); + output.WriteMessage(Tiling); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -270,6 +318,14 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(24); output.WriteEnum((int) FilterMode); } + if (offset_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Offset); + } + if (tiling_ != null) { + output.WriteRawTag(42); + output.WriteMessage(Tiling); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -289,6 +345,12 @@ public int CalculateSize() { if (HasFilterMode) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FilterMode); } + if (offset_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Offset); + } + if (tiling_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Tiling); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -310,6 +372,18 @@ public void MergeFrom(Texture other) { if (other.HasFilterMode) { FilterMode = other.FilterMode; } + if (other.offset_ != null) { + if (offset_ == null) { + Offset = new global::Decentraland.Common.Vector2(); + } + Offset.MergeFrom(other.Offset); + } + if (other.tiling_ != null) { + if (tiling_ == null) { + Tiling = new global::Decentraland.Common.Vector2(); + } + Tiling.MergeFrom(other.Tiling); + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -337,6 +411,20 @@ public void MergeFrom(pb::CodedInputStream input) { FilterMode = (global::Decentraland.Common.TextureFilterMode) input.ReadEnum(); break; } + case 34: { + if (offset_ == null) { + Offset = new global::Decentraland.Common.Vector2(); + } + input.ReadMessage(Offset); + break; + } + case 42: { + if (tiling_ == null) { + Tiling = new global::Decentraland.Common.Vector2(); + } + input.ReadMessage(Tiling); + break; + } } } #endif @@ -364,6 +452,20 @@ public void MergeFrom(pb::CodedInputStream input) { FilterMode = (global::Decentraland.Common.TextureFilterMode) input.ReadEnum(); break; } + case 34: { + if (offset_ == null) { + Offset = new global::Decentraland.Common.Vector2(); + } + input.ReadMessage(Offset); + break; + } + case 42: { + if (tiling_ == null) { + Tiling = new global::Decentraland.Common.Vector2(); + } + input.ReadMessage(Tiling); + break; + } } } } diff --git a/Explorer/Assets/Protocol/DecentralandProtocol/Tween.gen.cs b/Explorer/Assets/Protocol/DecentralandProtocol/Tween.gen.cs index 7db9149345..76b297e0a2 100644 --- a/Explorer/Assets/Protocol/DecentralandProtocol/Tween.gen.cs +++ b/Explorer/Assets/Protocol/DecentralandProtocol/Tween.gen.cs @@ -26,50 +26,66 @@ static TweenReflection() { string.Concat( "CidkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdHdlZW4ucHJvdG8SG2Rl", "Y2VudHJhbGFuZC5zZGsuY29tcG9uZW50cxohZGVjZW50cmFsYW5kL2NvbW1v", - "bi92ZWN0b3JzLnByb3RvItYCCgdQQlR3ZWVuEhAKCGR1cmF0aW9uGAEgASgC", + "bi92ZWN0b3JzLnByb3RvIpgDCgdQQlR3ZWVuEhAKCGR1cmF0aW9uGAEgASgC", "EkQKD2Vhc2luZ19mdW5jdGlvbhgCIAEoDjIrLmRlY2VudHJhbGFuZC5zZGsu", "Y29tcG9uZW50cy5FYXNpbmdGdW5jdGlvbhIxCgRtb3ZlGAMgASgLMiEuZGVj", "ZW50cmFsYW5kLnNkay5jb21wb25lbnRzLk1vdmVIABI1CgZyb3RhdGUYBCAB", "KAsyIy5kZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMuUm90YXRlSAASMwoF", "c2NhbGUYBSABKAsyIi5kZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMuU2Nh", - "bGVIABIUCgdwbGF5aW5nGAYgASgISAGIAQESGQoMY3VycmVudF90aW1lGAcg", - "ASgCSAKIAQFCBgoEbW9kZUIKCghfcGxheWluZ0IPCg1fY3VycmVudF90aW1l", - "Io4BCgRNb3ZlEisKBXN0YXJ0GAEgASgLMhwuZG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U0VP", + "VVRCQUNLEB0SDwoLRUZfRUFTRUJBQ0sQHkIUqgIRRENMLkVDU0NvbXBvbmVu", + "dHNiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Decentraland.Common.VectorsReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::DCL.ECSComponents.EasingFunction), }, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBTween), global::DCL.ECSComponents.PBTween.Parser, new[]{ "Duration", "EasingFunction", "Move", "Rotate", "Scale", "Playing", "CurrentTime" }, new[]{ "Mode", "Playing", "CurrentTime" }, null, null, null), + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::DCL.ECSComponents.TextureMovementType), typeof(global::DCL.ECSComponents.EasingFunction), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBTween), global::DCL.ECSComponents.PBTween.Parser, new[]{ "Duration", "EasingFunction", "Move", "Rotate", "Scale", "TextureMove", "Playing", "CurrentTime" }, new[]{ "Mode", "Playing", "CurrentTime" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.Move), global::DCL.ECSComponents.Move.Parser, new[]{ "Start", "End", "FaceDirection" }, new[]{ "FaceDirection" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.Rotate), global::DCL.ECSComponents.Rotate.Parser, new[]{ "Start", "End" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.Scale), global::DCL.ECSComponents.Scale.Parser, new[]{ "Start", "End" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.Scale), global::DCL.ECSComponents.Scale.Parser, new[]{ "Start", "End" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.TextureMove), global::DCL.ECSComponents.TextureMove.Parser, new[]{ "Start", "End", "MovementType" }, new[]{ "MovementType" }, null, null, null) })); } #endregion } #region Enums + public enum TextureMovementType { + /// + /// default = TextureMovementType.TMT_OFFSET + /// + [pbr::OriginalName("TMT_OFFSET")] TmtOffset = 0, + [pbr::OriginalName("TMT_TILING")] TmtTiling = 1, + } + /// /// Implementation guidelines for these easing functions can be found /// at https://github.com/ai/easings.net/blob/6fcd5f852a470bf1a7890e8178afa0f471d5f2ec/src/easings/easingsFunctions.ts @@ -164,6 +180,9 @@ public PBTween(PBTween other) : this() { case ModeOneofCase.Scale: Scale = other.Scale.Clone(); break; + case ModeOneofCase.TextureMove: + TextureMove = other.TextureMove.Clone(); + break; } _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -238,6 +257,18 @@ public float Duration { } } + /// Field number for the "texture_move" field. + public const int TextureMoveFieldNumber = 8; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::DCL.ECSComponents.TextureMove TextureMove { + get { return modeCase_ == ModeOneofCase.TextureMove ? (global::DCL.ECSComponents.TextureMove) mode_ : null; } + set { + mode_ = value; + modeCase_ = value == null ? ModeOneofCase.None : ModeOneofCase.TextureMove; + } + } + /// Field number for the "playing" field. public const int PlayingFieldNumber = 6; private bool playing_; @@ -301,6 +332,7 @@ public enum ModeOneofCase { Move = 3, Rotate = 4, Scale = 5, + TextureMove = 8, } private ModeOneofCase modeCase_ = ModeOneofCase.None; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -336,6 +368,7 @@ public bool Equals(PBTween other) { if (!object.Equals(Move, other.Move)) return false; if (!object.Equals(Rotate, other.Rotate)) return false; if (!object.Equals(Scale, other.Scale)) return false; + if (!object.Equals(TextureMove, other.TextureMove)) return false; if (Playing != other.Playing) return false; if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(CurrentTime, other.CurrentTime)) return false; if (ModeCase != other.ModeCase) return false; @@ -351,6 +384,7 @@ public override int GetHashCode() { if (modeCase_ == ModeOneofCase.Move) hash ^= Move.GetHashCode(); if (modeCase_ == ModeOneofCase.Rotate) hash ^= Rotate.GetHashCode(); if (modeCase_ == ModeOneofCase.Scale) hash ^= Scale.GetHashCode(); + if (modeCase_ == ModeOneofCase.TextureMove) hash ^= TextureMove.GetHashCode(); if (HasPlaying) hash ^= Playing.GetHashCode(); if (HasCurrentTime) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(CurrentTime); hash ^= (int) modeCase_; @@ -400,6 +434,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(61); output.WriteFloat(CurrentTime); } + if (modeCase_ == ModeOneofCase.TextureMove) { + output.WriteRawTag(66); + output.WriteMessage(TextureMove); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -438,6 +476,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(61); output.WriteFloat(CurrentTime); } + if (modeCase_ == ModeOneofCase.TextureMove) { + output.WriteRawTag(66); + output.WriteMessage(TextureMove); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -463,6 +505,9 @@ public int CalculateSize() { if (modeCase_ == ModeOneofCase.Scale) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Scale); } + if (modeCase_ == ModeOneofCase.TextureMove) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TextureMove); + } if (HasPlaying) { size += 1 + 1; } @@ -512,6 +557,12 @@ public void MergeFrom(PBTween other) { } Scale.MergeFrom(other.Scale); break; + case ModeOneofCase.TextureMove: + if (TextureMove == null) { + TextureMove = new global::DCL.ECSComponents.TextureMove(); + } + TextureMove.MergeFrom(other.TextureMove); + break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -572,6 +623,15 @@ public void MergeFrom(pb::CodedInputStream input) { CurrentTime = input.ReadFloat(); break; } + case 66: { + global::DCL.ECSComponents.TextureMove subBuilder = new global::DCL.ECSComponents.TextureMove(); + if (modeCase_ == ModeOneofCase.TextureMove) { + subBuilder.MergeFrom(TextureMove); + } + input.ReadMessage(subBuilder); + TextureMove = subBuilder; + break; + } } } #endif @@ -630,6 +690,15 @@ public void MergeFrom(pb::CodedInputStream input) { CurrentTime = input.ReadFloat(); break; } + case 66: { + global::DCL.ECSComponents.TextureMove subBuilder = new global::DCL.ECSComponents.TextureMove(); + if (modeCase_ == ModeOneofCase.TextureMove) { + subBuilder.MergeFrom(TextureMove); + } + input.ReadMessage(subBuilder); + TextureMove = subBuilder; + break; + } } } } @@ -1421,6 +1490,309 @@ public void MergeFrom(pb::CodedInputStream input) { } + /// + /// This tween mode allows to move the texture of a PbrMaterial or UnlitMaterial. + /// You can also specify the movement type (offset or tiling) + /// + public sealed partial class TextureMove : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TextureMove()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::DCL.ECSComponents.TweenReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TextureMove() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TextureMove(TextureMove other) : this() { + _hasBits0 = other._hasBits0; + start_ = other.start_ != null ? other.start_.Clone() : null; + end_ = other.end_ != null ? other.end_.Clone() : null; + movementType_ = other.movementType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TextureMove Clone() { + return new TextureMove(this); + } + + /// Field number for the "start" field. + public const int StartFieldNumber = 1; + private global::Decentraland.Common.Vector2 start_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Decentraland.Common.Vector2 Start { + get { return start_; } + set { + start_ = value; + } + } + + /// Field number for the "end" field. + public const int EndFieldNumber = 2; + private global::Decentraland.Common.Vector2 end_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Decentraland.Common.Vector2 End { + get { return end_; } + set { + end_ = value; + } + } + + /// Field number for the "movement_type" field. + public const int MovementTypeFieldNumber = 3; + private global::DCL.ECSComponents.TextureMovementType movementType_; + /// + /// default = TextureMovementType.TMT_OFFSET + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::DCL.ECSComponents.TextureMovementType MovementType { + get { if ((_hasBits0 & 1) != 0) { return movementType_; } else { return global::DCL.ECSComponents.TextureMovementType.TmtOffset; } } + set { + _hasBits0 |= 1; + movementType_ = value; + } + } + /// Gets whether the "movement_type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMovementType { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "movement_type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMovementType() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TextureMove); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TextureMove other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Start, other.Start)) return false; + if (!object.Equals(End, other.End)) return false; + if (MovementType != other.MovementType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (start_ != null) hash ^= Start.GetHashCode(); + if (end_ != null) hash ^= End.GetHashCode(); + if (HasMovementType) hash ^= MovementType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (start_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Start); + } + if (end_ != null) { + output.WriteRawTag(18); + output.WriteMessage(End); + } + if (HasMovementType) { + output.WriteRawTag(24); + output.WriteEnum((int) MovementType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (start_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Start); + } + if (end_ != null) { + output.WriteRawTag(18); + output.WriteMessage(End); + } + if (HasMovementType) { + output.WriteRawTag(24); + output.WriteEnum((int) MovementType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (start_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Start); + } + if (end_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(End); + } + if (HasMovementType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MovementType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TextureMove other) { + if (other == null) { + return; + } + if (other.start_ != null) { + if (start_ == null) { + Start = new global::Decentraland.Common.Vector2(); + } + Start.MergeFrom(other.Start); + } + if (other.end_ != null) { + if (end_ == null) { + End = new global::Decentraland.Common.Vector2(); + } + End.MergeFrom(other.End); + } + if (other.HasMovementType) { + MovementType = other.MovementType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (start_ == null) { + Start = new global::Decentraland.Common.Vector2(); + } + input.ReadMessage(Start); + break; + } + case 18: { + if (end_ == null) { + End = new global::Decentraland.Common.Vector2(); + } + input.ReadMessage(End); + break; + } + case 24: { + MovementType = (global::DCL.ECSComponents.TextureMovementType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (start_ == null) { + Start = new global::Decentraland.Common.Vector2(); + } + input.ReadMessage(Start); + break; + } + case 18: { + if (end_ == null) { + End = new global::Decentraland.Common.Vector2(); + } + input.ReadMessage(End); + break; + } + case 24: { + MovementType = (global::DCL.ECSComponents.TextureMovementType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + #endregion } diff --git a/scripts/package-lock.json b/scripts/package-lock.json index e901aa811b..2323735e5e 100644 --- a/scripts/package-lock.json +++ b/scripts/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@dcl/protocol": "^1.0.0-11599848164.commit-ef74edc", + "@dcl/protocol": "^1.0.0-11954515774.commit-3fb0262", "@protobuf-ts/protoc": "^2.8.2", "@types/fs-extra": "^11.0.1", "@types/glob": "^8.0.1", @@ -36,9 +36,9 @@ } }, "node_modules/@dcl/protocol": { - "version": "1.0.0-11599848164.commit-ef74edc", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-11599848164.commit-ef74edc.tgz", - "integrity": "sha512-XSUOA0LbchlBUk5/BMJFBl0+qOm4UOIxwMGp38A1n4LQAatGO/RXjzReJRveqiFma+X7eq3e6+KCDqTLwepN0w==", + "version": "1.0.0-11954515774.commit-3fb0262", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-11954515774.commit-3fb0262.tgz", + "integrity": "sha512-6rawE0IsB+9WK+C2lLw/8BIeG8Yavj0N7pt9n21d7Fg3sEmp4iGCDNH8zLviOh+e1VcJk70uIy+Au9Xncmg2XA==", "dependencies": { "@dcl/ts-proto": "1.154.0" } @@ -569,9 +569,9 @@ } }, "@dcl/protocol": { - "version": "1.0.0-11599848164.commit-ef74edc", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-11599848164.commit-ef74edc.tgz", - "integrity": "sha512-XSUOA0LbchlBUk5/BMJFBl0+qOm4UOIxwMGp38A1n4LQAatGO/RXjzReJRveqiFma+X7eq3e6+KCDqTLwepN0w==", + "version": "1.0.0-11954515774.commit-3fb0262", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-11954515774.commit-3fb0262.tgz", + "integrity": "sha512-6rawE0IsB+9WK+C2lLw/8BIeG8Yavj0N7pt9n21d7Fg3sEmp4iGCDNH8zLviOh+e1VcJk70uIy+Au9Xncmg2XA==", "requires": { "@dcl/ts-proto": "1.154.0" } diff --git a/scripts/package.json b/scripts/package.json index d79077d409..e3a7da7379 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -16,7 +16,7 @@ "typescript": "^4.2.3" }, "dependencies": { - "@dcl/protocol": "^1.0.0-11599848164.commit-ef74edc", + "@dcl/protocol": "^1.0.0-11954515774.commit-3fb0262", "@protobuf-ts/protoc": "^2.8.2", "@types/fs-extra": "^11.0.1", "@types/glob": "^8.0.1",