aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/tutorials/visual/02.gemwin_as_reference.pd (renamed from doc/tutorials/visual/02.gemwin_as_reference copy.pd)0
-rw-r--r--doc/tutorials/visual/05.lighting.pd24
-rw-r--r--doc/tutorials/visual/TEMPLATE.pd5
-rw-r--r--doc/tutorials/visual/gemwin_control-help.pd4
-rw-r--r--doc/tutorials/visual/gemwin_control.pd149
5 files changed, 175 insertions, 7 deletions
diff --git a/doc/tutorials/visual/02.gemwin_as_reference copy.pd b/doc/tutorials/visual/02.gemwin_as_reference.pd
index e269c883..e269c883 100644
--- a/doc/tutorials/visual/02.gemwin_as_reference copy.pd
+++ b/doc/tutorials/visual/02.gemwin_as_reference.pd
diff --git a/doc/tutorials/visual/05.lighting.pd b/doc/tutorials/visual/05.lighting.pd
index 020ca1f5..73ac26ba 100644
--- a/doc/tutorials/visual/05.lighting.pd
+++ b/doc/tutorials/visual/05.lighting.pd
@@ -1,8 +1,18 @@
-#N canvas 548 149 492 381 10;
-#X obj 11 9 cnv 15 400 40 empty empty lighting 20 12 0 24 -228992 -66577
+#N canvas 362 246 632 452 10;
+#X obj 8 10 cnv 15 400 40 empty empty lighting 20 12 0 24 -228992 -66577
0;
-#X obj 29 120 gemwin;
-#X msg 28 63 create \, 1;
-#X msg 42 90 destroy;
-#X connect 2 0 1 0;
-#X connect 3 0 1 0;
+#X obj 465 16 gemwin_control;
+#X obj 466 60 import Gem;
+#X obj 29 150 gemwin;
+#X msg 29 119 lighting \$1;
+#X obj 29 101 tgl 15 1 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
+;
+#X obj 72 294 world_light;
+#X obj 72 256 gemhead;
+#X obj 295 253 gemhead;
+#X obj 295 274 sphere 1 35;
+#X text 255 228 draw a sphere;
+#X connect 4 0 3 0;
+#X connect 5 0 4 0;
+#X connect 7 0 6 0;
+#X connect 8 0 9 0;
diff --git a/doc/tutorials/visual/TEMPLATE.pd b/doc/tutorials/visual/TEMPLATE.pd
new file mode 100644
index 00000000..6fc45ac9
--- /dev/null
+++ b/doc/tutorials/visual/TEMPLATE.pd
@@ -0,0 +1,5 @@
+#N canvas 15 58 628 448 10;
+#X obj 8 10 cnv 15 400 40 empty empty TEMPLATE 20 12 0 24 -228992 -66577
+0;
+#X obj 465 16 gemwin_control;
+#X obj 466 60 import Gem;
diff --git a/doc/tutorials/visual/gemwin_control-help.pd b/doc/tutorials/visual/gemwin_control-help.pd
new file mode 100644
index 00000000..efb63385
--- /dev/null
+++ b/doc/tutorials/visual/gemwin_control-help.pd
@@ -0,0 +1,4 @@
+#N canvas 584 136 494 414 10;
+#X text 55 51 control the gemwin and rendering \, and see status;
+#X obj 67 130 gemwin_control;
+#X obj 241 129 gemwin_control;
diff --git a/doc/tutorials/visual/gemwin_control.pd b/doc/tutorials/visual/gemwin_control.pd
new file mode 100644
index 00000000..54274236
--- /dev/null
+++ b/doc/tutorials/visual/gemwin_control.pd
@@ -0,0 +1,149 @@
+#N canvas 224 95 713 582 10;
+#X obj 18 17 inlet;
+#X text 66 16 options pass-thru;
+#X obj 16 528 outlet;
+#X text 72 528 pass-thru;
+#X obj 17 503 gemwin \$1;
+#X obj 386 467 send GLOBAL_GEMWIN_CONTROL;
+#X obj 101 103 cnv 15 128 22 empty GLOBAL_GEMWIN_CONTROL_CANVAS gemwin
+3 5 0 14 -233017 -33289 0;
+#X obj 200 102 tgl 17 0 \$0-render_toggle THIS_IS_TO_MAKE_THE_INLET_DISAPPEAR
+render -6 21 1 9 -233017 -33289 -33289 0 1;
+#X obj 159 102 tgl 17 0 \$0-window_toggle THIS_IS_TO_MAKE_THE_INLET_DISAPPEAR
+window -6 21 1 9 -233017 -33289 -33289 0 1;
+#X obj 155 49 receive GLOBAL_GEMWIN_CONTROL;
+#N canvas 77 396 762 359 window 0;
+#X obj 56 126 select 0;
+#X obj 107 146 bang;
+#X msg 107 166 reset \, create;
+#X msg 228 164 window set \$1;
+#X obj 321 115 select 0 1;
+#X msg 354 136 76;
+#X msg 321 136 10;
+#X msg 331 163 window color \$1 12 12;
+#X obj 93 235 outlet;
+#X obj 460 273 outlet;
+#X obj 58 6 inlet;
+#X text 106 7 window status;
+#X msg 527 164 render 0;
+#X obj 557 3 inlet;
+#X text 602 3 render status;
+#X obj 527 92 float;
+#X obj 58 47 trigger float bang;
+#X obj 58 28 route float;
+#X obj 527 143 select 1;
+#X text 488 66 turn off rendering \, if on;
+#X msg 27 166 destroy;
+#X text 146 26 TODO: don't receive message if status is the same;
+#X obj 527 118 change;
+#X connect 0 0 20 0;
+#X connect 0 1 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 8 0;
+#X connect 3 0 9 0;
+#X connect 4 0 6 0;
+#X connect 4 1 5 0;
+#X connect 5 0 7 0;
+#X connect 6 0 7 0;
+#X connect 7 0 9 0;
+#X connect 10 0 17 0;
+#X connect 12 0 9 0;
+#X connect 13 0 15 1;
+#X connect 15 0 22 0;
+#X connect 16 0 0 0;
+#X connect 16 0 4 0;
+#X connect 16 0 3 0;
+#X connect 16 1 15 0;
+#X connect 17 0 16 0;
+#X connect 18 0 12 0;
+#X connect 20 0 8 0;
+#X connect 22 0 18 0;
+#X restore 76 369 pd window logic;
+#X obj 41 153 receive \$0-window_toggle;
+#N canvas 472 123 674 370 render 0;
+#X obj 253 118 select 0 1;
+#X msg 286 149 76;
+#X msg 253 149 10;
+#X msg 138 187 render set \$1;
+#X msg 291 187 render color \$1 12 12;
+#X obj 23 286 outlet;
+#X text 75 288 to gemwin;
+#X obj 377 280 outlet;
+#X obj 160 10 inlet;
+#X text 206 10 render status;
+#X text 545 8 window status;
+#X obj 498 8 inlet;
+#X msg 468 184 window 1;
+#X obj 469 101 float;
+#X text 430 75 create window \, if not created;
+#X obj 469 152 select 0;
+#X obj 160 30 route float;
+#X obj 161 58 trigger float bang;
+#X msg 223 307 \; GLOBAL_GEMWIN_CONTROL_CANVAS color \$1 12 12;
+#X obj 469 128 change;
+#X obj 381 128 iemabs/once;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 4 0;
+#X connect 1 0 18 0;
+#X connect 2 0 4 0;
+#X connect 2 0 18 0;
+#X connect 3 0 7 0;
+#X connect 4 0 7 0;
+#X connect 8 0 16 0;
+#X connect 11 0 13 1;
+#X connect 12 0 7 0;
+#X connect 13 0 19 0;
+#X connect 15 0 12 0;
+#X connect 16 0 17 0;
+#X connect 17 0 3 0;
+#X connect 17 0 0 0;
+#X connect 17 0 5 0;
+#X connect 17 1 13 0;
+#X connect 17 1 20 0;
+#X connect 19 0 15 0;
+#X connect 20 0 12 0;
+#X restore 300 369 pd render logic;
+#X obj 313 153 receive \$0-render_toggle;
+#X obj 155 72 route window render status;
+#X obj 301 230 float;
+#X obj 76 233 float;
+#X obj 263 153 bang;
+#X msg 529 250 status;
+#X obj 414 203 loadbang;
+#X obj 300 296 spigot 0;
+#X obj 77 296 spigot 0;
+#X obj 414 224 trigger bang bang;
+#X msg 414 250 1;
+#X text 354 187 first get status from existing objects;
+#X obj 76 255 change;
+#X obj 301 251 change;
+#X connect 0 0 4 0;
+#X connect 4 0 2 0;
+#X connect 9 0 14 0;
+#X connect 10 0 4 0;
+#X connect 10 1 5 0;
+#X connect 11 0 16 0;
+#X connect 12 0 4 0;
+#X connect 12 1 5 0;
+#X connect 13 0 15 0;
+#X connect 14 0 8 0;
+#X connect 14 1 7 0;
+#X connect 14 2 17 0;
+#X connect 15 0 26 0;
+#X connect 16 0 25 0;
+#X connect 17 0 15 0;
+#X connect 17 0 16 0;
+#X connect 18 0 5 0;
+#X connect 19 0 22 0;
+#X connect 20 0 12 0;
+#X connect 20 0 10 1;
+#X connect 21 0 10 0;
+#X connect 21 0 12 1;
+#X connect 22 0 23 0;
+#X connect 22 1 18 0;
+#X connect 23 0 20 1;
+#X connect 23 0 21 1;
+#X connect 25 0 21 0;
+#X connect 26 0 20 0;
+#X coords 0 -1 1 1 130 28 1 100 100;