2020-05-24 15:46:26 +02:00
|
|
|
-- Meshes
|
|
|
|
|
2024-10-28 15:57:54 +01:00
|
|
|
local S = core.get_translator("testnodes")
|
2020-05-24 15:46:26 +02:00
|
|
|
|
|
|
|
local ocorner_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
|
|
|
{-0.5, -0.25, -0.25, 0.25, 0, 0.5},
|
|
|
|
{-0.5, 0, 0, 0, 0.25, 0.5},
|
|
|
|
{-0.5, 0.25, 0.25, -0.25, 0.5, 0.5}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
local tall_pyr_cbox = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{ -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 },
|
|
|
|
{ -0.375, -0.25, -0.375, 0.375, 0, 0.375},
|
|
|
|
{ -0.25, 0, -0.25, 0.25, 0.25, 0.25},
|
|
|
|
{ -0.125, 0.25, -0.125, 0.125, 0.5, 0.125}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Normal mesh
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh", {
|
2020-05-24 15:46:26 +02:00
|
|
|
description = S("Mesh Test Node"),
|
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_pyramid.obj",
|
|
|
|
tiles = {"testnodes_mesh_stripes2.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
collision_box = tall_pyr_cbox,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Facedir mesh: outer corner slope
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_facedir", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Facedir Mesh Test Node").."\n"..
|
|
|
|
S("param2 = facedir rotation (0..23)"),
|
2020-05-24 15:46:26 +02:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_ocorner.obj",
|
|
|
|
tiles = {"testnodes_mesh_stripes.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
collision_box = ocorner_cbox,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
|
|
|
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_colorfacedir", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Color Facedir Mesh Test Node").."\n"..
|
|
|
|
S("param2 = color + facedir rotation (0..23, 32..55, ...)"),
|
2020-05-24 15:46:26 +02:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_ocorner.obj",
|
|
|
|
tiles = {"testnodes_mesh_stripes3.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "colorfacedir",
|
|
|
|
palette = "testnodes_palette_facedir.png",
|
|
|
|
collision_box = ocorner_cbox,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
|
|
|
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_4dir", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("4dir Mesh Test Node").."\n"..
|
|
|
|
S("param2 = 4dir rotation (0..3)"),
|
2022-09-16 13:18:55 +02:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_ocorner.obj",
|
2022-10-09 16:19:42 +02:00
|
|
|
tiles = {"testnodes_mesh_stripes5.png"},
|
2022-09-16 13:18:55 +02:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "4dir",
|
|
|
|
collision_box = ocorner_cbox,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
|
|
|
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_color4dir", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Color 4dir Mesh Test Node").."\n"..
|
|
|
|
S("param2 = color + 4dir rotation (0..255)"),
|
2022-09-16 13:18:55 +02:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_ocorner.obj",
|
2022-10-09 16:19:42 +02:00
|
|
|
tiles = {"testnodes_mesh_stripes6.png"},
|
2022-09-16 13:18:55 +02:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "color4dir",
|
|
|
|
palette = "testnodes_palette_4dir.png",
|
|
|
|
collision_box = ocorner_cbox,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
|
|
|
|
2020-05-24 15:46:26 +02:00
|
|
|
-- Wallmounted mesh: pyramid
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_wallmounted", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Wallmounted Mesh Test Node").."\n"..
|
2024-01-17 17:47:06 +01:00
|
|
|
S("param2 = wallmounted rotation (0..7)"),
|
2020-05-24 15:46:26 +02:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_pyramid.obj",
|
2022-10-09 16:19:42 +02:00
|
|
|
tiles = {"testnodes_mesh_stripes9.png"},
|
2020-05-24 15:46:26 +02:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
collision_box = tall_pyr_cbox,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
|
|
|
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_colorwallmounted", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Color Wallmounted Mesh Test Node").."\n"..
|
2024-01-17 17:47:06 +01:00
|
|
|
S("param2 = color + wallmounted rotation (0..7, 8..15, ...)"),
|
2020-05-24 15:46:26 +02:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_pyramid.obj",
|
2022-10-09 16:19:42 +02:00
|
|
|
tiles = {"testnodes_mesh_stripes10.png"},
|
2020-05-24 15:46:26 +02:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "colorwallmounted",
|
|
|
|
palette = "testnodes_palette_wallmounted.png",
|
|
|
|
collision_box = tall_pyr_cbox,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
|
|
|
|
|
|
|
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_double", {
|
2020-05-24 15:46:26 +02:00
|
|
|
description = S("Double-sized Mesh Test Node"),
|
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_pyramid.obj",
|
|
|
|
tiles = {"testnodes_mesh_stripes2.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
collision_box = tall_pyr_cbox,
|
|
|
|
visual_scale = 2,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_half", {
|
2020-05-24 15:46:26 +02:00
|
|
|
description = S("Half-sized Mesh Test Node"),
|
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_pyramid.obj",
|
|
|
|
tiles = {"testnodes_mesh_stripes2.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
collision_box = tall_pyr_cbox,
|
|
|
|
visual_scale = 0.5,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
|
|
|
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_waving1", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Plantlike-waving Mesh Test Node").."\n"..
|
|
|
|
S("Waves if waving plants are enabled by client"),
|
2020-05-24 15:46:26 +02:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_pyramid.obj",
|
|
|
|
tiles = {"testnodes_mesh_stripes4.png^[multiply:#B0FFB0"},
|
|
|
|
paramtype = "light",
|
|
|
|
collision_box = tall_pyr_cbox,
|
|
|
|
waving = 1,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_waving2", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Leaflike-waving Mesh Test Node").."\n"..
|
|
|
|
S("Waves if waving leaves are enabled by client"),
|
2020-05-24 15:46:26 +02:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_pyramid.obj",
|
|
|
|
tiles = {"testnodes_mesh_stripes4.png^[multiply:#FFFFB0"},
|
|
|
|
paramtype = "light",
|
|
|
|
collision_box = tall_pyr_cbox,
|
|
|
|
waving = 2,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node("testnodes:mesh_waving3", {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = S("Liquidlike-waving Mesh Test Node").."\n"..
|
|
|
|
S("Waves if waving liquids are enabled by client"),
|
2020-05-24 15:46:26 +02:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "testnodes_pyramid.obj",
|
|
|
|
tiles = {"testnodes_mesh_stripes4.png^[multiply:#B0B0FF"},
|
|
|
|
paramtype = "light",
|
|
|
|
collision_box = tall_pyr_cbox,
|
|
|
|
waving = 3,
|
|
|
|
|
|
|
|
groups = {dig_immediate=3},
|
|
|
|
})
|