use mesh nodes for speakers

This commit is contained in:
Vanessa Ezekowitz 2015-03-27 22:55:41 -04:00
parent 6385013037
commit e377f2af6d
10 changed files with 135 additions and 20 deletions

View File

@ -4,34 +4,29 @@ local S = homedecor.gettext
homedecor.register("speaker", {
description = S("Large Stereo Speaker"),
tiles = { 'homedecor_speaker_top.png',
'homedecor_speaker_bottom.png',
'homedecor_speaker_right.png',
'homedecor_speaker_left.png',
'homedecor_speaker_back.png',
'homedecor_speaker_front.png'},
mesh="homedecor_speaker_large.obj",
tiles = {
"homedecor_speaker_sides.png",
"homedecor_speaker_front.png"
},
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
})
local spk_cbox = {
type = "fixed",
fixed = { -3/16, -8/16, 1/16, 3/16, -2/16, 7/16 }
}
homedecor.register("speaker_small", {
description = S("Small Surround Speaker"),
mesh="homedecor_speaker_small.obj",
tiles = {
'homedecor_speaker_top.png',
'homedecor_speaker_bottom.png',
'homedecor_speaker_right.png',
'homedecor_speaker_left.png',
'homedecor_speaker_back.png',
'homedecor_speaker_front.png'
},
selection_box = {
type = "fixed",
fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 }
},
node_box = {
type = "fixed",
fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 }
"homedecor_speaker_sides.png",
"homedecor_speaker_front.png"
},
selection_box = spk_cbox,
collision_box = spk_cbox,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
})

View File

@ -0,0 +1,58 @@
# Blender v2.73 (sub 0) OBJ File: 'speaker.blend'
# www.blender.org
o Cube
v 0.437500 -0.500000 -0.500000
v 0.500000 -0.500000 0.500000
v -0.500000 -0.500000 0.500000
v -0.437500 -0.500000 -0.500000
v 0.437500 0.500000 -0.500000
v 0.500000 0.500000 0.500000
v -0.500000 0.500000 0.500000
v -0.437500 0.500000 -0.500000
v 0.500000 -0.500000 -0.437500
v -0.500000 -0.500000 -0.437500
v 0.500000 0.500000 -0.437500
v -0.500000 0.500000 -0.437500
v -0.000000 0.500000 -0.466846
v 0.000000 -0.500000 -0.466846
vt 0.062500 -0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.062500 1.000000
vt 0.000000 1.000000
vt -0.000000 0.000000
vt 0.937500 -0.000000
vt 0.937500 1.000000
vt 1.000000 0.061472
vt 0.500000 0.032609
vt 0.500000 0.967391
vt 0.000010 0.938528
vt 0.999990 0.938528
vt 0.000000 0.061472
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
vn 1.000000 0.000000 0.000000
vn -0.000000 -0.000000 1.000000
vn -1.000000 -0.000000 -0.000000
vn -0.707100 -0.000000 -0.707100
vn 0.000000 0.000000 -1.000000
vn 0.707100 0.000000 -0.707100
g Cube_Cube_speaker-wood
s off
f 9/1/1 2/2/1 3/3/1 10/4/1
f 11/4/2 12/1/2 7/2/2 6/3/2
f 9/4/3 11/1/3 6/2/3 2/3/3
f 2/2/4 6/3/4 7/5/4 3/6/4
f 3/2/5 7/3/5 12/4/5 10/1/5
g Cube_Cube_cloth
f 10/7/6 12/2/6 8/3/6 4/8/6
f 5/1/7 1/7/7 4/8/7 8/4/7
f 1/6/8 5/1/8 11/4/8 9/5/8
f 1/7/1 9/9/1 14/10/1
f 5/8/2 8/4/2 13/11/2
f 8/4/2 12/12/2 13/11/2
f 12/12/2 11/13/2 13/11/2
f 11/13/2 5/8/2 13/11/2
f 9/9/1 10/14/1 14/10/1
f 10/14/1 4/1/1 14/10/1
f 4/1/1 1/7/1 14/10/1

View File

@ -0,0 +1,62 @@
# Blender v2.73 (sub 0) OBJ File: 'speaker_small.blend'
# www.blender.org
o Cube
v 0.125000 -0.500000 0.062500
v 0.187500 -0.500000 0.437500
v -0.187500 -0.500000 0.437500
v -0.125000 -0.500000 0.062500
v 0.125000 -0.125000 0.062500
v 0.187500 -0.125000 0.437500
v -0.187500 -0.125000 0.437500
v -0.125000 -0.125000 0.062500
v 0.187500 -0.500000 0.125000
v -0.187500 -0.500000 0.125000
v 0.187500 -0.125000 0.125000
v -0.187500 -0.125000 0.125000
v 0.000000 -0.500000 0.095501
v 0.000000 -0.125000 0.095501
vt 0.375000 0.562500
vt 0.687500 0.562500
vt 0.687500 0.937500
vt 0.375000 0.937500
vt 0.312500 0.937500
vt 0.312500 0.562500
vt 0.625000 0.937500
vt 0.625000 0.562500
vt 0.687324 0.937685
vt 0.624883 1.000000
vt 0.500000 0.967097
vt 0.312676 0.937685
vt 0.624882 0.500185
vt 0.687324 0.562500
vt 0.500000 0.533088
vt 0.375118 1.000000
vt 0.312676 0.562500
vt 0.375118 0.500185
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
vn 1.000000 0.000000 0.000000
vn -0.000000 -0.000000 1.000000
vn -1.000000 -0.000000 -0.000000
vn -0.707100 0.000000 -0.707100
vn 0.000000 0.000000 -1.000000
vn 0.707100 -0.000000 -0.707100
g Cube_Cube_speaker-wood
s off
f 9/1/1 2/2/1 3/3/1 10/4/1
f 11/4/2 12/1/2 7/2/2 6/3/2
f 9/4/3 11/1/3 6/2/3 2/3/3
f 2/2/4 6/3/4 7/5/4 3/6/4
f 3/2/5 7/3/5 12/4/5 10/1/5
g Cube_Cube_cloth
f 10/2/6 12/3/6 8/7/6 4/8/6
f 5/1/7 1/8/7 4/7/7 8/4/7
f 1/1/8 5/4/8 11/5/8 9/6/8
f 11/9/2 5/10/2 14/11/2
f 12/12/2 11/9/2 14/11/2
f 1/13/1 9/14/1 13/15/1
f 8/16/2 12/12/2 14/11/2
f 10/17/1 4/18/1 13/15/1
f 9/14/1 10/17/1 13/15/1
f 4/18/1 1/13/1 13/15/1
f 5/10/2 8/16/2 14/11/2

Binary file not shown.

Before

Width:  |  Height:  |  Size: 791 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 844 B