Files
BallanceBlenderHelper/assets/jsons/chris_vanilla.json5
yyc12345 1afa5f9893 fix: change the shape of BME floor terminal.
- change the shape of all BME floor terminal (normal, sink and wide) from 5x2.5 to 5x5 requested by Zzq and Lee623.
- change icons according to above changes.
- add some comment in prototype files.
2025-08-01 15:13:38 +08:00

427 lines
14 KiB
Plaintext

[
// One of Chris suggested more vanilla prototypes.
// This prototype represent a half of a normal, sink or double ribbon border,
// which looks like trapezoid from top to bottom.
//
// The bottom edge of trapezoid is from origin to +X with `long_edge_length` length.
// The length of top edge is `short_edge_length` and it just like moving bottom edge to +Y direction.
// The offset between top edge and bottom edge is always 2.5.
// The distance from the closest point of top edge, to Y axis is `short_edge_offset`.
{
"identifier": "cv_trapezoid_side",
"showcase": null,
"params": [
{
"field": "long_edge_length",
"data": "5.0"
},
{
"field": "short_edge_offset",
"data": "0.0"
},
{
"field": "short_edge_length",
"data": "5.0"
},
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, False, False, True, False)"
},
{
"field": "is_sink",
"data": "False"
},
{
"field": "is_ribbon",
"data": "False"
}
],
"skip": "long_edge_length == 0.0 or short_edge_length == 0.0",
"vars": [
{
"field": "long_edge_uv_length",
"data": "long_edge_length / 5.0"
},
{
"field": "short_edge_uv_offset",
"data": "short_edge_offset / 5.0"
},
{
"field": "short_edge_uv_length",
"data": "short_edge_length / 5.0"
},
{
"field": "short_edge_total",
"data": "short_edge_offset + short_edge_length"
},
{
"field": "short_edge_uv_total",
"data": "short_edge_uv_offset + short_edge_uv_length"
},
{
"field": "uv_border_texture",
"data": "1.0 if is_ribbon else 0.5"
},
{
"field": "sink",
"data": "0.7 if is_sink else 0.0"
}
],
"vertices": [
{
"skip": "not face[0]",
"data": "(0, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(short_edge_offset, 2.5, -sink)"
},
{
"skip": "not face[0]",
"data": "(long_edge_length, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(short_edge_total, 2.5, -sink)"
}
],
"faces": [
{
"skip": "not face[0]",
"texture": "(\"FloorTopFlat\" if is_ribbon else \"FloorTopProfil\") if is_sink else \"FloorTopBorder\"",
"indices": [0, 2, 3, 1],
"uvs": [
"(0, 0)",
"(0, long_edge_uv_length)",
"(uv_border_texture, short_edge_uv_total)",
"(uv_border_texture, short_edge_uv_offset)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "long_edge_length",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "distance(0, 0, short_edge_offset, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "rot(0, 0, angle(0, 0, short_edge_offset, 2.5)) @ scale(1, -1, 1)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "distance(long_edge_length, 0, short_edge_total, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "move(long_edge_length, 0, 0) @ rot(0, 0, angle(long_edge_length, 0, short_edge_total, 2.5))"
},
{
"identifier": "raw_floor_side",
"skip": "not face[5]",
"params": {
"height": "height",
"length": "short_edge_length",
"is_left_sink": "is_sink",
"is_right_sink": "is_sink"
},
"transform": "move(short_edge_offset, 2.5, 0) @ scale(1, -1, 1)"
},
{
"identifier": "floor_4edges_bottom",
"skip": "not face[1]",
"params": {
"top_left_pos": "(0, 0)",
"top_right_pos": "(short_edge_offset, 2.5)",
"bottom_left_pos": "(long_edge_length, 0)",
"bottom_right_pos": "(short_edge_total, 2.5)"
},
"transform": "move(0, 0, -height)"
}
]
},
// Same as previous one, but looks like triangle from top to bottom.
//
// The bottom edge is from origin to +X with `edge_length` length.
// The tip is going to +Y.
// The height of this triangle is always 2.5 and the offset between tip and Y axis is `tip_offset`.
{
"identifier": "cv_triangle_side",
"showcase": null,
"params": [
{
"field": "edge_length",
"data": "5.0"
},
{
"field": "tip_offset",
"data": "2.5"
},
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, False, False, True, None)"
},
{
"field": "is_sink",
"data": "False"
}
],
"skip": "edge_length == 0.0",
"vars": [
{
"field": "edge_uv_length",
"data": "edge_length / 5.0"
},
{
"field": "tip_uv_offset",
"data": "tip_offset / 5.0"
},
{
"field": "sink",
"data": "0.7 if is_sink else 0.0"
}
],
"vertices": [
{
"skip": "not face[0]",
"data": "(0, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(tip_offset, 2.5, -sink)"
},
{
"skip": "not face[0]",
"data": "(edge_length, 0, 0)"
}
],
"faces": [
{
"skip": "not face[0]",
"texture": "\"FloorTopProfil\" if is_sink else \"FloorTopBorder\"",
"indices": [0, 2, 1],
"uvs": [
"(0, 0)",
"(0, edge_uv_length)",
"(0.5, tip_uv_offset)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "edge_length",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "distance(0, 0, tip_offset, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "rot(0, 0, angle(0, 0, tip_offset, 2.5)) @ scale(1, -1, 1)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "distance(edge_length, 0, tip_offset, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "move(edge_length, 0, 0) @ rot(0, 0, angle(edge_length, 0, tip_offset, 2.5))"
},
{
"identifier": "floor_triangle_bottom",
"skip": "not face[1]",
"params": {
"length": "edge_length",
"width": "2.5",
"tip_offset": "tip_offset"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "cv_triangle_center",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, False, False, True, None)"
},
{
"field": "is_sink",
"data": "False"
}
],
"skip": "False",
"vars": [
{
"field": "sink",
"data": "0.7 if is_sink else 0.0"
}
],
"vertices": [
{
"skip": "not face[0]",
"data": "(0, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(5, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(2.5, 2.5, -sink)"
},
{
"skip": "(not face[0]) or (not is_sink)",
"data": "(2.5, 0, -sink)"
}
],
"faces": [
{
"skip": "(not face[0]) or is_sink",
"texture": "\"FloorTopFlat\"",
"indices": [0, 1, 2],
"uvs": [
"(0, 0)",
"(1, 0)",
"(0.5, 0.5)"
],
"normals": null
},
{
"skip": "(not face[0]) or (not is_sink)",
"texture": "\"FloorTopProfil\"",
"indices": [0, 3, 2],
"uvs": [
"(0, 0)",
"(0.5, 0)",
"(0.5, 0.5)"
],
"normals": null
},
{
"skip": "(not face[0]) or (not is_sink)",
"texture": "\"FloorTopProfil\"",
"indices": [3, 1, 2],
"uvs": [
"(0.5, 0)",
"(1, 0)",
"(0.5, 0.5)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "distance(0, 0, 2.5, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "rot(0, 0, 45)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "distance(5, 0, 2.5, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "move(5, 0, 0) @ rot(0, 0, 135)"
},
{
"identifier": "raw_floor_side",
"skip": "(not face[4]) or (not is_sink)",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "False",
"is_right_sink": "True"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "(not face[4]) or (not is_sink)",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "True",
"is_right_sink": "False"
},
"transform": "move(2.5, 0, 0)"
},
{
"identifier": "raw_floor_side",
"skip": "(not face[4]) or is_sink",
"params": {
"height": "height",
"length": "5",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "ident()"
},
{
"identifier": "floor_triangle_bottom",
"skip": "not face[1]",
"params": {
"length": "5",
"width": "2.5",
"tip_offset": "2.5"
},
"transform": "move(0, 0, -height)"
}
]
}
]