Skip to content

Commit

Permalink
in-world UI (#212)
Browse files Browse the repository at this point in the history
* inworld ui

* add import

* change name

* update ui canvas component id

---------

Co-authored-by: robtfm <[email protected]>
  • Loading branch information
leanmendoza and robtfm authored Sep 18, 2024
1 parent acd1db5 commit 0207676
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
9 changes: 8 additions & 1 deletion proto/decentraland/common/texture.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@ message VideoTexture {
optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
}

message UiCanvasTexture {
uint32 ui_canvas_entity = 1;
optional TextureWrapMode wrap_mode = 2; // default = TextureWrapMode.Clamp
optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
}

message TextureUnion {
oneof tex {
Texture texture = 1; // default = null
AvatarTexture avatar_texture = 2; // default = null
VideoTexture video_texture = 3; // default = null
UiCanvasTexture ui_texture = 4;
}
}
}
16 changes: 16 additions & 0 deletions proto/decentraland/sdk/components/ui_canvas.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

import "decentraland/sdk/components/common/id.proto";
package decentraland.sdk.components;

option (common.ecs_component_id) = 1203;

import "decentraland/common/colors.proto";

// The UiCanvas component can be attached to a ui root entity to specify properties of the ui texture.
message PBUiCanvas {
uint32 width = 1;
uint32 height = 2;

optional decentraland.common.Color4 color = 3; // default = (0.0, 0.0, 0.0, 0.0) / transparent
}

0 comments on commit 0207676

Please sign in to comment.