更新gRPC proto定义

This commit is contained in:
SocialSisterYi
2023-07-11 22:36:38 +08:00
parent 47a157e08b
commit aa233779e1
4 changed files with 321 additions and 2 deletions

View File

@@ -1 +1,112 @@
// TODO
syntax = "proto3";
package bilibili.dagw.component.avatar.v1;
import "bilibili/dagw/component/avatar/common/common.proto";
import "bilibili/dagw/component/avatar/v1/plugin.proto";
//
message AvatarItem {
//
bilibili.dagw.component.avatar.common.SizeSpec container_size = 1;
//
repeated LayerGroup layers = 2;
//
LayerGroup fallback_layers = 3;
//
int64 mid = 4;
}
//
message BasicLayerResource {
//
int32 res_type = 1;
//
oneof payload {
//
ResImage res_image = 2;
//
ResAnimation res_animation = 3;
///
ResNativeDraw res_native_draw = 4;
};
}
//
message GeneralConfig {
//
map<string, string> web_css_style = 1;
}
//
message Layer {
//
string layer_id = 1;
//
bool visible = 2;
//
LayerGeneralSpec general_spec = 3;
//
LayerConfig layer_config = 4;
//
BasicLayerResource resource = 5;
}
//
message LayerConfig {
//
map<string, LayerTagConfig> tags = 1;
//
bool is_critical = 2;
//
bool allow_over_paint = 3;
//
MaskProperty layer_mask = 4;
}
//
message LayerGroup {
//
string group_id = 1;
//
repeated Layer layers = 2;
//
MaskProperty group_mask = 3;
//
bool is_critical_group = 4;
}
//
message LayerTagConfig {
//
int32 config_type = 1;
//
oneof config {
//
GeneralConfig general_config = 2;
//
bilibili.dagw.component.avatar.v1.plugin.GyroConfig gyro_config = 3;
//
bilibili.dagw.component.avatar.v1.plugin.CommentDoubleClickConfig comment_doubleClick_config = 4;
//
bilibili.dagw.component.avatar.v1.plugin.LiveAnimeConfig live_anime_config = 5;
};
}
//
message ResAnimation {
//
ResourceSource webp_src = 1;
}
//
message ResImage {
//
ResourceSource image_src = 1;
}
//
message ResNativeDraw {
//
ResourceSource draw_src = 1;
}

View File

@@ -0,0 +1,91 @@
syntax = "proto3";
package bilibili.dagw.component.avatar.v1.plugin;
//
message CommentDoubleClickConfig {
//
Interaction interaction = 1;
//
double animation_scale = 2;
}
//
message GyroConfig {
//
NFTImageV2 gyroscope = 1;
}
//
message GyroscopeContentV2 {
//
string file_url = 1;
//
float scale = 2;
//
repeated PhysicalOrientationV2 physical_orientation = 3;
}
//
message GyroscopeEntityV2 {
//
string display_type = 1;
//
repeated GyroscopeContentV2 contents = 2;
}
//
message Interaction {
//
string nft_id = 1;
//
bool enabled = 2;
//
string itype = 3;
//
string metadata_url = 4;
}
//
message LiveAnimeConfig {
//
bool is_live = 1;
}
//
message LiveAnimeItem {
//
ColorConfig color = 1;
//
double start_ratio = 2;
//
double end_ratio = 3;
//
double start_stroke = 4;
//
double start_opacity = 5;
//
int64 phase = 6;
}
//
message NFTImageV2 {
//
repeated GyroscopeEntityV2 gyroscope = 1;
}
//
message PhysicalOrientationAnimation {
//
string type = 1;
//
string bezier = 3;
}
//
message PhysicalOrientationV2 {
//
string type = 1;
//
repeated PhysicalOrientationAnimation animations = 3;
}