added pickups and ornaments

This commit is contained in:
Dave Griffiths 2009-06-29 17:51:32 +01:00
parent 9c8d97369d
commit be2624dcb9
7 changed files with 5751 additions and 90 deletions

582
plant-eyes/meshes/leaf.obj Normal file
View file

@ -0,0 +1,582 @@
# Blender3D v245 OBJ File:
# www.blender3d.org
mtllib leaf.mtl
o Curve_Mesh
v -7.047234 0.038002 -1.022942
v -11.264242 -0.153552 0.126473
v -4.418776 -0.086798 0.940357
v -5.315497 0.031690 -0.180873
v -7.240246 -0.220995 -1.618395
v -2.182297 -0.107477 0.632439
v -3.409689 -0.261848 -1.164152
v -4.445007 -0.246134 0.098749
v -9.527756 -0.227542 0.073376
v -0.966455 -0.140352 0.344434
v -0.514914 -0.130761 -0.144194
v -10.089308 -0.177194 -0.433657
v -8.773151 -0.251968 -0.985874
v -3.055811 -0.194685 -1.287206
v -2.115076 -0.195924 -0.994632
v -9.190776 -0.068906 -0.755511
v -1.264242 -0.094703 0.354177
v -8.191332 -0.206317 -1.387834
v -11.250303 -0.169977 0.096730
v -10.460196 -0.154455 0.348469
v -10.484699 -0.122272 0.392909
v -1.583734 -0.063870 -0.253244
v -7.882478 0.002633 -0.585869
v -9.567028 -0.071077 0.596598
v -4.555383 -0.010973 -1.214781
v -3.045810 -0.036238 0.582160
v -0.045748 -0.157026 0.124692
v -7.553912 -0.149835 0.854059
v -0.734440 -0.182283 -0.330276
v -11.194538 -0.161425 0.102146
v -7.364784 -0.084432 1.008285
v -8.087549 -0.032161 0.813171
v -9.479574 -0.051819 -0.456805
v -6.223495 -0.222975 -1.687431
v -0.095529 -0.154022 0.018498
v -9.110777 -0.194869 -0.985560
v -8.507463 -0.093172 0.906505
v -5.677238 -0.021171 0.857353
v -0.423669 -0.140183 0.154590
v -6.172565 -0.000412 -1.285111
v -0.114633 -0.164471 -0.023272
v -2.054875 -0.076787 -0.785380
v -4.607953 0.010638 -0.665514
v -1.223266 -0.082933 -0.451082
v -2.492149 -0.149623 0.584484
v -7.241049 -0.005272 -1.231458
v -4.720226 -0.234150 -1.586024
v -9.795026 -0.056972 0.020161
v -6.006557 -0.104695 1.029027
v -10.433018 -0.112634 -0.172237
v -7.737690 -0.267488 -0.098576
v -6.915709 -0.282023 -1.321073
v -9.560086 -0.120422 0.710110
v -4.582968 -0.273148 -0.375462
v -1.409677 -0.211992 -0.065779
v -8.244359 -0.023822 -1.047967
v -1.304763 -0.179911 -0.652948
v -2.941688 -0.014249 -0.874392
v -7.930120 0.018277 -0.099790
v -4.630015 -0.187233 -1.576154
vt 0.073696 0.735404 0.0
vt 0.165524 0.824945 0.0
vt 0.126859 0.819596 0.0
vt 0.432079 0.152504 0.0
vt 0.468141 0.246735 0.0
vt 0.451917 0.284359 0.0
vt 0.933161 0.846644 0.0
vt 0.953640 0.666814 0.0
vt 0.966109 0.752129 0.0
vt 0.225048 0.105335 0.0
vt 0.325833 0.000000 0.0
vt 0.272563 0.074501 0.0
vt 0.723034 0.402362 0.0
vt 0.771236 0.117795 0.0
vt 0.808452 0.389397 0.0
vt 0.989735 0.209144 0.0
vt 0.993981 0.132207 0.0
vt 0.994094 0.211236 0.0
vt 0.771236 0.117795 0.0
vt 0.775996 0.001766 0.0
vt 0.844746 0.077571 0.0
vt 0.087523 0.601090 0.0
vt 0.149569 0.745541 0.0
vt 0.073696 0.735404 0.0
vt 0.491164 0.550942 0.0
vt 0.505448 0.416198 0.0
vt 0.577868 0.298306 0.0
vt 0.953640 0.666814 0.0
vt 0.981584 0.649672 0.0
vt 0.966109 0.752129 0.0
vt 0.781201 0.684506 0.0
vt 0.808452 0.389397 0.0
vt 0.953640 0.666814 0.0
vt 0.550453 0.726772 0.0
vt 0.506269 0.641901 0.0
vt 0.624017 0.778365 0.0
vt 0.199788 0.303000 0.0
vt 0.121510 0.377889 0.0
vt 0.222040 0.159944 0.0
vt 0.149569 0.745541 0.0
vt 0.226137 0.899355 0.0
vt 0.165524 0.824945 0.0
vt 0.808452 0.389397 0.0
vt 0.891904 0.213888 0.0
vt 0.981611 0.528022 0.0
vt 0.165524 0.824945 0.0
vt 0.188960 0.892098 0.0
vt 0.126859 0.819596 0.0
vt 0.369372 0.922198 0.0
vt 0.335331 0.970846 0.0
vt 0.371348 0.895527 0.0
vt 0.491164 0.550942 0.0
vt 0.577868 0.298306 0.0
vt 0.558467 0.612467 0.0
vt 0.505448 0.416198 0.0
vt 0.555397 0.266765 0.0
vt 0.577868 0.298306 0.0
vt 0.558467 0.612467 0.0
vt 0.577868 0.298306 0.0
vt 0.723034 0.402362 0.0
vt 0.371348 0.895527 0.0
vt 0.281446 0.962733 0.0
vt 0.261835 0.867033 0.0
vt 0.953640 0.666814 0.0
vt 0.808452 0.389397 0.0
vt 0.981611 0.528022 0.0
vt 0.624017 0.778365 0.0
vt 0.506269 0.641901 0.0
vt 0.558467 0.612467 0.0
vt 0.411957 0.151904 0.0
vt 0.287601 0.298637 0.0
vt 0.307948 0.131599 0.0
vt 0.558467 0.612467 0.0
vt 0.723034 0.402362 0.0
vt 0.781201 0.684506 0.0
vt 0.999896 0.329927 0.0
vt 1.000000 0.403880 0.0
vt 0.988984 0.394929 0.0
vt 0.320351 0.001254 0.0
vt 0.307948 0.131599 0.0
vt 0.272563 0.074501 0.0
vt 0.222040 0.159944 0.0
vt 0.121510 0.377889 0.0
vt 0.116060 0.270683 0.0
vt 0.988866 0.285934 0.0
vt 0.988984 0.403880 0.0
vt 0.981611 0.401927 0.0
vt 0.412210 0.735929 0.0
vt 0.371348 0.895527 0.0
vt 0.261835 0.867033 0.0
vt 0.307948 0.131599 0.0
vt 0.222040 0.159944 0.0
vt 0.272563 0.074501 0.0
vt 0.186781 0.596273 0.0
vt 0.261835 0.867033 0.0
vt 0.226137 0.899355 0.0
vt 0.989735 0.142871 0.0
vt 0.981665 0.285934 0.0
vt 0.981611 0.134656 0.0
vt 0.168125 0.185867 0.0
vt 0.053402 0.275501 0.0
vt 0.125713 0.193078 0.0
vt 0.320351 0.001254 0.0
vt 0.374456 0.069761 0.0
vt 0.307948 0.131599 0.0
vt 0.981611 0.528022 0.0
vt 0.891904 0.213888 0.0
vt 0.961674 0.385950 0.0
vt 0.577868 0.298306 0.0
vt 0.771236 0.117795 0.0
vt 0.723034 0.402362 0.0
vt 0.891904 0.213888 0.0
vt 0.900149 0.186074 0.0
vt 0.961674 0.385950 0.0
vt 0.722069 0.057664 0.0
vt 0.783579 0.000000 0.0
vt 0.771236 0.117795 0.0
vt 0.827369 0.993790 0.0
vt 0.878337 0.929848 0.0
vt 0.826455 0.998792 0.0
vt 0.087523 0.601090 0.0
vt 0.073696 0.735404 0.0
vt 0.020980 0.594480 0.0
vt 0.988937 0.000000 0.0
vt 0.989735 0.142871 0.0
vt 0.981611 0.134656 0.0
vt 0.083485 0.360573 0.0
vt 0.000000 0.451794 0.0
vt 0.012067 0.360723 0.0
vt 0.274111 0.532812 0.0
vt 0.261835 0.867033 0.0
vt 0.186781 0.596273 0.0
vt 0.451917 0.284359 0.0
vt 0.274111 0.532812 0.0
vt 0.287601 0.298637 0.0
vt 0.121510 0.377889 0.0
vt 0.083485 0.360573 0.0
vt 0.116060 0.270683 0.0
vt 0.827369 0.993790 0.0
vt 0.869953 0.927715 0.0
vt 0.878337 0.929848 0.0
vt 0.307948 0.131599 0.0
vt 0.199788 0.303000 0.0
vt 0.222040 0.159944 0.0
vt 0.817231 0.844578 0.0
vt 0.953640 0.666814 0.0
vt 0.933161 0.846644 0.0
vt 0.605709 0.182150 0.0
vt 0.722069 0.057664 0.0
vt 0.577868 0.298306 0.0
vt 0.475928 0.612900 0.0
vt 0.421102 0.813253 0.0
vt 0.412210 0.735929 0.0
vt 0.307948 0.131599 0.0
vt 0.287601 0.298637 0.0
vt 0.199788 0.303000 0.0
vt 0.487029 0.349050 0.0
vt 0.460932 0.500211 0.0
vt 0.451917 0.284359 0.0
vt 0.432079 0.152504 0.0
vt 0.451917 0.284359 0.0
vt 0.411957 0.151904 0.0
vt 0.451917 0.284359 0.0
vt 0.460932 0.500211 0.0
vt 0.274111 0.532812 0.0
vt 0.186781 0.596273 0.0
vt 0.121510 0.377889 0.0
vt 0.199788 0.303000 0.0
vt 0.555397 0.266765 0.0
vt 0.605709 0.182150 0.0
vt 0.577868 0.298306 0.0
vt 0.577868 0.298306 0.0
vt 0.722069 0.057664 0.0
vt 0.771236 0.117795 0.0
vt 0.261835 0.867033 0.0
vt 0.281446 0.962733 0.0
vt 0.226137 0.899355 0.0
vt 0.727727 0.895507 0.0
vt 0.625492 0.808590 0.0
vt 0.624017 0.778365 0.0
vt 0.832011 1.000000 0.0
vt 0.817231 0.844578 0.0
vt 0.869953 0.927715 0.0
vt 0.997389 0.211236 0.0
vt 0.997132 0.285934 0.0
vt 0.989735 0.216661 0.0
vt 0.371348 0.895527 0.0
vt 0.335331 0.970846 0.0
vt 0.281446 0.962733 0.0
vt 0.624017 0.778365 0.0
vt 0.558467 0.612467 0.0
vt 0.781201 0.684506 0.0
vt 0.487029 0.349050 0.0
vt 0.491164 0.470685 0.0
vt 0.460932 0.500211 0.0
vt 0.121510 0.377889 0.0
vt 0.074265 0.456274 0.0
vt 0.083485 0.360573 0.0
vt 0.226137 0.899355 0.0
vt 0.281446 0.962733 0.0
vt 0.247398 0.943110 0.0
vt 0.074265 0.456274 0.0
vt 0.087523 0.601090 0.0
vt 0.020980 0.594480 0.0
vt 0.953640 0.666814 0.0
vt 0.981611 0.528022 0.0
vt 0.981584 0.649672 0.0
vt 0.421102 0.813253 0.0
vt 0.371348 0.895527 0.0
vt 0.412210 0.735929 0.0
vt 0.287601 0.298637 0.0
vt 0.186781 0.596273 0.0
vt 0.199788 0.303000 0.0
vt 0.149569 0.745541 0.0
vt 0.121510 0.377889 0.0
vt 0.186781 0.596273 0.0
vt 0.869953 0.927715 0.0
vt 0.817231 0.844578 0.0
vt 0.933161 0.846644 0.0
vt 0.165524 0.824945 0.0
vt 0.226137 0.899355 0.0
vt 0.188960 0.892098 0.0
vt 0.832011 1.000000 0.0
vt 0.624017 0.778365 0.0
vt 0.817231 0.844578 0.0
vt 0.625492 0.808590 0.0
vt 0.550453 0.726772 0.0
vt 0.624017 0.778365 0.0
vt 0.121510 0.377889 0.0
vt 0.149569 0.745541 0.0
vt 0.087523 0.601090 0.0
vt 0.891904 0.213888 0.0
vt 0.844746 0.077571 0.0
vt 0.900149 0.186074 0.0
vt 0.374456 0.069761 0.0
vt 0.411957 0.151904 0.0
vt 0.307948 0.131599 0.0
vt 0.468141 0.246735 0.0
vt 0.487029 0.349050 0.0
vt 0.451917 0.284359 0.0
vt 0.116060 0.270683 0.0
vt 0.083485 0.360573 0.0
vt 0.012067 0.360723 0.0
vt 0.287601 0.298637 0.0
vt 0.274111 0.532812 0.0
vt 0.186781 0.596273 0.0
vt 0.412210 0.735929 0.0
vt 0.261835 0.867033 0.0
vt 0.274111 0.532812 0.0
vt 0.997368 0.021671 0.0
vt 0.989735 0.066319 0.0
vt 0.989804 0.000000 0.0
vt 0.186781 0.596273 0.0
vt 0.226137 0.899355 0.0
vt 0.149569 0.745541 0.0
vt 0.149569 0.745541 0.0
vt 0.165524 0.824945 0.0
vt 0.073696 0.735404 0.0
vt 0.475928 0.612900 0.0
vt 0.412210 0.735929 0.0
vt 0.460932 0.500211 0.0
vt 0.374456 0.069761 0.0
vt 0.432079 0.152504 0.0
vt 0.411957 0.151904 0.0
vt 0.723034 0.402362 0.0
vt 0.808452 0.389397 0.0
vt 0.781201 0.684506 0.0
vt 0.891904 0.213888 0.0
vt 0.771236 0.117795 0.0
vt 0.844746 0.077571 0.0
vt 0.832011 1.000000 0.0
vt 0.727727 0.895507 0.0
vt 0.624017 0.778365 0.0
vt 0.844746 0.077571 0.0
vt 0.775996 0.001766 0.0
vt 0.809104 0.029208 0.0
vt 0.781201 0.684506 0.0
vt 0.953640 0.666814 0.0
vt 0.817231 0.844578 0.0
vt 0.460932 0.500211 0.0
vt 0.412210 0.735929 0.0
vt 0.274111 0.532812 0.0
vt 0.083485 0.360573 0.0
vt 0.074265 0.456274 0.0
vt 0.000000 0.451794 0.0
vt 0.121510 0.377889 0.0
vt 0.087523 0.601090 0.0
vt 0.074265 0.456274 0.0
vt 0.998698 0.452229 0.0
vt 0.981611 0.415805 0.0
vt 0.998710 0.403880 0.0
vt 0.222040 0.159944 0.0
vt 0.116060 0.270683 0.0
vt 0.168125 0.185867 0.0
vt 0.272563 0.074501 0.0
vt 0.168125 0.185867 0.0
vt 0.125713 0.193078 0.0
vt 0.272563 0.074501 0.0
vt 0.125713 0.193078 0.0
vt 0.225048 0.105335 0.0
vt 0.491164 0.470685 0.0
vt 0.475928 0.612900 0.0
vt 0.460932 0.500211 0.0
vt 0.226137 0.899355 0.0
vt 0.247398 0.943110 0.0
vt 0.188960 0.892098 0.0
vt 0.506269 0.641901 0.0
vt 0.491164 0.550942 0.0
vt 0.558467 0.612467 0.0
vt 0.808452 0.389397 0.0
vt 0.771236 0.117795 0.0
vt 0.891904 0.213888 0.0
vt 0.605709 0.182150 0.0
vt 0.665379 0.109148 0.0
vt 0.722069 0.057664 0.0
vt 0.869953 0.927715 0.0
vt 0.933161 0.846644 0.0
vt 0.878337 0.929848 0.0
vt 0.272563 0.074501 0.0
vt 0.222040 0.159944 0.0
vt 0.168125 0.185867 0.0
vt 0.624017 0.778365 0.0
vt 0.781201 0.684506 0.0
vt 0.817231 0.844578 0.0
vt 0.421102 0.813253 0.0
vt 0.369372 0.922198 0.0
vt 0.371348 0.895527 0.0
vt 0.074265 0.456274 0.0
vt 0.020980 0.594480 0.0
vt 0.000000 0.451794 0.0
vt 0.116060 0.270683 0.0
vt 0.012067 0.360723 0.0
vt 0.053402 0.275501 0.0
vt 0.335331 0.970846 0.0
vt 0.303178 0.998558 0.0
vt 0.281446 0.962733 0.0
vt 0.411957 0.151904 0.0
vt 0.451917 0.284359 0.0
vt 0.287601 0.298637 0.0
vt 0.168125 0.185867 0.0
vt 0.116060 0.270683 0.0
vt 0.053402 0.275501 0.0
vn 0.229713 -0.054811 -0.971679
vn 0.137211 0.913755 -0.382305
vn 0.332560 -0.254799 -0.907987
vn -0.260170 -0.135258 0.956023
vn -0.132084 0.036134 0.990570
vn -0.044343 0.966277 0.253639
vn -0.017518 -0.961547 0.273995
vn -0.457320 -0.139866 -0.878201
vn -0.380200 -0.439863 -0.813593
vn 0.026948 0.942564 0.332896
vn 0.008118 -0.999603 0.026246
vn 0.061892 -0.490005 -0.869503
vn 0.008698 -0.994049 0.108432
vn 0.575182 0.641591 0.507431
vn 0.401715 -0.230140 0.886349
vn 0.267678 -0.234413 0.934538
vn 0.039064 0.961119 -0.273263
vn 0.061007 0.980590 -0.186193
vn 0.014130 -0.199500 -0.979766
vn 0.095035 -0.655446 -0.749199
vn 0.038697 -0.990173 -0.134190
vn -0.050539 0.120670 0.991394
vn -0.007935 -0.997986 0.062502
vn -0.326182 -0.139378 -0.934935
vn -0.153294 -0.167821 -0.973815
vn -0.145909 -0.951231 -0.271706
vn -0.015473 0.999756 0.015046
vn -0.015900 0.998169 -0.057955
vn -0.070009 0.994873 -0.072909
vn 0.150792 0.953856 -0.259529
vn 0.037690 -0.956816 0.288186
vn 0.018769 -0.232734 0.972350
vn 0.437483 -0.142857 -0.887783
vn 0.382458 0.287881 0.877957
vn 0.097903 0.956420 0.274972
vn -0.011780 -0.995941 -0.088931
vn 0.494278 0.350902 -0.795312
vn 0.038759 0.999237 -0.002350
vn -0.082675 0.968963 0.232856
vn -0.019471 0.999786 -0.000031
vn -0.056246 0.998413 0.001038
vn 0.447035 0.426313 -0.786370
vn 0.452223 0.320109 -0.832453
vn -0.135990 -0.116459 -0.983825
vn -0.105533 0.948759 -0.297830
vn 0.040315 0.982269 0.183050
vn 0.012146 0.999847 0.011628
vn 0.109745 0.472030 -0.874691
vn -0.179693 0.915586 -0.359722
vn -0.446181 -0.131138 -0.885250
vn -0.264962 -0.343577 0.900937
vn 0.096591 0.071230 0.992767
vn 0.187231 0.124241 0.974395
vn -0.180456 -0.725211 0.664418
vn -0.051332 0.938719 -0.340800
vn 0.005219 0.999969 0.004639
vn -0.296854 -0.361522 0.883816
vn -0.028596 -0.996551 0.077853
vn 0.009278 0.965728 0.259285
vn 0.000427 0.950407 -0.310923
usemtl (null)
s 1
f 14/1/1 42/2/2 15/3/3
f 53/4/4 37/5/5 32/6/6
f 53/7/4 28/8/7 37/9/5
f 12/10/8 2/11/9 50/12/10
f 54/13/11 55/14/12 8/15/13
f 19/16/14 50/17/10 2/18/9
f 55/19/12 41/20/15 10/21/16
f 25/22/17 58/23/18 14/24/1
f 34/25/19 47/26/20 7/27/21
f 28/28/7 31/29/22 37/30/5
f 51/31/23 8/32/13 28/33/7
f 18/34/24 5/35/25 13/36/26
f 23/37/27 1/38/28 33/39/29
f 58/40/18 44/41/30 42/42/2
f 8/43/13 45/44/31 49/45/32
f 42/46/2 57/47/33 15/48/3
f 10/49/16 39/50/34 17/51/35
f 34/52/19 7/53/21 52/54/36
f 47/55/20 14/56/1 7/57/21
f 52/58/36 7/59/21 54/60/11
f 17/61/35 11/62/37 22/63/38
f 28/64/7 8/65/13 49/66/32
f 13/67/26 5/68/25 52/69/36
f 24/70/39 59/71/40 48/72/41
f 52/73/36 54/74/11 51/75/23
f 29/76/42 27/77/43 35/78/44
f 19/79/14 48/80/41 50/81/10
f 33/82/29 1/83/28 56/84/45
f 55/85/12 35/86/44 41/87/15
f 26/88/46 17/89/35 22/90/38
f 48/91/41 33/92/29 50/93/10
f 43/94/47 22/95/38 44/96/30
f 60/97/48 14/98/1 47/99/20
f 16/100/49 18/101/24 36/102/50
f 19/103/14 21/104/51 48/105/41
f 49/106/32 45/107/31 3/108/52
f 7/109/21 55/110/12 54/111/11
f 45/112/31 6/113/53 3/114/52
f 29/115/42 35/116/44 55/117/12
f 30/118/54 21/119/51 19/120/14
f 25/121/17 14/122/1 60/123/48
f 34/124/19 60/125/48 47/126/20
f 46/127/55 34/128/19 5/129/25
f 4/130/56 22/131/38 43/132/47
f 32/133/6 4/134/56 59/135/40
f 1/136/28 46/137/55 56/138/45
f 30/139/54 20/140/57 21/141/51
f 48/142/41 23/143/27 33/144/29
f 9/145/58 28/146/7 53/147/4
f 15/148/3 29/149/42 7/150/21
f 3/151/52 6/152/53 26/153/46
f 48/154/41 59/155/40 23/156/27
f 31/157/22 38/158/59 32/159/6
f 53/160/4 32/161/6 24/162/39
f 32/163/6 38/164/59 4/165/56
f 43/166/47 1/167/28 23/168/27
f 14/169/1 15/170/3 7/171/21
f 7/172/21 29/173/42 55/174/12
f 22/175/38 11/176/37 44/177/30
f 12/178/8 36/179/50 13/180/26
f 2/181/9 9/182/58 20/183/57
f 2/184/9 20/185/57 30/186/54
f 17/187/35 39/188/34 11/189/37
f 13/190/26 52/191/36 51/192/23
f 31/193/22 49/194/32 38/195/59
f 1/196/28 40/197/60 46/198/55
f 44/199/30 11/200/37 29/201/42
f 40/202/60 25/203/17 60/204/48
f 28/205/7 49/206/32 31/207/22
f 6/208/53 17/209/35 26/210/46
f 59/211/40 43/212/47 23/213/27
f 58/214/18 1/215/28 43/216/47
f 20/217/57 9/218/58 53/219/4
f 42/220/2 44/221/30 57/222/33
f 2/223/9 13/224/26 9/225/58
f 36/226/50 18/227/24 13/228/26
f 1/229/28 58/230/18 25/231/17
f 45/232/31 10/233/16 6/234/53
f 21/235/51 24/236/39 48/237/41
f 37/238/5 31/239/22 32/240/6
f 56/241/45 46/242/55 5/243/25
f 59/244/40 4/245/56 43/246/47
f 26/247/46 22/248/38 4/249/56
f 11/250/37 27/251/43 29/252/42
f 43/253/47 44/254/30 58/255/18
f 58/256/18 42/257/2 14/258/1
f 3/259/52 26/260/46 38/261/59
f 21/262/51 53/263/4 24/264/39
f 54/265/11 8/266/13 51/267/23
f 45/268/31 55/269/12 10/270/16
f 2/271/9 12/272/8 13/273/26
f 10/274/16 41/275/15 39/276/34
f 51/277/23 28/278/7 9/279/58
f 38/280/59 26/281/46 4/282/56
f 46/283/55 40/284/60 34/285/19
f 1/286/28 25/287/17 40/288/60
f 11/289/37 41/290/15 27/291/43
f 33/292/29 56/293/45 16/294/49
f 50/295/10 16/296/49 36/297/50
f 50/298/10 36/299/50 12/300/8
f 49/301/32 3/302/52 38/303/59
f 44/304/30 29/305/42 57/306/33
f 5/307/25 34/308/19 52/309/36
f 8/310/13 55/311/12 45/312/31
f 15/313/3 57/314/33 29/315/42
f 20/316/57 53/317/4 21/318/51
f 50/319/10 33/320/29 16/321/49
f 13/322/26 51/323/23 9/324/58
f 6/325/53 10/326/16 17/327/35
f 40/328/60 60/329/48 34/330/19
f 56/331/45 5/332/25 18/333/24
f 39/334/34 41/335/15 11/336/37
f 24/337/39 32/338/6 59/339/40
f 16/340/49 56/341/45 18/342/24

