Skip to content

Commit

Permalink
fix font
Browse files Browse the repository at this point in the history
  • Loading branch information
AGulev committed Feb 27, 2024
1 parent df7dbdb commit d272fc9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 20 deletions.
9 changes: 7 additions & 2 deletions examples/balls/ball.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
embedded_components {
id: "sprite"
type: "sprite"
data: "tile_set: \"/examples/balls/assets/game.atlas\"\n"
"default_animation: \"ball\"\n"
data: "default_animation: \"ball\"\n"
"material: \"/builtins/materials/sprite.material\"\n"
"blend_mode: BLEND_MODE_ALPHA\n"
"textures {\n"
" sampler: \"texture_sampler\"\n"
" texture: \"/examples/balls/assets/game.atlas\"\n"
"}\n"
""
position {
x: 0.0
Expand Down Expand Up @@ -47,12 +50,14 @@ embedded_components {
" }\n"
" index: 0\n"
" count: 1\n"
" id: \"\"\n"
" }\n"
" data: 32.0\n"
"}\n"
"linear_damping: 0.0\n"
"angular_damping: 0.0\n"
"locked_rotation: false\n"
"bullet: false\n"
""
position {
x: 0.0
Expand Down
28 changes: 12 additions & 16 deletions examples/balls/balls.collection
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,15 @@ embedded_instances {
" z: 0.0\n"
" w: 1.0\n"
" }\n"
" property_decls {\n"
" }\n"
"}\n"
"embedded_components {\n"
" id: \"ballfactory\"\n"
" type: \"factory\"\n"
" data: \"prototype: \\\"/examples/balls/ball.go\\\"\\n"
"load_dynamically: false\\n"
"dynamic_prototype: false\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
Expand Down Expand Up @@ -461,6 +464,7 @@ embedded_instances {
" }\\n"
" index: 0\\n"
" count: 3\\n"
" id: \\\"\\\"\\n"
" }\\n"
" data: 370.0\\n"
" data: 25.0\\n"
Expand All @@ -469,6 +473,7 @@ embedded_instances {
"linear_damping: 0.0\\n"
"angular_damping: 0.0\\n"
"locked_rotation: false\\n"
"bullet: false\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
Expand All @@ -491,12 +496,6 @@ embedded_instances {
" z: 0.0\\n"
" w: 0.0\\n"
"}\\n"
"scale {\\n"
" x: 1.0\\n"
" y: 1.0\\n"
" z: 1.0\\n"
" w: 0.0\\n"
"}\\n"
"color {\\n"
" x: 1.0\\n"
" y: 1.0\\n"
Expand All @@ -521,8 +520,8 @@ embedded_instances {
"blend_mode: BLEND_MODE_ALPHA\\n"
"line_break: false\\n"
"text: \\\"\\\"\\n"
"font: \\\"/builtins/fonts/system_font.font\\\"\\n"
"material: \\\"/builtins/fonts/label.material\\\"\\n"
"font: \\\"/examples/balls/default.font\\\"\\n"
"material: \\\"/builtins/fonts/label-df.material\\\"\\n"
"\"\n"
" position {\n"
" x: 320.0\n"
Expand All @@ -545,12 +544,6 @@ embedded_instances {
" z: 0.0\\n"
" w: 0.0\\n"
"}\\n"
"scale {\\n"
" x: 1.0\\n"
" y: 1.0\\n"
" z: 1.0\\n"
" w: 0.0\\n"
"}\\n"
"color {\\n"
" x: 1.0\\n"
" y: 1.0\\n"
Expand All @@ -575,8 +568,8 @@ embedded_instances {
"blend_mode: BLEND_MODE_ALPHA\\n"
"line_break: false\\n"
"text: \\\"\\\"\\n"
"font: \\\"/builtins/fonts/system_font.font\\\"\\n"
"material: \\\"/builtins/fonts/label.material\\\"\\n"
"font: \\\"/examples/balls/default.font\\\"\\n"
"material: \\\"/builtins/fonts/label-df.material\\\"\\n"
"\"\n"
" position {\n"
" x: 609.0\n"
Expand Down Expand Up @@ -677,6 +670,7 @@ embedded_instances {
" }\\n"
" index: 0\\n"
" count: 3\\n"
" id: \\\"\\\"\\n"
" }\\n"
" shapes {\\n"
" shape_type: TYPE_BOX\\n"
Expand All @@ -693,6 +687,7 @@ embedded_instances {
" }\\n"
" index: 3\\n"
" count: 3\\n"
" id: \\\"\\\"\\n"
" }\\n"
" data: 25.0\\n"
" data: 700.0\\n"
Expand All @@ -704,6 +699,7 @@ embedded_instances {
"linear_damping: 0.0\\n"
"angular_damping: 0.0\\n"
"locked_rotation: false\\n"
"bullet: false\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
Expand Down
8 changes: 8 additions & 0 deletions examples/balls/default.font
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
font: "/builtins/fonts/vera_mo_bd.ttf"
material: "/builtins/fonts/font-df.material"
size: 14
antialias: 1
alpha: 1.0
shadow_alpha: 0.0
shadow_blur: 0
output_format: TYPE_DISTANCE_FIELD
9 changes: 7 additions & 2 deletions examples/balls/pin.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
embedded_components {
id: "sprite"
type: "sprite"
data: "tile_set: \"/examples/balls/assets/game.atlas\"\n"
"default_animation: \"pin\"\n"
data: "default_animation: \"pin\"\n"
"material: \"/builtins/materials/sprite.material\"\n"
"blend_mode: BLEND_MODE_ALPHA\n"
"textures {\n"
" sampler: \"texture_sampler\"\n"
" texture: \"/examples/balls/assets/game.atlas\"\n"
"}\n"
""
position {
x: 0.0
Expand Down Expand Up @@ -44,12 +47,14 @@ embedded_components {
" }\n"
" index: 0\n"
" count: 1\n"
" id: \"\"\n"
" }\n"
" data: 24.0\n"
"}\n"
"linear_damping: 0.0\n"
"angular_damping: 0.0\n"
"locked_rotation: false\n"
"bullet: false\n"
""
position {
x: 0.0
Expand Down

0 comments on commit d272fc9

Please sign in to comment.