forked from SocialSisterYi/bilibili-API-collect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47a157e
commit aa23377
Showing
4 changed files
with
321 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 108 additions & 1 deletion
109
grpc_api/bilibili/dagw/component/avatar/common/common.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,108 @@ | ||
// TODO | ||
syntax = "proto3"; | ||
|
||
package bilibili.dagw.component.avatar.common; | ||
|
||
// | ||
message BasicRenderSpec { | ||
// | ||
double opacity = 1; | ||
} | ||
|
||
// | ||
message ColorConfig { | ||
// | ||
bool is_dark_mode_aware = 1; | ||
// | ||
ColorSpec day = 2; | ||
// | ||
ColorSpec night = 3; | ||
} | ||
|
||
// | ||
message ColorSpec { | ||
// | ||
string argb = 1; | ||
} | ||
|
||
// | ||
message LayerGeneralSpec { | ||
// | ||
PositionSpec pos_spec = 1; | ||
// | ||
SizeSpec size_spec = 2; | ||
// | ||
BasicRenderSpec render_spec = 3; | ||
} | ||
|
||
// | ||
message MaskProperty { | ||
// | ||
LayerGeneralSpec general_spec = 1; | ||
// | ||
ResourceSource mask_src = 2; | ||
} | ||
|
||
// | ||
message NativeDrawRes { | ||
// | ||
int32 draw_type = 1; | ||
// | ||
int32 fill_mode = 2; | ||
// | ||
ColorConfig color_config = 3; | ||
// | ||
double edge_weight = 4; | ||
} | ||
|
||
// | ||
message PositionSpec { | ||
// | ||
int32 coordinate_pos = 1; | ||
// | ||
double axis_x = 2; | ||
// | ||
double axis_y = 3; | ||
} | ||
|
||
// | ||
message RemoteRes { | ||
// | ||
string url = 1; | ||
// | ||
string bfs_style = 2; | ||
} | ||
|
||
// | ||
message ResourceSource { | ||
// | ||
enum LocalRes { | ||
LOCAL_RES_INVALID = 0; | ||
LOCAL_RES_ICON_VIP = 1; | ||
LOCAL_RES_ICON_SMALL_VIP = 2; | ||
LOCAL_RES_ICON_PERSONAL_VERIFY = 3; | ||
LOCAL_RES_ICON_ENTERPRISE_VERIFY = 4; | ||
LOCAL_RES_ICON_NFT_MAINLAND = 5; | ||
LOCAL_RES_DEFAULT_AVATAR = 6; | ||
} | ||
// | ||
int32 src_type = 1; | ||
// | ||
int32 placeholder = 2; | ||
// | ||
oneof res { | ||
// | ||
RemoteRes remote = 3; | ||
// | ||
LocalRes local = 4; | ||
// | ||
NativeDrawRes draw = 5; | ||
} | ||
} | ||
|
||
// | ||
message SizeSpec { | ||
// | ||
double width = 1; | ||
// | ||
double height = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |