Walking man pacing a sqaure
This is a test of animating an inline animation. In my previous walking man blog, I published an x3d file named walkman.x3d. In this blog, I tried to use the inline command to firstly insert the walkman.x3d as a single object (obj_0), then applied animation again onto this object.
The result is very succeesful.
Please note that every x3d file may contain many objects, but when it is inserted using inline command to another virtual world, the whole x3d file is treated as an object only in the new virtual world.
inline command needs an input as the url of the x3d file. You can use the File Browser in My Account to find out the url of your x3d file. As with LOGO syntax, the url is a LOGO word, which begins with a bouble quote but do not end with double quote. For example:
; inline syntax INLINE "/sites/default/files/user/u3/world/walkman.x3d
Below is the LOGO program for this walking man pacing a square.
CS RESET DESELECT ; insert walkman.x3d first INLINE "/sites/default/files/user/u3/world/walkman.x3d MAKE "man "obj_0 MAKE "key [] MAKE "orilist [] QUEUE "orilist ORI MAKE "poslist [] QUEUE "poslist POS REPEAT 4 [ REPEAT 4 [ FD 1 QUEUE "orilist ORI QUEUE "poslist POS ] RT 90 QUEUE "orilist ORI QUEUE "poslist POS ] REPEAT COUNT :poslist [ QUEUE "key ((REPCOUNT) - 1)/21 ] TIMESENSOR "ts1 40 "true ORIINT "rota :key :orilist ROUTE "rt1 "ts1 "fraction_changed "rota "set_fraction ROUTE "rt2 "rota "value_changed :man "rotation TIMESENSOR "ts2 40 "true POSINT "posi :key :poslist ROUTE "rt3 "ts2 "fraction_changed "posi "set_fraction ROUTE "rt4 "posi "value_changed :man "translation ;
Please leave a comment and let me know what you think.
- Andy's blog
- Login or register to post comments
- 4652 reads