Flying boxes
In Web3D '17 Conference, James showed me how to do particle effect in Unity, which is very very cool. Then I thought that I may be able to create similar effect in my VRMath2 Editor. It turned out that it is quite easy to program in VRMath2, but of course the visual is not as good as in Unity. The simple codes, however, may be worth seeing, so here we go.
Here is the 300 flying boxes virtual world, feel free to have a play.
And the Logo program is posted below:
; 300 cubes flying ; By Andy Yeh (2017) CS RESET SETBG 34 REPEAT 300 [ ; loop ; get a random transparent material SETMAT 2 RANDOM 36 BOX ; get a random direction in 3D space RT RANDOM 360 TL RANDOM 360 RU RANDOM 360 ; collect two points in variable :value MAKE "value [] QUEUE "value POS FD 50 QUEUE "value POS BK 50 ; animate the box TRAVEL OBJECT :value (RANDOM 60)+20 ]
You may copy the codes above and paste in VRMath2 Editor's Logo Editor to run, or you can simply open the Logo program in VRMath2 Editor. There is another 100 flying balls in the public folder. This 300 boxes seem to fly smoother than the 100 balls.
The files are also here in case the program was delete by someone. Please leave a comment below and let me know what you think.
- Andy's blog
- Login or register to post comments
- 5973 reads