Skip to content

Commit

Permalink
finish bme struct
Browse files Browse the repository at this point in the history
  • Loading branch information
yyc12345 committed Jan 12, 2024
1 parent 8f27fec commit f123bda
Show file tree
Hide file tree
Showing 9 changed files with 1,591 additions and 0 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
174 changes: 174 additions & 0 deletions bbp_ng/raw_jsons/1x1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
[
{
"identifier": "raw_floor_1x1",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, True, True, True, True)"
},
{
"field": "is_sink",
"data": "False"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], face[1], face[4], False, face[3], False)",
"is_sink": "is_sink",
"is_inner": "False",
"is_ribbon": "False"
},
"transform": "move(5, 0, 0) @ rot(0, 0, -270)"
},
{
"identifier": "raw_floor_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], face[1], face[3], False, face[5], False)",
"is_sink": "is_sink",
"is_inner": "False",
"is_ribbon": "False"
},
"transform": "move(5, 5, 0) @ rot(0, 0, -180)"
},
{
"identifier": "raw_floor_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], face[1], face[5], False, face[2], False)",
"is_sink": "is_sink",
"is_inner": "False",
"is_ribbon": "False"
},
"transform": "move(0, 5, 0) @ rot(0, 0, -90)"
},
{
"identifier": "raw_floor_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], face[1], face[2], False, face[4], False)",
"is_sink": "is_sink",
"is_inner": "False",
"is_ribbon": "False"
},
"transform": "move(0, 0, 0)"
}
]
},
{
"identifier": "floor_normal_1x1",
"showcase": {
"title": "Normal 1x1",
"icon": "Normal1x1",
"type": "floor",
"cfgs": [
{
"field": "height_",
"type": "float",
"title": "Height",
"desc": "The height of block.",
"default": "5.0"
},
{
"field": "face_",
"type": "face",
"title": "Face",
"desc": "Whether has some faces.",
"default": "(True, False, True, True, True, True)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_1x1",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_sink_1x1",
"showcase": {
"title": "Sink 1x1",
"icon": "Sink1x1",
"type": "floor",
"cfgs": [
{
"field": "height_",
"type": "float",
"title": "Height",
"desc": "The height of block.",
"default": "5.0"
},
{
"field": "face_",
"type": "face",
"title": "Face",
"desc": "Whether has some faces.",
"default": "(True, False, True, True, True, True)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_1x1",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "True"
},
"transform": "ident()"
}
]
}
]
171 changes: 171 additions & 0 deletions bbp_ng/raw_jsons/flat.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
[
{
"identifier": "floor_flat",
"showcase": {
"title": "Flat",
"icon": "Flat",
"type": "floor",
"cfgs": [
{
"field": "height_",
"type": "float",
"title": "Height",
"desc": "The height of block.",
"default": "5.0"
},
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of block.",
"default": "2.5"
},
{
"field": "width_",
"type": "float",
"title": "Width",
"desc": "The width of block.",
"default": "2.5"
},
{
"field": "face_",
"type": "face",
"title": "Face",
"desc": "Whether has some faces.",
"default": "(True, False, False, False, False, False)"
},
{
"field": "is_sink_",
"type": "float",
"title": "Is Sink",
"desc": "Whether this flat floor is used for sink floor.",
"default": "False"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "length",
"data": "length_"
},
{
"field": "width",
"data": "width_"
},
{
"field": "face",
"data": "face_"
},
{
"field": "is_sink",
"data": "is_sink_"
}
],
"skip": "length == 0.0 or width == 0.0",
"vars": [
{
"field": "sink",
"data": "0.7 if is_sink else 0"
},
{
"field": "uv_length",
"data": "length / 5.0"
},
{
"field": "uv_width",
"data": "width / 5.0"
}
],
"vertices": [
{
"skip": "False",
"data": "(0, 0, -sink)"
},
{
"skip": "False",
"data": "(length, 0, -sink)"
},
{
"skip": "False",
"data": "(length, width, -sink)"
},
{
"skip": "False",
"data": "(0, width, -sink)"
}
],
"faces": [
{
"skip": "not face[0]",
"texture": "\"FloorTopBorderless\"",
"indices": [0, 1, 2, 3],
"uvs": [
"(0, 0)",
"(uv_length, 0)",
"(uv_length, uv_width)",
"(0, uv_width)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "length",
"is_left_sink": "is_sink",
"is_right_sink": "is_sink"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "width",
"is_left_sink": "is_sink",
"is_right_sink": "is_sink"
},
"transform": "move(0, width, 0) @ rot(0, 0, -90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "width",
"is_left_sink": "is_sink",
"is_right_sink": "is_sink"
},
"transform": "move(length, 0, 0) @ rot(0, 0, 90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[5]",
"params": {
"height": "height",
"length": "length",
"is_left_sink": "is_sink",
"is_right_sink": "is_sink"
},
"transform": "move(length, width, 0) @ rot(0, 0, 180)"
},
{
"identifier": "floor_bottom",
"skip": "not face[1]",
"params": {
"length": "length",
"width": "width"
},
"transform": "move(0, 0, -height)"
}
]
}
]
Loading

0 comments on commit f123bda

Please sign in to comment.