#N canvas 124 217 710 507 10;
#X declare -lib Gem;
#X text 475 49 Example:;
#X obj 7 64 cnv 15 450 220 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 8 336 cnv 15 450 100 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X text 9 339 Inlets:;
#X obj 8 296 cnv 15 450 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X text 17 295 Arguments:;
#X text 452 8 GEM object;
#X text 27 351 Inlet 1: gemlist;
#X text 9 406 Outlets:;
#X text 21 419 Outlet 1: gemlist;
#X obj 469 67 cnv 15 170 320 empty empty empty 20 12 0 14 #dce4fc #404040 0;
#X obj 475 160 cnv 15 150 100 empty empty empty 20 12 0 14 #14e814 #404040 0;
#X obj 483 74 gemhead;
#X text 33 14 Synopsis: [light];
#X text 53 30 Class: non-geometric object;
#X text 7 69 Description: adds a point-light to the scene;
#X text 18 86 [light] produces a light which is local to the scene (unlike [world_light] which is at an infinite distance). Because light is local light \, there is more computation required. Use a world_light if you don't mind parallel light rays.;
#X text 27 373 Inlet 1: message: debug 1|0 (default:0);
#X text 28 388 Inlet 2: list: 3(RGB) or 4(RGBA) float values;
#X obj 483 235 light;
#X msg 570 213 1 1 1;
#X obj 527 163 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1;
#X msg 527 184 debug \$1;
#X text 19 219 Keep in mind that the attributes have to be set before rendering the vertices \, so if you are trying for frame accurate rendering \, you will want to set the gemhead order to a low number so that all of the values of the light get set first.;
#X obj 472 296 sphere;
#X floatatom 563 78 5 0 0 0 - - - 0;
#X obj 483 139 translateXYZ 2 0 0;
#X obj 483 96 rotateXYZ 0 -120 0;
#X obj 472 274 gemhead 40;
#X floatatom 523 121 5 1 4 0 - - - 0;
#X obj 549 266 cnv 15 85 50 empty empty empty 20 12 0 14 #14e814 #404040 0;
#X msg 551 293 lighting \$1;
#X obj 551 271 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1;
#X text 17 155 You can place the light with [rotate] and [translate]. If you are lost use "debug" to display the light source as a small sphere.;
#X msg 513 213 1 1 0;
#X text 18 200 The second inlet sets the color of the light-source.;
#X text 63 307 light-number;
#X obj 492 175 tgl 20 0 empty \$0-onoff empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X text 27 362 Inlet 1: float: turn light on/off (default:1);
#N canvas 484 243 450 300 META 0;
#X obj 10 25 declare -lib Gem;
#X text 10 45 DESCRIPTION adds a point-light to the scene;
#X text 10 65 KEYWORDS Gem non-geometric;
#X text 20 85 INLET_0 gemlist float debug;
#X text 20 105 INLET_1 list;
#X text 20 125 OUTLET_0 gemlist;
#X text 10 145 AUTHOR IOhannes m zmölnig;
#X text 10 165 LICENSE GPL-2.0-or-later;
#X restore 538 9 pd META;
#X obj 551 337 _gemwin;
#X connect 12 0 27 0;
#X connect 20 0 19 1;
#X connect 21 0 22 0;
#X connect 22 0 19 0;
#X connect 25 0 27 2;
#X connect 26 0 19 0;
#X connect 27 0 26 0;
#X connect 28 0 24 0;
#X connect 29 0 26 1;
#X connect 31 0 40 0;
#X connect 32 0 31 0;
#X connect 34 0 19 1;
#X connect 37 0 19 0;