2922
plant-eyes/meshes/pickup.obj Normal file

File diff suppressed because it is too large Load diff

1907
plant-eyes/meshes/wiggle.obj Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
;#lang scheme/base
;(require fluxus-016/drflux)
#lang scheme/base
(require fluxus-016/drflux)
(require scheme/class)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -45,6 +45,25 @@
(define default-scale-factor 1.05)
(define default-grow-speed 1)
(define root-camera-time (* default-max-twigs logic-tick))
(define num-pickups 100)
(define pickup-dist-radius 20)
(define pickup-size 1)
(define max-ornaments 2) ; per twig
(define ornament-grow-probability 4)
(define (ornament-colour) (vector 0.5 1 0.4))
(define (pickup-colour) (vector 1 1 1))
(define (assoc-remove k l)
(cond
((null? l) '())
((eq? (car (car l)) k)
(assoc-remove k (cdr l)))
(else
(cons (car l) (assoc-remove k (cdr l))))))
(define (choose l)
(list-ref l (random (length l))))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; a message for sending betwixt logic and render side
@ -93,7 +112,7 @@
(set! messages '())
(append
m
(flatten (inner (void) update))))) ; the augmented method gets called here
(flatten (inner '() update))))) ; the augmented method gets called here
(super-new)))
@ -148,6 +167,9 @@
(define/public (get-point point-index)
(list-ref points point-index))
(define/public (get-length)
(length points))
(define/public (scale a)
(set! width (* width a))
(set! dist (* dist a)))
@ -196,12 +218,19 @@
(define/public (get-twig point-index)
(cadr (assq point-index twigs)))
(define/public (get-random-twig)
(if (or (null? twigs) (zero? (random 10)))
this
(send (cadr (choose twigs)) get-random-twig)))
(define/public (add-ornament point-index ornament)
; todo - check max ornaments
(send-message 'new-ornament
(list
(send plant get-id)
id
point-index))
(list 'plant-id (send plant get-id))
(list 'twig-id id)
(list 'point-index point-index)
(list 'property (send ornament get-property))))
(set! ornaments (cons (list point-index ornament) ornaments)))
(define/public (get-ornament point-index)
@ -209,14 +238,19 @@
; adds the ornament if it's close, and checks sub-twigs
; returns true if it's succeded
(define/public (check/add-ornament pickup)
; check each point in our twig
(let ((found (foldl
(define/public (check-pickup pickup)
; check each point in our twig
(let* ((i -1) (found (foldl
(lambda (point found)
(set! i (+ i 1))
; if we havent found anything yet and it's intersecting
(cond ((and (not found) (< (vdist point (send pickup get-pos))
(+ width (send pickup get-size))))
(add-ornament (send pickup create-ornament plant))
(send plant add-property (send pickup get-type))
(send pickup pick-up) ; this will remove the pickup for us
(send-message 'pick-up-pickup
(list
(list 'pickup-id (send pickup get-id))))
#t)
(else #f)))
#f
@ -226,7 +260,7 @@
(foldl
(lambda (twig found)
(if (not found)
(send twig check/add-ornament)
(send (cadr twig) check-pickup pickup)
#f))
#f
twigs)
@ -236,7 +270,7 @@
(append
(map
(lambda (ornament)
(send ornament update))
(send (cadr ornament) update))
ornaments)
(map
(lambda (twig)
@ -251,6 +285,8 @@
(define ornament-logic%
(class game-logic-object%
(init-field
(id -1)
(property 'none)
(plant #f) ; the plant we belong to
(twig #f) ; the twig we are on
(point-index -1)) ; the index to the point on our twig
@ -258,6 +294,9 @@
(field
(pos (send twig get-point point-index))) ; figure out the position here
(define/public (get-property)
property)
(define/public (get-pos)
pos)
@ -268,17 +307,32 @@
; this is the base class for all pickups.
(define pickup-logic%
(class game-logic-object%
(field
(init-field
(id -1)
(type 'none)
(pos (vector 0 0 0)))
(field
(size pickup-size)
(picked-up #f))
(define/public (picked-up?)
picked-up)
(define/public (pick-up)
(set! picked-up #t))
(define/public (get-id)
id)
(define/public (get-type)
type)
(define/public (get-pos)
pos)
; converts pickup->ormament
; override this
(define/public (create-ornament plant)
(make-object ornament-logic% plant)) ; todo twig/point-index???
(define/public (get-size)
size)
(super-new)))
@ -292,9 +346,12 @@
(field
(twigs '()) ; a assoc list map of ages to twigs
(properties '(wiggle)) ; a list of symbols - properties come from pickups
(ornaments '()) ; map of ids to ornaments on the plant
(size 1) ; the age of this plant
(max-twigs default-max-twigs) ; the maximum twigs allowed at any time - oldest removed first
(next-twig-id 0)
(next-ornament-id 0)
(grow-amount default-scale-factor))
(inherit send-message)
@ -311,17 +368,26 @@
(send twig grow))
twigs))
(define/public (add-property name)
(set! properties (cons name properties)))
; we need to maintain our list of twig ids here, for this plant
(define/public (get-next-twig-id)
(let ((id next-twig-id))
(set! next-twig-id (+ next-twig-id 1))
next-twig-id))
; we need to maintain our list of ornament ids here, for this plant
(define/public (get-next-ornament-id)
(let ((id next-ornament-id))
(set! next-ornament-id (+ next-ornament-id 1))
next-ornament-id))
(define/public (check/add-ornament pickup)
(define/public (check-pickup pickup)
(foldl
(lambda (twig found)
(if (not found)
(send twig check/add-ornament pickup)
(send twig check-pickup pickup)
#f))
#f
twigs))
@ -362,8 +428,35 @@
))
(set! twigs (cons-twig twig twigs max-twigs '())))
(define/augment (update)
(define/public (get-random-twig)
(if (not (null? twigs))
(send (choose twigs) get-random-twig)
#f))
(define/augment (update)
; grow a new ornament?
(when (and (not (null? properties)) (zero? (random ornament-grow-probability)))
(let ((twig (get-random-twig)))
(when twig
(let
((property (choose properties))
(point-index (random (send twig get-length))))
(send twig add-ornament point-index
(cond
((or
(eq? property 'leaf)
(eq? property 'wiggle))
(make-object ornament-logic%
(get-next-ornament-id)
property
this
twig
point-index))
(else (error "unkown property ~a~n" property))))))))
(map
(lambda (twig)
(send twig update))
@ -381,6 +474,11 @@
(inherit send-message)
(define/public (setup)
(for ((i (in-range 0 num-pickups)))
(add-pickup (make-object pickup-logic% i (choose (list 'leaf 'wiggle))
(vmul (srndvec) pickup-dist-radius)))))
(define/public (add-player plant)
(send-message 'player-plant (list
(list 'plant-id (send plant get-id))
@ -393,20 +491,33 @@
(list 'pos (send plant get-pos))))
(set! plants (cons plant plants)))
(define/public (add-pickups pickup)
(define/public (add-pickup pickup)
(send-message 'new-pickup
(list
(list 'pickup-id (send pickup get-id))
(list 'type (send pickup get-type))
(list 'pos (send pickup get-pos))))
(set! pickups (cons pickup pickups)))
; todo - distribute the checking of stuff like
; this to a random selection of pickups/plants
; to distribute the cpu load
(define/augment (update)
(define/augment (update)
(for-each
(lambda (pickup)
(for-each
(lambda (plant)
(send plant check/add-ormament pickup))
(send plant check-pickup pickup))
plants))
pickups)
; remove the pickups that have been 'picked up'
(set! pickups (filter
(lambda (pickup)
(not (send pickup picked-up?)))
pickups))
(map
(lambda (plant)
(send plant update))
@ -417,6 +528,163 @@
;==============================================================================
;==============================================================================
(define ornament-view%
(class object%
(init-field
(pos (vector 0 0 0))
(property 'none)
(time 0))
(field
(rot (vmul (rndvec) 360))
(root (with-state
(translate pos)
(rotate rot)
(scale 0.01)
(cond
((eq? property 'wiggle)
; (opacity 1)
(hint-depth-sort)
(colour (vector 0.5 0.0 0.0))
(load-primitive "meshes/wiggle.obj"))
((eq? property 'leaf)
(colour (vector 0.8 1 0.6))
(texture (load-texture "textures/leaf2.png"))
(load-primitive "meshes/leaf.obj"))))))
(define/public (update t d)
(when (< time 1)
(with-primitive root
(identity)
(translate pos)
(rotate rot)
(scale (* 0.2 time)))
(set! time (+ time (* 0.1 d)))))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define pickup-view%
(class object%
(init-field
(id -1)
(type 'none)
(pos (vector 0 0 0)))
(field
(rot (vmul (rndvec) 360))
(root (with-state
(translate pos)
(rotate rot)
(colour (pickup-colour))
(scale 0.3)
(texture
(cond
((eq? type 'wiggle) (load-texture "textures/wiggle.png"))
((eq? type 'leaf) (load-texture "textures/leaf.png"))))
(load-primitive "meshes/pickup.obj")))
(from pos)
(destination (vector 0 0 0))
(speed 0.05)
(t -1))
(define/public (pick-up)
(destroy root))
(define/public (move-to s)
(set! t 0)
(set! from pos)
(set! destination s))
(define/public (update t d)
(with-primitive root
(rotate (vector (* d 10) 0 0)))
#;(when (and (>= t 0) (< t 1))
(set! pos (vadd pos (vmul (vsub destination from) speed)))
(with-primitive root
(identity)
(translate pos)
(rotate rot))
(set! t (+ t speed))))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define twig-view%
(class object%
(init-field
(id 0)
(pos (vector 0 0 0))
(type 'none)
(dir (vector 0 1 0))
(radius 1)
(num-points 0))
(field
(index 0)
(parent-twig-id -1)
(child-twig-ids '())
(ornaments '()))
(define/public (get-id)
id)
(define/public (get-dir)
dir)
(define/public (build)
0)
(define/public (set-pos! s)
(set! pos s))
(define/public (get-child-twig-ids)
child-twig-ids)
(define/public (get-root)
(error "need to overide this"))
(define/public (destroy-twig)
(destroy (get-root)))
(define/public (set-parent-twig-id s)
(set! parent-twig-id s))
(define/public (get-point point-index)
(error "need to overide this"))
(define/public (add-child-twig-id twig-id)
(set! child-twig-ids (cons twig-id child-twig-ids)))
(define/public (grow point)
(error "need to override this"))
(define/public (add-ornament point-index property)
(when (< (length ornaments) max-ornaments)
(with-state
(parent (get-root))
; todo - different ornament-view objects per property needed?
; todo - delete existing ornaments here
(set! ornaments (cons (list point-index
(make-object ornament-view%
(get-point point-index)
property))
ornaments)))))
(define/pubment (update t d)
(for-each
(lambda (ornament)
(send (cadr ornament) update t d))
ornaments)
(inner (void) update t d))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; extrusion code
(define (draw-profile index profile offset)
@ -583,61 +851,6 @@
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define twig-view%
(class object%
(init-field
(id 0)
(pos (vector 0 0 0))
(type 'none)
(dir (vector 0 1 0))
(radius 1)
(num-points 0))
(field
(index 0)
(parent-twig-id -1)
(child-twig-ids '()))
(define/public (get-id)
id)
(define/public (get-dir)
dir)
(define/public (build)
0)
(define/public (set-pos! s)
(set! pos s))
(define/public (get-child-twig-ids)
child-twig-ids)
(define/public (get-root)
(error "need to overide this"))
(define/public (destroy-twig)
(destroy (get-root)))
(define/public (set-parent-twig-id s)
(set! parent-twig-id s))
(define/public (get-point point-index)
(error "need to overide this"))
(define/public (add-child-twig-id twig-id)
(set! child-twig-ids (cons twig-id child-twig-ids)))
(define/public (grow point)
(error "need to override this"))
(define/public (update t d)
(error "need to override this"))
(super-new)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define ribbon-twig-view%
(class twig-view%
@ -684,7 +897,7 @@
"w"))
(set! index (+ index 1)))
(define/override (update t d)
(define/augment (update t d)
0)
(super-new)))
@ -733,7 +946,7 @@
(set! v (partial-extrude root index v profile path))
(set! index (+ index 1)))
(define/override (update t d)
(define/augment (update t d)
(when (< anim-t 1)
(set! v (partial-extrude root (+ (- index 1) anim-t) v profile path)))
(set! anim-t (+ anim-t (* d grow-speed))))
@ -782,14 +995,6 @@
(parent root))
(send twig build)
(set! twigs (cons (list (send twig get-id) twig) twigs)))
(define (assoc-remove k l)
(cond
((null? l) '())
((eq? (car (car l)) k)
(assoc-remove k (cdr l)))
(else
(cons (car l) (assoc-remove k (cdr l))))))
(define/public (destroy-branch-twig twig-id)
(for-each
@ -820,6 +1025,9 @@
(define/public (grow-seed amount)
(with-primitive seed (scale amount)))
(define/public (add-ornament twig-id point-index property)
(send (get-twig twig-id) add-ornament point-index property))
(define/public (update t d)
(with-primitive seed
@ -876,10 +1084,13 @@
(build-plane))
p)))
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(define game-view%
(class object%
(field
(plants '()) ; map of ids -> plants
(pickups '()) ; map of ids -> pickups
(camera (build-locator))
(player-plant-id #f)
(current-twig-id #f)
@ -959,12 +1170,30 @@
#;(fog (vector 0.2 0.5 0.3) (* 0.01 (* amount amount amount)) 1 100))
(send (get-plant plant-id) grow-seed amount))
(define/public (get-pickup pickup-id)
(cadr (assq pickup-id pickups)))
(define/public (add-pickup pickup-id type pos)
(set! pickups (cons (list pickup-id (make-object pickup-view% pickup-id type pos)) pickups)))
(define/public (pick-up-pickup pickup-id)
(send (get-pickup pickup-id) pick-up)
(set! pickups (assoc-remove pickup-id pickups)))
(define/public (add-ornament plant-id twig-id point-index property)
(send (get-plant plant-id) add-ornament twig-id point-index property))
(define/public (update t d messages)
(for-each
(lambda (plant)
(send (cadr plant) update t d))
plants)
(for-each
(lambda (pickup)
(send (cadr pickup) update t d))
pickups)
(if current-twig-id
(let ((twig (send (get-player) get-twig current-twig-id)))
@ -1058,6 +1287,23 @@
(send msg get-data 'twig-id)
(send msg get-data 'point)))
((eq? (send msg get-name) 'new-pickup)
(add-pickup
(send msg get-data 'pickup-id)
(send msg get-data 'type)
(send msg get-data 'pos)))
((eq? (send msg get-name) 'pick-up-pickup)
(pick-up-pickup
(send msg get-data 'pickup-id)))
((eq? (send msg get-name) 'new-ornament)
(add-ornament
(send msg get-data 'plant-id)
(send msg get-data 'twig-id)
(send msg get-data 'point-index)
(send msg get-data 'property)))
))
messages))
@ -1075,6 +1321,7 @@
(define gv (make-object game-view%))
(send gv setup)
(send gl setup)
(define plant1 (make-object plant-logic% "dave@fo.am" (vector 0 0 0)))
(define plant2 (make-object plant-logic% "plant00001@fo.am" (vector 0 0 9)))
@ -1115,4 +1362,7 @@
(send gv update (pe-time) (pe-delta) '())
(pt-update))
#;(for ((i (in-range 0 10000)))
(animate))
(every-frame (animate))

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB