10_ev_example_scenes_and_transitions.pd 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #N canvas 129 22 944 756 10;
  2. #X declare -path . -path .. -path data -path ../data -path ev-in -path
  3. ../ev-in -path ev-main -path ../ev-main -path ev-pano -path ../ev-pano
  4. -path ev-pro -path ../ev-pro -path libs/gil -path ../libs/gil -path
  5. libs/kollabs -path ../libs/kollabs -path media -path ../media -path
  6. ev-glsl -path ../ev-glsl -lib Gem;
  7. #X obj 14 -26 cnv 15 700 30 empty empty Example:_Scenes_and_Transitions
  8. 20 12 0 14 -233017 -66577 0;
  9. #X obj 13 441 cnv 15 910 30 empty empty INITIALIZE 20 12 0 14 -261234
  10. -66577 0;
  11. #N canvas 579 25 509 161 init 0;
  12. #X obj 44 27 cnv 15 400 100 empty empty IMPORTANT 20 12 0 14 -261234
  13. -66577 0;
  14. #X text 49 47 Such a declare object should always be in the main patch
  15. of your project \, to set the pathes to the abstractions.;
  16. #X obj 158 93 ev-main/ev_declare;
  17. #X restore 752 -12 pd init;
  18. #X obj 13 244 cnv 15 450 190 empty empty Patch_domain_"main" 280 12
  19. 0 14 -262130 -66577 0;
  20. #X obj 23 252 gemhead 50;
  21. #X obj 473 244 cnv 15 450 190 empty empty Patch_domain_"special" 20
  22. 12 0 14 -262130 -66577 0;
  23. #X obj 14 478 cnv 15 450 350 empty empty Storage_domain_"main" 20 12
  24. 0 14 -204800 -66577 0;
  25. #X obj 474 478 cnv 15 450 350 empty empty Storage_domain_"special"
  26. 20 12 0 14 -204800 -66577 0;
  27. #X text 488 504 Here \, domain "special" is specified by first creation
  28. argument.;
  29. #X obj 489 297 gemhead 51;
  30. #X text 26 511 Here \, domain "main" is specified by first creation
  31. argument.;
  32. #X msg 247 590 0;
  33. #X msg 277 590 1;
  34. #X msg 307 590 2;
  35. #X text 187 563 Change scene by clicking these message boxes;
  36. #X obj 247 632 s /ds/main/scene;
  37. #X msg 711 589 0;
  38. #X msg 741 589 1;
  39. #X msg 771 589 2;
  40. #X text 651 562 Change scene by clicking these message boxes;
  41. #X obj 711 631 s /ds/special/scene;
  42. #X obj 23 281 ev_pro_22easy projection_a main;
  43. #X obj 489 326 ev_pro_22easy projection_b special;
  44. #N canvas 0 22 493 355 load_preset_files 0;
  45. #X obj 57 41 loadbang;
  46. #X obj 37 41 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
  47. -1;
  48. #X obj 57 65 del 1000;
  49. #X obj 57 87 t b b;
  50. #X obj 57 221 del 2000;
  51. #X msg 57 244 \; /ds/main/scene 0 \; /ds/special/scene 0 \;;
  52. #X text 145 43 Both domains must be initialized to get automatically
  53. loaded on startup.;
  54. #X msg 84 115 \; /ds/main/loadfile ../../data/ev_example_scene_transitions_main.txt
  55. \; /ds/special/loadfile ../../data/ev_example_scene_transitions_special.txt
  56. \;;
  57. #X text 130 188 (pathes relative to "./libs/kollabs");
  58. #X connect 0 0 2 0;
  59. #X connect 1 0 2 0;
  60. #X connect 2 0 3 0;
  61. #X connect 3 0 4 0;
  62. #X connect 3 1 7 0;
  63. #X connect 4 0 5 0;
  64. #X coords 0 355 1 354 85 60 0;
  65. #X restore 163 447 pd load_preset_files;
  66. #X obj 14 9 cnv 15 910 25 empty empty This_is_only_a_short_introduction._A_comprehensive_help_file_is_provided_in_"./libs/kollabs/ds_help.pd"
  67. 20 12 0 14 -260183 -1 0;
  68. #X obj 23 348 ev_gemwin main;
  69. #X text 472 -25 (c)2013 Marian Weger \; /part of EXTENDED VIEW toolkit/
  70. gpl v3;
  71. #X obj 484 706 ds_transition special;
  72. #X obj 484 732 ds_transition_gui special;
  73. #X obj 485 540 ds_logic special;
  74. #X obj 485 562 ds_gui special;
  75. #X text 621 703 transition module to enable scene transitions;
  76. #X text 679 755 corresponding gui;
  77. #X obj 14 38 cnv 15 910 200 empty empty About_Kollabs_state-saving_system
  78. 20 12 0 14 -232576 -66577 0;
  79. #X text 34 64 Extended View Toolkit relies on the Kollabs state-saving
  80. system. With Kollabs \, it is possible to save snapshots (=scenes)
  81. of all the parameters (=variables) in the patch. For every scene and
  82. variable \, an individual transition can be set to morph between scenes.
  83. The variables can be assigned to different storage domains to be saved
  84. with (first creation argument). If no argument is given \, domain "0"
  85. is assumed.;
  86. #X text 37 173 In this example \, a scene transition is introduced
  87. for domain "special".;
  88. #X text 37 205 The following steps show \, how scene transitions work
  89. and how to get them.;
  90. #X text 491 131 IMPORTANT NOTE \; A transition is saved with the DESTINATION
  91. value. So \, if a fade between scene 3 and 4 is desired \, it needs
  92. to be set in scene 4 \; Transitions only have influence on variables
  93. of type float.;
  94. #X text 234 281 2nd creation argument: storage domain;
  95. #X text 525 387 2nd creation argument: storage domain (here: "special")
  96. ;
  97. #X text 244 294 (here: "main");
  98. #X text 311 447 Look inside to see how to load preset files on startup
  99. ;
  100. #X obj 26 549 ev_storage main;
  101. #X text 27 700 [ev_storage] is a shortcut for [ds_logic] & [ds_gui]
  102. combined.;
  103. #X connect 4 0 21 0;
  104. #X connect 9 0 22 0;
  105. #X connect 11 0 15 0;
  106. #X connect 12 0 15 0;
  107. #X connect 13 0 15 0;
  108. #X connect 16 0 20 0;
  109. #X connect 17 0 20 0;
  110. #X connect 18 0 20 0;
  111. #X coords 0 0 1 1 85 60 0;