Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayuris1 authored Feb 2, 2022
0 parents commit 55a7f46
Show file tree
Hide file tree
Showing 18 changed files with 837 additions and 0 deletions.
284 changes: 284 additions & 0 deletions bezier/adjustable_bezier.collection
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
name: "default"
scale_along_z: 0
embedded_instances {
id: "bezier"
children: "control_A"
children: "control_B"
children: "point_A"
children: "point_B"
data: "components {\n"
" id: \"script\"\n"
" component: \"/bezier/bezier.script\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
"embedded_components {\n"
" id: \"model\"\n"
" type: \"model\"\n"
" data: \"mesh: \\\"/bezier/assets/models/strip_64X01Y.dae\\\"\\n"
"material: \\\"/bezier/assets/materials/bezier.material\\\"\\n"
"textures: \\\"/bezier/assets/images/bezier_line.png\\\"\\n"
"skeleton: \\\"\\\"\\n"
"animations: \\\"\\\"\\n"
"default_animation: \\\"\\\"\\n"
"name: \\\"unnamed\\\"\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
""
position {
x: 0.0
y: 0.0
z: 0.0
}
rotation {
x: 0.0
y: 0.0
z: 0.0
w: 1.0
}
scale3 {
x: 1.0
y: 1.0
z: 1.0
}
}
embedded_instances {
id: "control_A"
data: "components {\n"
" id: \"movable_controller\"\n"
" component: \"/bezier/movable_controller.script\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
"embedded_components {\n"
" id: \"sprite\"\n"
" type: \"sprite\"\n"
" data: \"tile_set: \\\"/bezier/assets/bezier.atlas\\\"\\n"
"default_animation: \\\"red_square\\\"\\n"
"material: \\\"/builtins/materials/sprite.material\\\"\\n"
"blend_mode: BLEND_MODE_ALPHA\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
""
position {
x: -75.0
y: -165.0
z: 0.0
}
rotation {
x: 0.0
y: 0.0
z: 0.0
w: 1.0
}
scale3 {
x: 1.0
y: 1.0
z: 1.0
}
}
embedded_instances {
id: "control_B"
data: "components {\n"
" id: \"movable_controller\"\n"
" component: \"/bezier/movable_controller.script\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
"embedded_components {\n"
" id: \"sprite\"\n"
" type: \"sprite\"\n"
" data: \"tile_set: \\\"/bezier/assets/bezier.atlas\\\"\\n"
"default_animation: \\\"blue_square\\\"\\n"
"material: \\\"/builtins/materials/sprite.material\\\"\\n"
"blend_mode: BLEND_MODE_ALPHA\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
""
position {
x: 75.0
y: 165.0
z: 0.0
}
rotation {
x: 0.0
y: 0.0
z: 0.0
w: 1.0
}
scale3 {
x: 1.0
y: 1.0
z: 1.0
}
}
embedded_instances {
id: "point_A"
data: "components {\n"
" id: \"movable_controller\"\n"
" component: \"/bezier/movable_controller.script\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
"embedded_components {\n"
" id: \"sprite\"\n"
" type: \"sprite\"\n"
" data: \"tile_set: \\\"/bezier/assets/bezier.atlas\\\"\\n"
"default_animation: \\\"red_circle\\\"\\n"
"material: \\\"/builtins/materials/sprite.material\\\"\\n"
"blend_mode: BLEND_MODE_ALPHA\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
""
position {
x: -270.0
y: -70.0
z: 0.0
}
rotation {
x: 0.0
y: 0.0
z: 0.0
w: 1.0
}
scale3 {
x: 1.0
y: 1.0
z: 1.0
}
}
embedded_instances {
id: "point_B"
data: "components {\n"
" id: \"movable_controller\"\n"
" component: \"/bezier/movable_controller.script\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
"embedded_components {\n"
" id: \"sprite\"\n"
" type: \"sprite\"\n"
" data: \"tile_set: \\\"/bezier/assets/bezier.atlas\\\"\\n"
"default_animation: \\\"blue_circle\\\"\\n"
"material: \\\"/builtins/materials/sprite.material\\\"\\n"
"blend_mode: BLEND_MODE_ALPHA\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
""
position {
x: 270.0
y: 70.0
z: 0.0
}
rotation {
x: 0.0
y: 0.0
z: 0.0
w: 1.0
}
scale3 {
x: 1.0
y: 1.0
z: 1.0
}
}
23 changes: 23 additions & 0 deletions bezier/assets/bezier.atlas
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
images {
image: "/builtins/graphics/particle_blob.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/bezier/assets/images/blue_circle.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/bezier/assets/images/blue_square.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/bezier/assets/images/red_circle.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/bezier/assets/images/red_square.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
margin: 0
extrude_borders: 2
inner_padding: 0
Binary file added bezier/assets/images/bezier_line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bezier/assets/images/blue_circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bezier/assets/images/blue_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bezier/assets/images/red_circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bezier/assets/images/red_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions bezier/assets/materials/bezier.fp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
varying mediump vec2 var_texcoord0;

uniform lowp sampler2D tex0;
uniform lowp vec4 tint;

void main()
{
// Pre-multiply alpha since all runtime textures already are
lowp vec4 tint_pm = vec4(tint.xyz * tint.w, tint.w);
gl_FragColor = texture2D(tex0, var_texcoord0.xy) * tint_pm;
}
62 changes: 62 additions & 0 deletions bezier/assets/materials/bezier.material
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "model"
tags: "tile"
vertex_program: "/bezier/assets/materials/bezier.vp"
fragment_program: "/bezier/assets/materials/bezier.fp"
vertex_space: VERTEX_SPACE_LOCAL
vertex_constants {
name: "mtx_viewproj"
type: CONSTANT_TYPE_VIEWPROJ
value {
x: 0.0
y: 0.0
z: 0.0
w: 0.0
}
}
vertex_constants {
name: "size"
type: CONSTANT_TYPE_USER
value {
x: 10.0
y: 0.0
z: 0.0
w: 0.0
}
}
vertex_constants {
name: "a"
type: CONSTANT_TYPE_USER
value {
x: 0.0
y: 0.0
z: 300.0
w: 100.0
}
}
vertex_constants {
name: "b"
type: CONSTANT_TYPE_USER
value {
x: 100.0
y: 0.0
z: 0.0
w: 100.0
}
}
fragment_constants {
name: "tint"
type: CONSTANT_TYPE_USER
value {
x: 1.0
y: 1.0
z: 1.0
w: 1.0
}
}
samplers {
name: "tex0"
wrap_u: WRAP_MODE_CLAMP_TO_EDGE
wrap_v: WRAP_MODE_CLAMP_TO_EDGE
filter_min: FILTER_MODE_MIN_LINEAR
filter_mag: FILTER_MODE_MAG_LINEAR
}
Loading

0 comments on commit 55a7f46

Please sign in to comment.