use mesh nodes for candles

This commit is contained in:
Vanessa Ezekowitz 2015-04-14 11:58:05 -04:00
parent 71c9d2218b
commit 8e1dd5f268
8 changed files with 324 additions and 26 deletions

View File

@ -147,46 +147,44 @@ homedecor.register("plasma_lamp", {
end end
}) })
local tc_cbox = {
type = "fixed",
fixed = {
{ -0.1875, -0.5, -0.1875, 0.1875, 0.375, 0.1875 },
}
}
homedecor.register("candle", { homedecor.register("candle", {
description = S("Thick Candle"), description = S("Thick Candle"),
mesh = "homedecor_candle_thick.obj",
tiles = { tiles = {
'homedecor_candle_top.png', 'homedecor_candle_sides.png',
'homedecor_candle_top.png', {name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
{name="homedecor_candle_sides.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
},
node_box = {
type = "fixed",
fixed = {
{ -0.125, -0.5, -0.125, 0.125, 0, 0.125 },
{ -0.125, 0, 0, 0.125, 0.5, 0 },
{ 0, 0, -0.125, 0, 0.5, 0.125 }
}
},
selection_box = {
type = "fixed",
fixed = {
{ -0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875 },
}
}, },
selection_box = tc_cbox,
collision_box = tc_cbox,
sunlight_propagates = true, sunlight_propagates = true,
groups = { snappy = 3 }, groups = { snappy = 3 },
light_source = LIGHT_MAX-4, light_source = LIGHT_MAX-4,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
}) })
homedecor.register("candle_thin", { local c_cbox = {
description = S("Little Candle"),
inventory_image = 'homedecor_candle_inv.png',
drawtype = "plantlike",
tiles = {
{name="homedecor_candle.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.0}},
},
selection_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
{ -0.1, -0.5, -0.1, 0.125, 0.05, 0.125 }, { -0.1, -0.5, -0.1, 0.125, 0.05, 0.125 },
} }
}
homedecor.register("candle_thin", {
description = S("Little Candle"),
mesh = "homedecor_candle_thin.obj",
tiles = {
'homedecor_candle_sides.png',
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
}, },
selection_box = c_cbox,
collision_box = c_cbox,
sunlight_propagates = true, sunlight_propagates = true,
walkable = false, walkable = false,
groups = { snappy = 3 }, groups = { snappy = 3 },

View File

@ -0,0 +1,150 @@
# Blender v2.73 (sub 0) OBJ File: 'candle-large.blend'
# www.blender.org
o Cylinder
v 0.088388 0.375000 0.088388
v 0.088388 -0.000000 0.088388
v 0.000000 -0.500000 -0.125000
v 0.000000 0.000000 -0.125000
v 0.047835 -0.500000 -0.115485
v 0.047835 0.000000 -0.115485
v 0.088388 -0.500000 -0.088388
v 0.088388 0.000000 -0.088388
v 0.115485 -0.500000 -0.047835
v 0.115485 0.000000 -0.047835
v 0.125000 -0.500000 0.000000
v 0.125000 0.000000 0.000000
v 0.115485 -0.500000 0.047835
v 0.115485 0.000000 0.047835
v 0.088388 -0.500000 0.088388
v 0.088388 0.000000 0.088388
v 0.047835 -0.500000 0.115485
v 0.047835 0.000000 0.115485
v 0.000000 -0.500000 0.125000
v 0.000000 0.000000 0.125000
v -0.047835 -0.500000 0.115485
v -0.047835 0.000000 0.115485
v -0.088388 -0.500000 0.088388
v -0.088388 0.000000 0.088388
v -0.115485 -0.500000 0.047835
v -0.115485 0.000000 0.047835
v -0.125000 -0.500000 -0.000000
v -0.125000 0.000000 -0.000000
v -0.115485 -0.500000 -0.047835
v -0.115485 0.000000 -0.047835
v -0.088388 -0.500000 -0.088388
v -0.088388 0.000000 -0.088388
v -0.047835 -0.500000 -0.115485
v -0.047835 0.000000 -0.115485
v -0.088388 0.000000 -0.088388
v -0.088388 0.375000 -0.088388
v 0.088388 0.375000 -0.088388
v 0.088388 -0.000000 -0.088388
v -0.088388 0.000000 0.088388
v -0.088388 0.375000 0.088388
v 0.088388 0.375000 0.088388
v 0.088388 -0.000000 0.088388
v -0.088388 0.000000 -0.088388
v -0.088388 0.375000 -0.088388
v 0.088388 0.375000 -0.088388
v 0.088388 -0.000000 -0.088388
v -0.088388 0.000000 0.088388
v -0.088388 0.375000 0.088388
vt 0.500000 -0.000000
vt 0.500000 0.500000
vt 0.437500 0.500000
vt 0.437500 -0.000000
vt 0.375000 0.500000
vt 0.375000 -0.000000
vt 0.312500 0.500000
vt 0.312500 -0.000000
vt 0.250000 0.500000
vt 0.250000 -0.000000
vt 0.187500 0.500000
vt 0.187500 -0.000000
vt 0.125000 0.500000
vt 0.125000 -0.000000
vt 0.062500 0.500000
vt 0.062500 -0.000000
vt -0.000000 0.500000
vt -0.000000 -0.000000
vt 1.000000 -0.000000
vt 1.000000 0.500000
vt 0.937500 0.500000
vt 0.937500 -0.000000
vt 0.875000 0.500000
vt 0.875000 -0.000000
vt 0.812500 0.500000
vt 0.812500 -0.000000
vt 0.750000 0.500000
vt 0.750000 -0.000000
vt 0.687500 0.500000
vt 0.687500 -0.000000
vt 0.625000 0.500000
vt 0.625000 -0.000000
vt 0.476190 0.785650
vt 0.488110 0.783278
vt 0.498216 0.776526
vt 0.504969 0.766420
vt 0.507340 0.754500
vt 0.504969 0.742579
vt 0.498216 0.732474
vt 0.488110 0.725721
vt 0.476190 0.723350
vt 0.464269 0.725721
vt 0.454164 0.732474
vt 0.447411 0.742579
vt 0.445040 0.754500
vt 0.447411 0.766420
vt 0.454164 0.776526
vt 0.464269 0.783278
vt 0.562500 -0.000000
vt 0.562500 0.500000
vt 1.000000 1.000000
vt 0.000000 1.000000
vn 0.195100 0.000000 -0.980800
vn 0.555600 0.000000 -0.831500
vn 0.831500 0.000000 -0.555600
vn 0.980800 0.000000 -0.195100
vn 0.980800 0.000000 0.195100
vn 0.831500 0.000000 0.555600
vn 0.555600 0.000000 0.831500
vn 0.195100 0.000000 0.980800
vn -0.195100 0.000000 0.980800
vn -0.555600 0.000000 0.831500
vn -0.831500 0.000000 0.555600
vn -0.980800 0.000000 0.195100
vn -0.980800 0.000000 -0.195100
vn -0.831500 0.000000 -0.555600
vn 0.000000 1.000000 0.000000
vn -0.195100 0.000000 -0.980800
vn -0.555600 0.000000 -0.831500
vn 0.000000 -1.000000 -0.000000
vn 0.707100 0.000000 0.707100
vn -0.707100 0.000000 0.707100
vn -0.707100 -0.000000 -0.707100
vn 0.707100 -0.000000 -0.707100
g Cylinder_Cylinder_candle
s off
f 3/1/1 4/2/1 6/3/1 5/4/1
f 5/4/2 6/3/2 8/5/2 7/6/2
f 7/6/3 8/5/3 10/7/3 9/8/3
f 9/8/4 10/7/4 12/9/4 11/10/4
f 11/10/5 12/9/5 14/11/5 13/12/5
f 13/12/6 14/11/6 16/13/6 15/14/6
f 15/14/7 16/13/7 18/15/7 17/16/7
f 17/16/8 18/15/8 20/17/8 19/18/8
f 19/19/9 20/20/9 22/21/9 21/22/9
f 21/22/10 22/21/10 24/23/10 23/24/10
f 23/24/11 24/23/11 26/25/11 25/26/11
f 25/26/12 26/25/12 28/27/12 27/28/12
f 27/28/13 28/27/13 30/29/13 29/30/13
f 29/30/14 30/29/14 32/31/14 31/32/14
f 6/33/15 4/34/15 34/35/15 32/36/15 30/37/15 28/38/15 26/39/15 24/40/15 22/41/15 20/42/15 18/43/15 16/44/15 14/45/15 12/46/15 10/47/15 8/48/15
f 33/49/16 34/50/16 4/2/16 3/1/16
f 31/32/17 32/31/17 34/50/17 33/49/17
f 3/33/18 5/34/18 7/35/18 9/36/18 11/37/18 13/38/18 15/39/18 17/40/18 19/41/18 21/42/18 23/43/18 25/44/18 27/45/18 29/46/18 31/47/18 33/48/18
g Cylinder_Cylinder_flame
f 38/19/19 37/51/19 40/52/19 39/18/19
f 2/19/20 1/51/20 36/52/20 35/18/20
f 46/19/21 47/18/21 48/52/21 45/51/21
f 42/19/22 43/18/22 44/52/22 41/51/22

View File

@ -0,0 +1,150 @@
# Blender v2.73 (sub 0) OBJ File: 'candle-large.blend'
# www.blender.org
o Cylinder
v 0.044194 0.062500 0.044194
v 0.044194 -0.187500 0.044194
v 0.000000 -0.500000 -0.062500
v 0.000000 -0.187500 -0.062500
v 0.023918 -0.500000 -0.057742
v 0.023918 -0.187500 -0.057742
v 0.044194 -0.500000 -0.044194
v 0.044194 -0.187500 -0.044194
v 0.057742 -0.500000 -0.023918
v 0.057742 -0.187500 -0.023918
v 0.062500 -0.500000 0.000000
v 0.062500 -0.187500 0.000000
v 0.057742 -0.500000 0.023918
v 0.057742 -0.187500 0.023918
v 0.044194 -0.500000 0.044194
v 0.044194 -0.187500 0.044194
v 0.023918 -0.500000 0.057742
v 0.023918 -0.187500 0.057742
v 0.000000 -0.500000 0.062500
v 0.000000 -0.187500 0.062500
v -0.023918 -0.500000 0.057742
v -0.023918 -0.187500 0.057742
v -0.044194 -0.500000 0.044194
v -0.044194 -0.187500 0.044194
v -0.057742 -0.500000 0.023918
v -0.057742 -0.187500 0.023918
v -0.062500 -0.500000 0.000000
v -0.062500 -0.187500 0.000000
v -0.057742 -0.500000 -0.023918
v -0.057742 -0.187500 -0.023918
v -0.044194 -0.500000 -0.044194
v -0.044194 -0.187500 -0.044194
v -0.023918 -0.500000 -0.057742
v -0.023918 -0.187500 -0.057742
v -0.044194 -0.187500 -0.044194
v -0.044194 0.062500 -0.044194
v 0.044194 0.062500 -0.044194
v 0.044194 -0.187500 -0.044194
v -0.044194 -0.187500 0.044194
v -0.044194 0.062500 0.044194
v 0.044194 0.062500 0.044194
v 0.044194 -0.187500 0.044194
v -0.044194 -0.187500 -0.044194
v -0.044194 0.062500 -0.044194
v 0.044194 0.062500 -0.044194
v 0.044194 -0.187500 -0.044194
v -0.044194 -0.187500 0.044194
v -0.044194 0.062500 0.044194
vt 0.500000 -0.000000
vt 0.500000 0.500000
vt 0.437500 0.500000
vt 0.437500 -0.000000
vt 0.375000 0.500000
vt 0.375000 -0.000000
vt 0.312500 0.500000
vt 0.312500 -0.000000
vt 0.250000 0.500000
vt 0.250000 -0.000000
vt 0.187500 0.500000
vt 0.187500 -0.000000
vt 0.125000 0.500000
vt 0.125000 -0.000000
vt 0.062500 0.500000
vt 0.062500 -0.000000
vt -0.000000 0.500000
vt -0.000000 -0.000000
vt 1.000000 -0.000000
vt 1.000000 0.500000
vt 0.937500 0.500000
vt 0.937500 -0.000000
vt 0.875000 0.500000
vt 0.875000 -0.000000
vt 0.812500 0.500000
vt 0.812500 -0.000000
vt 0.750000 0.500000
vt 0.750000 -0.000000
vt 0.687500 0.500000
vt 0.687500 -0.000000
vt 0.625000 0.500000
vt 0.625000 -0.000000
vt 0.476190 0.785650
vt 0.488110 0.783278
vt 0.498216 0.776526
vt 0.504969 0.766420
vt 0.507340 0.754500
vt 0.504969 0.742579
vt 0.498216 0.732474
vt 0.488110 0.725721
vt 0.476190 0.723350
vt 0.464269 0.725721
vt 0.454164 0.732474
vt 0.447411 0.742579
vt 0.445040 0.754500
vt 0.447411 0.766420
vt 0.454164 0.776526
vt 0.464269 0.783278
vt 0.562500 -0.000000
vt 0.562500 0.500000
vt 1.000000 1.000000
vt 0.000000 1.000000
vn 0.195100 0.000000 -0.980800
vn 0.555600 0.000000 -0.831500
vn 0.831500 0.000000 -0.555600
vn 0.980800 0.000000 -0.195100
vn 0.980800 0.000000 0.195100
vn 0.831500 0.000000 0.555600
vn 0.555600 0.000000 0.831500
vn 0.195100 0.000000 0.980800
vn -0.195100 0.000000 0.980800
vn -0.555600 0.000000 0.831500
vn -0.831500 0.000000 0.555600
vn -0.980800 0.000000 0.195100
vn -0.980800 0.000000 -0.195100
vn -0.831500 0.000000 -0.555600
vn 0.000000 1.000000 0.000000
vn -0.195100 0.000000 -0.980800
vn -0.555600 0.000000 -0.831500
vn 0.000000 -1.000000 -0.000000
vn 0.707100 0.000000 0.707100
vn -0.707100 0.000000 0.707100
vn -0.707100 -0.000000 -0.707100
vn 0.707100 -0.000000 -0.707100
g Cylinder_Cylinder_candle
s off
f 3/1/1 4/2/1 6/3/1 5/4/1
f 5/4/2 6/3/2 8/5/2 7/6/2
f 7/6/3 8/5/3 10/7/3 9/8/3
f 9/8/4 10/7/4 12/9/4 11/10/4
f 11/10/5 12/9/5 14/11/5 13/12/5
f 13/12/6 14/11/6 16/13/6 15/14/6
f 15/14/7 16/13/7 18/15/7 17/16/7
f 17/16/8 18/15/8 20/17/8 19/18/8
f 19/19/9 20/20/9 22/21/9 21/22/9
f 21/22/10 22/21/10 24/23/10 23/24/10
f 23/24/11 24/23/11 26/25/11 25/26/11
f 25/26/12 26/25/12 28/27/12 27/28/12
f 27/28/13 28/27/13 30/29/13 29/30/13
f 29/30/14 30/29/14 32/31/14 31/32/14
f 6/33/15 4/34/15 34/35/15 32/36/15 30/37/15 28/38/15 26/39/15 24/40/15 22/41/15 20/42/15 18/43/15 16/44/15 14/45/15 12/46/15 10/47/15 8/48/15
f 33/49/16 34/50/16 4/2/16 3/1/16
f 31/32/17 32/31/17 34/50/17 33/49/17
f 3/33/18 5/34/18 7/35/18 9/36/18 11/37/18 13/38/18 15/39/18 17/40/18 19/41/18 21/42/18 23/43/18 25/44/18 27/45/18 29/46/18 31/47/18 33/48/18
g Cylinder_Cylinder_flame
f 38/19/19 37/51/19 40/52/19 39/18/19
f 2/19/20 1/51/20 36/52/20 35/18/20
f 46/19/21 47/18/21 48/52/21 45/51/21
f 42/19/22 43/18/22 44/52/22 41/51/22

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 B