Ver código fonte

work on zoom mode

Etienne Landon 8 anos atrás
pai
commit
2774d0e5a6
2 arquivos alterados com 174 adições e 225 exclusões
  1. 168 220
      extra/zoomControl.pd
  2. 6 5
      main.pd

+ 168 - 220
extra/zoomControl.pd

@@ -1,55 +1,47 @@
-#N canvas 0 50 1401 998 10;
-#X obj 100 120 cnv 15 328 130 empty \$0-cnv empty 20 12 0 14 -261689
+#N canvas 396 135 1401 789 10;
+#X obj 101 119 cnv 15 328 130 empty \$0-cnv empty 20 12 0 14 -225271
 -262144 0;
-#X obj 242 127 flatgui/popup 124 25 #ffffff poses none rarm tpose front
+#X obj 243 126 flatgui/popup 124 25 #ffffff poses none rarm tpose front
 circle larm ZI;
-#X obj 242 96 r poses-popup;
-#X obj 393 -52 r poses-in;
-#X obj 393 -30 route pose;
-#X obj 393 12 > 0.85;
-#X obj 393 34 route 1;
-#X obj 384 60 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+#X obj 243 95 r poses-popup;
+#X obj 394 -53 r poses-in;
+#X obj 394 -31 route pose;
+#X obj 394 11 > 0.85;
+#X obj 394 33 route 1;
+#X obj 385 59 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
 -1;
-#X msg 422 59 1;
-#X obj 406 104 tgl 15 0 empty empty on/off -40 7 0 10 -262144 -1 -1
-0 1;
-#X obj 287 438 change;
-#X text 370 130 IN pose;
-#X floatatom 194 125 5 0 0 0 threshold - #0-pose_threshold, f 5;
-#X obj 194 52 loadbang;
-#X msg 194 74 0.83;
-#X obj 610 32 route 0 1;
-#X obj 609 10 loadbang;
-#X msg 610 54 color 3;
-#X msg 638 74 color 6;
-#X obj 619 156 r bones-in;
-#X obj 619 178 route left_hand right_hand;
-#X obj 650 260 -;
-#X floatatom 759 313 5 0 0 0 - - -, f 5;
-#X obj 619 200 unpack s f f f;
-#X obj 708 222 unpack s f f f;
-#X obj 650 282 abs;
-#X floatatom 194 155 5 0 0 0 hand-dist_in - -, f 5;
-#X obj 32 538 f;
-#X obj 369 420 f;
-#X floatatom 194 175 5 0 0 0 hand-dist_out - -, f 5;
-#X text -2 141 hand distance;
-#X text -62 157 at time of activation;
-#X text -58 175 and of desactivation;
-#X text -52 193 in order to scale;
-#X obj 183 788 s toUE4;
-#X obj 173 490 spigot;
-#X obj 343 166 nbx 5 20 -1e+037 1e+037 0 0 empty empty empty 0 -8 0
-15 -262144 -1 -1 0 256;
-#X obj 559 565 route 1 0;
-#X text 0 769 scaling is here;
-#X text -27 789 minus hand dist in;
-#X text -44 813 comment;
-#X floatatom 106 218 5 0 0 2 max - -, f 5;
-#X floatatom 166 218 5 0 0 2 min - -, f 5;
-#X floatatom 226 218 5 0 0 2 far - -, f 5;
-#X floatatom 286 218 5 0 0 2 close - -, f 5;
-#X obj -193 159 loadbang;
+#X msg 423 58 1;
+#X obj 407 103 tgl 15 0 empty empty on/off -40 7 0 10 -262144 -1 -1
+1 1;
+#X obj 285 307 change;
+#X text 371 129 IN pose;
+#X floatatom 195 124 5 0 0 0 threshold - #0-pose_threshold, f 5;
+#X obj 195 51 loadbang;
+#X msg 195 73 0.83;
+#X obj 611 31 route 0 1;
+#X obj 610 9 loadbang;
+#X msg 611 53 color 3;
+#X msg 639 73 color 6;
+#X obj 728 159 r bones-in;
+#X obj 728 181 route left_hand right_hand;
+#X obj 759 243 -;
+#X obj 728 203 unpack s f f f;
+#X obj 817 225 unpack s f f f;
+#X obj 759 265 abs;
+#X text -1 140 hand distance;
+#X text -61 156 at time of activation;
+#X text -57 174 and of desactivation;
+#X text -51 192 in order to scale;
+#X obj 184 787 s toUE4;
+#X obj 101 399 spigot;
+#X text 1 768 scaling is here;
+#X text -26 788 minus hand dist in;
+#X text -43 812 comment;
+#X floatatom 107 217 5 0 0 2 max - -, f 5;
+#X floatatom 167 217 5 0 0 2 min - -, f 5;
+#X floatatom 227 217 5 0 0 2 far - -, f 5;
+#X floatatom 287 217 5 0 0 2 close - -, f 5;
+#X obj -192 158 loadbang;
 #N canvas 0 50 536 300 pack 0;
 #X obj 59 47 inlet;
 #X obj 139 47 inlet;
