diff --git a/README.md b/README.md index 21123ff..483b781 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,17 @@ simple_models_stair_1x1x1: +simple_models_slope_1x1x1: + - for slope-like nodes with dimensions 1x1x1 + + - preview: + + + + - texture map: + + + #### Tables `smodel` is an alias of `simple_models`. @@ -90,6 +101,23 @@ simple_models.stair_1x1x1: - mesh: "simple_models_stair_1x1x1.obj" - box: {{-0.5, -0.5, -0.5, 0.5, 0.0, 0.5}, {-0.5, 0.0, 0.0, 0.5, 0.5, 0.5}} - alias: simple_models.stair + +simple_models.slope_1x1x1: +- fields: + - mesh: "simple_models_slope_1x1x1.obj" + - box: { + {-0.5, -0.5, 0.4, 0.5, 0.5, 0.5}, + {-0.5, -0.5, 0.3, 0.5, 0.4, 0.5}, + {-0.5, -0.5, 0.2, 0.5, 0.3, 0.5}, + {-0.5, -0.5, 0.1, 0.5, 0.2, 0.5}, + {-0.5, -0.5, 0.0, 0.5, 0.1, 0.5}, + {-0.5, -0.5, -0.1, 0.5, 0.0, 0.5}, + {-0.5, -0.5, -0.2, 0.5, -0.1, 0.5}, + {-0.5, -0.5, -0.3, 0.5, -0.2, 0.5}, + {-0.5, -0.5, -0.4, 0.5, -0.3, 0.5}, + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + } +- alias: simple_models.slope ``` #### Helper Methods diff --git a/init.lua b/init.lua index 2d6e43b..7a3a1c4 100644 --- a/init.lua +++ b/init.lua @@ -73,6 +73,29 @@ simple_models = { {-0.5, 0.0, 0.0, 0.5, 0.5, 0.5}, }, }, + + --- Slope + -- + -- Alias: simple_models.slope + -- + -- @table simple_models.slope_1x1x1 + -- @tfield string mesh simple_models_slope_1x1x1.obj + -- @tfield table box + slope_1x1x1 = { + mesh = "simple_models_slope_1x1x1.obj", + box = { + {-0.5, -0.5, 0.4, 0.5, 0.5, 0.5}, + {-0.5, -0.5, 0.3, 0.5, 0.4, 0.5}, + {-0.5, -0.5, 0.2, 0.5, 0.3, 0.5}, + {-0.5, -0.5, 0.1, 0.5, 0.2, 0.5}, + {-0.5, -0.5, 0.0, 0.5, 0.1, 0.5}, + {-0.5, -0.5, -0.1, 0.5, 0.0, 0.5}, + {-0.5, -0.5, -0.2, 0.5, -0.1, 0.5}, + {-0.5, -0.5, -0.3, 0.5, -0.2, 0.5}, + {-0.5, -0.5, -0.4, 0.5, -0.3, 0.5}, + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + }, + }, } simple_models.cube = simple_models.cube_1x2x1 @@ -80,6 +103,7 @@ simple_models.panel = simple_models.panel_1x2x1 simple_models.panel_mid = simple_models.panel_mid_1x2x1 simple_models.panel_rear = simple_models.panel_rear_1x2x1 simple_models.stair = simple_models.stair_1x1x1 +simple_models.slope = simple_models.slope_1x1x1 --- Global table. -- diff --git a/models/simple_models_slope_1x1x1.blend b/models/simple_models_slope_1x1x1.blend new file mode 100644 index 0000000..e709f65 Binary files /dev/null and b/models/simple_models_slope_1x1x1.blend differ diff --git a/models/simple_models_slope_1x1x1.obj b/models/simple_models_slope_1x1x1.obj new file mode 100644 index 0000000..bb6589b --- /dev/null +++ b/models/simple_models_slope_1x1x1.obj @@ -0,0 +1,40 @@ +# Blender v2.93.2 OBJ File: 'simple_models_slope_1x1x1.blend' +# www.blender.org +mtllib simple_models_slope_1x1x1.mtl +o Cube +v 0.500000 -0.500000 -0.500000 +v 0.500000 0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 -0.500000 +v -0.500000 0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +vt 0.333333 -0.000000 +vt 0.333333 0.500000 +vt 0.000000 0.500000 +vt -0.000000 0.000000 +vt 1.000000 0.500000 +vt 0.666667 0.500000 +vt 0.666667 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.500000 +vt 1.000000 1.000000 +vt 0.666667 0.500000 +vt 0.000000 0.500000 +vt 0.333333 0.500000 +vt 0.000000 1.000000 +vt 0.666667 -0.000000 +vt 0.666667 1.000000 +vt 0.333333 1.000000 +vt 0.333333 0.000000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.7071 -0.7071 +usemtl Material +s off +f 3/1/1 2/2/1 5/3/1 6/4/1 +f 4/5/2 1/6/2 3/7/2 6/8/2 +f 6/9/3 5/10/3 4/11/3 +f 3/12/4 1/13/4 2/14/4 +f 4/15/5 5/16/5 2/17/5 1/18/5 diff --git a/previews/slope_1x1x1_model.png b/previews/slope_1x1x1_model.png new file mode 100644 index 0000000..c8cb66b Binary files /dev/null and b/previews/slope_1x1x1_model.png differ