From e377f2af6d49fe07d7b9c530db9c08a714bc8307 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 27 Mar 2015 22:55:41 -0400 Subject: [PATCH] use mesh nodes for speakers --- homedecor/electronics.lua | 35 +++++----- homedecor/models/homedecor_speaker_large.obj | 58 ++++++++++++++++ homedecor/models/homedecor_speaker_small.obj | 62 ++++++++++++++++++ homedecor/textures/homedecor_speaker_back.png | Bin 791 -> 0 bytes .../textures/homedecor_speaker_bottom.png | Bin 844 -> 0 bytes .../textures/homedecor_speaker_front.png | Bin 108 -> 92 bytes homedecor/textures/homedecor_speaker_left.png | Bin 819 -> 0 bytes .../textures/homedecor_speaker_right.png | Bin 822 -> 0 bytes .../textures/homedecor_speaker_sides.png | Bin 0 -> 530 bytes homedecor/textures/homedecor_speaker_top.png | Bin 844 -> 0 bytes 10 files changed, 135 insertions(+), 20 deletions(-) create mode 100644 homedecor/models/homedecor_speaker_large.obj create mode 100644 homedecor/models/homedecor_speaker_small.obj delete mode 100644 homedecor/textures/homedecor_speaker_back.png delete mode 100644 homedecor/textures/homedecor_speaker_bottom.png delete mode 100644 homedecor/textures/homedecor_speaker_left.png delete mode 100644 homedecor/textures/homedecor_speaker_right.png create mode 100644 homedecor/textures/homedecor_speaker_sides.png delete mode 100644 homedecor/textures/homedecor_speaker_top.png diff --git a/homedecor/electronics.lua b/homedecor/electronics.lua index 85cf8fe7..02f5bb3d 100644 --- a/homedecor/electronics.lua +++ b/homedecor/electronics.lua @@ -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(), }) diff --git a/homedecor/models/homedecor_speaker_large.obj b/homedecor/models/homedecor_speaker_large.obj new file mode 100644 index 00000000..715893d6 --- /dev/null +++ b/homedecor/models/homedecor_speaker_large.obj @@ -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 diff --git a/homedecor/models/homedecor_speaker_small.obj b/homedecor/models/homedecor_speaker_small.obj new file mode 100644 index 00000000..b1a2fc8e --- /dev/null +++ b/homedecor/models/homedecor_speaker_small.obj @@ -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 diff --git a/homedecor/textures/homedecor_speaker_back.png b/homedecor/textures/homedecor_speaker_back.png deleted file mode 100644 index 9f664870905d70faea484b5dc2f73dbcda3281de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 791 zcmV+y1L*vTP)KL@PI6pISw1O7G9XYjAV4V@Ni!i^OFK+D zDqch^T0tsYLo8WIIa4?zYE?jRT1ZelD?uw6T}?kjEE!HR99cXiQ8XP?IV5yqP+meT zT}Cr)RzprO7aaa>7sUrcskPJaEj>Hq)%2}wjjR2b6* z!GnUsKokJLceZWYwr%^awr!+M+c??XFTNQ_iAa1x1l?d62Z`JO!zfRbtGrA|hIa|1 z8v2M5Rg|c}yYyZ?pDBZ0&A`m&?#|xU>4H|Psj7gkLI03p|HzRI#T^D?Z8`LGQzO*D zq5b&8tF$H3+vyb8@LHZQ0)q+jO$bUu z+LsGrOo;IJ%bzQP4VqhHOQy$|C`zAlZY-yUrfjy;pGd^Nex5f%9?v+Gnp>>aWpg2! zd@IZr0#i^@)M$542QD67-ovYN;Ryh)m}M1yg}s0EX4v^jP@6=RO6ov9j^i+v)Bi56 VVR=7JZ}k8G002ovPDHLkV1h`k8Z`g_ diff --git a/homedecor/textures/homedecor_speaker_bottom.png b/homedecor/textures/homedecor_speaker_bottom.png deleted file mode 100644 index ed65f660176a1150e47c26c8af48f5b84eee2b42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 844 zcmV-S1GD^zP)iLNgRM& zJcLakg-#)eQz&6C27EsbqI*<+Mi`4!Cz@+Qa7ikMWk---IE+{-Y(N}mI1h_gDP1rO zbvg@#N*0JyB#c`$nr=pCI~SX5Lz{0$m}x+oX+oH1K$~t!cu+8iS1_J(N`PEHpLS7x zLK0*&5215SfL%RcF%Nu27;HWnXgwEyUOjC{Cx%cUmuWqDK@){fA7wQUoo`8rO&xAB z28T}}h)y7fR40vGHF`i6ZZrmYLKTTrC5u)khfE!gT{eqVDT-GrfJPXhbWfdfONUY; zgi0K8NGGFqQHxL^g;6K0gI=h7Sfzbgc~UcrQz4LHIE6_Wr+ih0RW6}-QJZo}qk2)5 zXg!2dDwb+Oqdax?~jUO#+23WriBeOo+%U_q#U zSamxMd_)#cpL9)(ST2lOGK^d@ zt%P5weO9A;Q+rl6c0UrFaY~zTNt$d#q|KBcu@`x4gdfEtasQn z00030NklqcznqVY|IQ5gn|oE}c6Zwk9D=&deWg@2okk_C05FeQh0#&0*u%)`ot0Q)@P3 zjSVpE@p$jN`@8EGZ;yQ~HC2GllF#qtk&Ar&B8Wi(g;DP5llov^IR59G=ld;S8Nm-Z zj;GkOYx;^|2cWmx)YVyOYVBz6ap8;j4YXN{3bU2UtlXU93cK5V3MGmRnJi2ZCzYld zON~Pdke8XF*M>wy#U=@K`Q^G{NKZ{b5Qc{6m_&mHDN{poe7IPQhN>bZYKdH4pb7%B W4{SO??r8@A0000S!!~y^c)&hC} delta 21 ccma#anV`bUlJ4m1$iT3%pZiZD>qJFs07L->UH||9 diff --git a/homedecor/textures/homedecor_speaker_left.png b/homedecor/textures/homedecor_speaker_left.png deleted file mode 100644 index 04a028fb886854aea5ebb19cbde7a19307d7e731..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 819 zcmV-31I+x1P)c&Hhfg7!Z%2z(C!KOjfJPXjdQqEfLz`|%m}x+o zYeI`qA%;~hm~BR^gIN*0JwB#c-pkY6};Jr8v{3!8FD zp?6WCcu$2-AEkX+pLS7;Qz3;(8J~7dr+ihYd{}r@HF7itd_4++U_zpJQhi%Igh&{G zUO#+97Jot!ayJNdI}L|YCy!e(j94zIgI%b8ScXm@j#w;kI0}qaD4%pqj9fC9XF!Nf zAdOr#j9M~?PaL6jO|67qsC`z2Oc|kcPnTsqc0UrFaY~+YN}F&=q;o0|68Oz^!fDwr$(C-K4SY zCRuy;UwhNnIfJNGHFaihlo0)Q*XM#PBjr`PS_{q*s z4Xv%B(t&^RgzxX| zb__1T$jmCzn8!F)^pDtm0t|I_PGNI9HRbLzxJEe`$wIEug!0_PP-o9%7)BzKk!PA? zcSXH$%W?5=y1zS7&lwx2|G1hop5fb+f_I)3c{0F>NXOPDjfkzXBN*0V*Du_`ekY6};Jr8v{3#WWlg-IESS}~VtJ%vvngH0WIJ`;veAbCL( zj9WCDa!H6+FqUdUqOc{(?GM8mNoN-EaKN6&QQk!r|o^nc~dsC)-R-txJ zrh8PQcu}c;S(e3eIgZbnd)k_KZqpR50B1HNQ%R(N_|xY0wTJNKfLoy zpVd%J|AP4QF8iNIeid`pRN5iLZC;Omi~JPaZ3eyVTNZ;8mZhE7#h#Y(vXVj&)057T zu@!!yw^dhKAPXVrnDU7%*KN`j=VgQ7R37uVdz0vFF3Qi5Kf=SK1M}+~j~X=!Ar%BO zGc*?wU)U~VZWfaa;(TKk-+d<7jwZE*{sIxcSlf#{h63&NYO@?9=HnWViTfDZke--? zfFPoG_pvLs-{sJxX%j%a1#fOI#Sn!yW@OSS|6h-1kd4E^qW}N^07*qoM6N<$g66(G AivR!s diff --git a/homedecor/textures/homedecor_speaker_sides.png b/homedecor/textures/homedecor_speaker_sides.png new file mode 100644 index 0000000000000000000000000000000000000000..4b95928814aeac609ee74431167bc1dfbb4e62b2 GIT binary patch literal 530 zcmV+t0`2{YP)g}~PQd^qR3t3ID4an;#EuKtAlR9&yQ?x0cs4xy?bl!KpTGV5 zcKhS^Kij}xU-Qck^SdwKw?1a;@9*y)|NQ;_HH-S`=O5QTJ|B+}D3crdh=N6*@CING zyS+U!p%MV^?uK@oy*WY#2gGRF=bCSisWJ~q04&T+2K5%6hxhyao1qqdO1Y4W>)#Iw z4KOngRLaag%>lsSIHji?KyLv6fI)Ej80NubxD_>fM1-Fbb3a_s45EcmI9WX`i+OgH zc_7@3R+P8!>u?v4Y~ghTV4r8Dy`GDe(Jb6#dgTc>zt*O3CE$2n1>km%`@EAJ9iw?` zpaI0S_FCoczE16R6|IkON5J~0hxMS4#M;^yk8Jc-D!C9srQ!7Ja48(VRx%?1Ee@GrKY?4}j6!x;Zg= zbK?=~u-1_qq6dJJFN33G)BWs3H08vnHw_QjP%%T7U72Qz$51@ft U=xU_p-v9sr07*qoM6N<$f{VxbRsaA1 literal 0 HcmV?d00001 diff --git a/homedecor/textures/homedecor_speaker_top.png b/homedecor/textures/homedecor_speaker_top.png deleted file mode 100644 index ecd6f1eaa484ccd11833634987b79da9b300add1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 844 zcmV-S1GD^zP)iUO&xAB28d1|i%=neMi{JvUWZR1hg2trOdY3uReC@c zgi0KXRwsZ-9DrOrZZrmqRVj#9FrIQsfLuSHc2SO9HibzUc|sM5R3(a6Dvewdax?~rPaLRzSb$zXd_4-OgI#hr z2z5IReOo-OgkNwt3aEWng-jWYRVaaAL5ET&hE5=UTRVJ27LHgfe?k$ATr!_@O^jMH zmt{SSST3V`Q+rl6c0UrEa7mhMM5K9AoN-F2e_5t{R;GJYqj*uFc25ot4gdfEA_<*m z00030Nkl0x3q8lsDoSR_hi ziw+9&G7yBJ!=qy|)e2G!|D)}im_>C$)g@c8VZ?x{_%-%_7E&yno+5Bl^I_`SGxQfGuLZ4VsEpt-*k$B*X5` z@^oKQo!RDWGnb?Z5uD5L*H)HS$>pZhB-kSvV?ASJ=^DLSPb(52@DBuj{|*8J W^lUm}>3%N&0000