@@ -76,87 +68,65 @@ circle larm ZI;
 #X connect 9 0 10 0;
 #X connect 9 1 10 4;
 #X connect 10 0 4 0;
-#X restore 106 260 pd pack;
-#X text 132 234 HANDS;
-#X text 252 234 CAMERA;
-#X msg -193 179 0.65 0.2 -6000 100;
-#X msg 591 613 /scene/camera 2;
-#X obj 559 587 t b b;
-#X obj 577 640 r /toUE4;
-#X obj 577 662 route /avatar/springCam/position;
-#X obj 577 684 unpack f f f;
-#X text 654 642 when entering control \, take current camera position
-;
-#X obj 533 759 -;
-#X obj 492 442 change;
-#X obj 546 443 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+#X restore 107 259 pd pack;
+#X text 133 233 HANDS;
+#X text 253 233 CAMERA;
+#X obj 542 337 change;
+#X obj 596 338 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
 1;
-#X obj 492 393 abs;
-#X obj 650 304 s hand-dist2;
-#X obj 491 324 r hand-dist2;
-#X obj 492 369 -;
-#X obj 916 242 f;
-#X obj 916 269 -;
-#X obj 938 343 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
--1 -1 0 1;
-#X obj 916 313 abs;
-#X floatatom 964 323 5 0 0 0 - - -, f 5;
-#X obj 728 345 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
--1 -1 0 1;
-#X obj 981 225;
-#X floatatom 981 247 5 0 0 0 - - -, f 5;
-#X obj 916 291 t f f;
-#X obj 491 346 t f f;
-#X text 478 283 quit control if;
-#X text 485 301 no move on distance;
-#X obj 492 464 route 0 1;
-#X msg 492 486 stop;
-#X obj 492 508 delay;
-#X msg 532 485 1500;
-#X obj 173 431 r hand-dist2;
-#X obj 47 377 r hand-dist2;
-#X obj 287 460 t f f;
-#X obj 268 515 spigot;
-#X obj 268 537 t f b;
-#X msg 300 559 0;
-#X obj 173 453 t f f;
-#X obj 173 512 -;
-#X msg 492 530 0;
-#X obj 360 373 r hand-dist2;
-#X text 70 574 scaling;
-#X floatatom 533 811 5 0 0 0 - - -, f 5;
-#X obj 559 710 f 300;
-#X obj 533 781 * -1;
-#X obj 492 420 < 0.003;
-#X obj 366 813 clip 6000 30;
-#X obj 166 663 * 6000;
-#X floatatom 181 723 5 0 0 0 - - -, f 5;
-#X msg 181 761 list /avatar/springCam/position \$1 0 0;
-#X msg 166 591 1 \$1;
-#X obj 166 613 -;
-#X floatatom 554 423 5 0 0 0 - - -, f 5;
-#X floatatom 110 690 5 0 0 0 - - -, f 5;
-#X obj 166 694 clip 30 6000;
-#X obj 166 641 pow 6;
-#X obj 166 569 * -2;
-#X obj 889 808 clip -4000 0;
-#X text 862 848 hand dist \, hand dist in \, hand dist out \, camdist
-max \, camdist min;
-#X floatatom 901 697 5 0 0 0 - - -, f 5;
-#X obj 889 830 t f f;
-#X floatatom 990 828 57 0 0 0 - - -, f 57;
-#X obj 614 105 s \$0-cnv;
-#X obj 595 902 expr;
-#X obj 748 747 expr pow(($f3-$f1)/($f3-$f2) \, $f6) * ($f4-$f5) + $f5
+#X obj 542 288 abs;
+#X obj 542 264 -;
+#X obj 935 356 hsl 128 15 0 2 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 562 1;
+#X obj 541 241 t f f;
+#X text 528 178 quit control if;
+#X text 535 196 no move on distance;
+#X obj 542 359 route 0 1;
+#X msg 542 381 stop;
+#X obj 542 403 delay;
+#X obj 285 329 t f f;
+#X obj 196 424 spigot;
+#X obj 196 446 t f b;
+#X msg 250 425 0;
+#X obj 101 362 t f f;
+#X msg 542 425 0;
+#X msg 182 760 list /avatar/springCam/position \$1 0 0;
+#X floatatom 604 318 5 0 0 0 - - -, f 5;
+#X obj 615 104 s \$0-cnv;
+#X obj 432 -9 r \$0-pose_threshold;
+#X obj 107 283 s \$0-scaling;
+#X floatatom 347 217 5 0 0 2 pow - -, f 5;
+#X obj 791 454 list-abs/list-mean;
+#X obj 935 374 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 111 1;
+#X obj 759 502 s \$0-hand_dist;
+#X obj 541 219 r \$0-hand_dist;
+#X obj 242 572 clip -4000 0;
+#X obj 242 594 t f f;
+#X obj 101 511 expr pow(($f3-$f1)/($f3-$f2) \, $f6) * ($f4-$f5) + $f5
 \; $f4 \; $f5;
-#X obj 1031 605 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -262144
--1 -1 0;
-#X obj 431 -8 r \$0-pose_threshold;
-#X obj 106 284 s \$0-scaling;
-#X obj 976 693 r \$0-scaling;
-#X obj 976 715 unpack f f f f f;
-#X floatatom 346 218 5 0 0 2 pow - -, f 5;
-#X obj -194 201 unpack f f f f f;
+#X obj 329 457 r \$0-scaling;
+#X obj 329 479 unpack f f f f f;
+#X obj -193 200 unpack f f f f f f;
+#X obj 54 598 hsl 128 15 0 2 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 56 1;
+#X obj 54 616 hsl 128 15 6000 0 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 0 1;
+#X msg -192 178 0.65 0.2 6000 100 1;
+#X msg 582 380 3000;
+#X floatatom 1080 372 5 0 0 0 - - -, f 5;
+#X obj 1003 410 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 2321 1;
+#X obj 791 432 list-abs/last-x 100;
+#X obj 791 405 line 200;
+#X obj 759 361 pack 0 500;
+#X obj 542 315 < 0.0005;
+#X obj 759 383 t b a;
+#X obj 759 481 f;
+#X obj 101 340 r \$0-hand_dist;
+#X text 284 412 change scale origin to;
+#X text 289 394 when entering control;
+#X text 285 427 current hand_dist;
 #X connect 1 1 4 1;
 #X connect 2 0 1 0;
 #X connect 3 0 4 0;
@@ -167,104 +137,82 @@ max \, camdist min;
 #X connect 8 0 9 0;
 #X connect 9 0 10 0;
 #X connect 9 0 15 0;
-#X connect 10 0 37 0;
-#X connect 10 0 81 0;
+#X connect 10 0 53 0;
 #X connect 13 0 14 0;
 #X connect 14 0 12 0;
 #X connect 15 0 17 0;
 #X connect 15 1 18 0;
 #X connect 16 0 17 0;
-#X connect 17 0 110 0;
-#X connect 18 0 110 0;
+#X connect 17 0 61 0;
+#X connect 18 0 61 0;
 #X connect 19 0 20 0;
-#X connect 20 0 23 0;
-#X connect 20 1 24 0;
-#X connect 21 0 25 0;
-#X connect 23 1 21 0;
-#X connect 23 1 70 0;
-#X connect 24 1 21 1;
-#X connect 25 0 22 0;
-#X connect 25 0 60 0;
-#X connect 25 0 68 0;
-#X connect 27 0 26 0;
-#X connect 28 0 29 0;
-#X connect 35 0 86 0;
-#X connect 37 0 27 0;
-#X connect 37 0 51 0;
-#X connect 37 1 28 0;
-#X connect 41 0 46 0;
-#X connect 42 0 46 1;
-#X connect 43 0 46 2;
-#X connect 44 0 46 3;
-#X connect 45 0 49 0;
-#X connect 46 0 115 0;
-#X connect 49 0 119 0;
-#X connect 50 0 34 0;
-#X connect 51 0 91 0;
-#X connect 51 1 50 0;
-#X connect 52 0 53 0;
-#X connect 53 0 54 0;
-#X connect 54 0 91 1;
-#X connect 56 0 92 0;
-#X connect 57 0 75 0;
-#X connect 57 0 58 0;
-#X connect 59 0 93 0;
-#X connect 59 0 100 0;
-#X connect 61 0 72 0;
-#X connect 62 0 59 0;
-#X connect 63 0 64 0;
-#X connect 66 0 65 0;
-#X connect 66 0 67 0;
+#X connect 20 0 22 0;
+#X connect 20 1 23 0;
+#X connect 21 0 24 0;
+#X connect 22 1 21 0;
+#X connect 23 1 21 1;
+#X connect 24 0 46 0;
+#X connect 24 0 83 0;
+#X connect 30 0 71 0;
+#X connect 30 0 75 0;
+#X connect 34 0 39 0;
+#X connect 35 0 39 1;
+#X connect 36 0 39 2;
+#X connect 37 0 39 3;
+#X connect 38 0 77 0;
+#X connect 39 0 63 0;
+#X connect 42 0 50 0;
+#X connect 42 0 43 0;
+#X connect 44 0 60 0;
+#X connect 44 0 84 0;
+#X connect 45 0 44 0;
+#X connect 47 0 45 1;
+#X connect 47 1 45 0;
+#X connect 50 0 51 0;
+#X connect 50 1 78 0;
+#X connect 51 0 52 0;
+#X connect 52 0 58 0;
+#X connect 53 0 30 1;
+#X connect 53 1 54 1;
+#X connect 54 0 55 0;
+#X connect 55 0 34 0;
+#X connect 55 1 56 0;
+#X connect 56 0 54 1;
+#X connect 57 0 30 0;
+#X connect 57 1 54 0;
+#X connect 58 0 9 0;
+#X connect 59 0 29 0;
+#X connect 62 0 5 1;
+#X connect 64 0 39 4;
+#X connect 65 0 86 1;
+#X connect 66 0 79 0;
+#X connect 68 0 47 0;
 #X connect 69 0 70 0;
-#X connect 72 0 62 1;
-#X connect 72 1 62 0;
-#X connect 75 0 76 0;
-#X connect 75 1 78 0;
-#X connect 76 0 77 0;
-#X connect 77 0 87 0;
-#X connect 78 0 77 0;
-#X connect 79 0 85 0;
-#X connect 80 0 27 1;
-#X connect 81 0 35 1;
-#X connect 81 1 82 1;
-#X connect 82 0 83 0;
-#X connect 83 0 86 1;
-#X connect 83 1 84 0;
-#X connect 84 0 82 1;
-#X connect 85 0 35 0;
+#X connect 70 0 76 0;
+#X connect 70 0 59 0;
+#X connect 71 0 69 0;
+#X connect 71 1 69 1;
+#X connect 71 2 69 2;
+#X connect 72 0 73 0;
+#X connect 73 0 71 1;
+#X connect 73 1 71 2;
+#X connect 73 2 71 3;
+#X connect 73 3 71 4;
+#X connect 73 4 71 5;
+#X connect 74 0 34 0;
+#X connect 74 1 35 0;
+#X connect 74 2 36 0;
+#X connect 74 3 37 0;
+#X connect 74 5 64 0;
+#X connect 77 0 74 0;
+#X connect 78 0 52 0;
+#X connect 81 0 65 0;
+#X connect 82 0 81 0;
+#X connect 83 0 85 0;
+#X connect 84 0 42 0;
+#X connect 85 0 86 0;
 #X connect 85 1 82 0;
-#X connect 86 0 104 0;
-#X connect 87 0 9 0;
-#X connect 88 0 28 1;
-#X connect 91 0 56 1;
-#X connect 92 0 90 0;
-#X connect 92 0 94 0;
-#X connect 93 0 57 0;
-#X connect 95 0 102 0;
-#X connect 96 0 97 0;
-#X connect 97 0 34 0;
-#X connect 98 0 99 0;
-#X connect 99 0 103 0;
-#X connect 102 0 97 0;
-#X connect 102 0 101 0;
-#X connect 103 0 95 0;
-#X connect 104 0 98 0;
-#X connect 105 0 108 0;
-#X connect 107 0 112 0;
-#X connect 108 1 109 0;
-#X connect 112 0 105 0;
-#X connect 112 1 105 1;
-#X connect 112 2 105 2;
-#X connect 113 0 112 5;
-#X connect 114 0 5 1;
-#X connect 116 0 117 0;
-#X connect 117 0 112 1;
-#X connect 117 1 112 2;
-#X connect 117 2 112 3;
-#X connect 117 3 112 4;
-#X connect 117 4 112 5;
-#X connect 119 0 41 0;
-#X connect 119 1 42 0;
-#X connect 119 2 43 0;
-#X connect 119 3 44 0;
+#X connect 86 0 66 0;
+#X connect 86 0 67 0;
+#X connect 87 0 57 0;
 #X coords 0 -1 1 1 330 150 1 100 100;

+ 6 - 5
main.pd

@@ -1,4 +1,4 @@
-#N canvas 102 108 1070 577 10;
+#N canvas 430 127 1070 577 10;
 #X declare -path extra;
 #X obj 42 73 route /pose /bone;
 #X obj 42 51 mrpeach/unpackOSC;
@@ -368,9 +368,9 @@ circle larm ZI;
 #X msg 429 316 /avatar/smoothing \$1 \$2;
 #X obj 429 294 pack f f;
 #X obj 187 194 hsl 100 12 0 1 0 0 empty empty spike 35 6 0 10 -262144
--1 -1 0 1;
+-1 -1 9200 1;
 #X obj 295 194 hsl 100 12 0 1 0 0 empty empty damping 35 6 0 10 -262144
--1 -1 0 1;
+-1 -1 8500 1;
 #X obj 450 270 t b f;
 #X text 105 193 smoothing;
 #X text 113 178 kinect;
@@ -505,7 +505,7 @@ circle larm ZI;
 ;
 #X obj 584 758 -;
 #X obj 543 441 change;
-#X obj 597 442 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+#X obj 597 442 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
 1;
 #X obj 543 392 abs;
 #X msg 813 447 0.144025 0.146754 0.129627 0.1192 0.149782 0.148998
@@ -523,7 +523,7 @@ circle larm ZI;
 #X obj 967 312 abs;
 #X floatatom 1015 322 5 0 0 0 - - -, f 5;
 #X obj 779 344 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
--1 -1 1380 1;
+-1 -1 4540 1;
 #X obj 1032 224;
 #X floatatom 1032 246 5 0 0 0 - - -, f 5;
 #X obj 967 290 t f f;
@@ -903,6 +903,7 @@ max \, camdist min;
 #X obj 42 29 mrpeach/udpreceive 7000;
 #X obj 123 123 bng 15 250 50 0 empty empty clear_poses_list 17 7 0
 10 -262144 -1 -1;
+#X obj 361 390 zoomControl;
 #X connect 0 0 2 0;
 #X connect 0 1 3 0;
 #X connect 1 0 0 0;