![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
ReAnimator3D consists of two separate modules. You can find a reference guide for both on this site... In addition to the reference guide below, please also have a look at techniques used in the supplied demo movie. The player consists of 2 lingo parent scripts. The main class has a comprehensive API to make its implementation as easy and flexible as possible. Here's a list of its public methods: new(3Dmember, 3DModel, motionData [,frameBased] ) Creates a new RA3D player instance. gPlayer=script("pLBP").new( member("3d"), member("3d").model("walkbot"), "motiondata" ) gPlayer=script("pLBP").new( member("3d"), member("3d").model("walkbot"), "motiondata", true ) cleanUp() Frees up all resources used by the player instance. Call only, if you don't need the instance anymore. All other player methods called after this will result in a Lingo error. gPlayer.cleanup() getStatus() Returns details of current player status. The state field can have these values: #PLAYING, #PAUSED, #FINISHED put gPlayer.getStatus() -- [#currentMotion: #running, #state: #playing, #currentFrame: 23, #loop: 1, #loop_start: 10, #loop_end: 40, #version: 1.00] getMotionList() Returns a list of all motion names. put gPlayer.getMotionList() -- [#running, #stand, #crouching, #sit] play(MotionName) Plays a specified motion from frame 1 gPlayer.play(#running) play({frameNumber}) Continues playback of the currently active motion. If the optional frame number is specified, playback will continue at this frame. If the motion has looping turned on and the frame number parameter is greater than the loop end frame, playback will continue at the loop start frame. gPlayer.play() gPlayer.play(23) pause() Pauses playback of the current motion gPlayer.pause() queue(MotionName) Queues playback of specified motion. The new motion starts as soon as current motion is finished/completed. Calling this function automatically turns off looping of currently played back motion (only for this instance. the original loop setting will be saved!) gPlayer.queue(#crouch) Note: Motion blending is not yet implemented. This will be focus of the first update. setLoop(propList) Set new loop parameters for specified motion. These setting are made permanent. gPlayer.setLoop([#motion: #running, #loop: true, #loop_start: 30, #loop_end: 40]) setRate(float) Motions can be played back at different speeds. Use this command to set the currently active speed (1.0 = normal speed, 2.0 = double speed etc.) Using extrem values might cause strange behaviours in the playback. Furthermore only positive values >0 are allowed, motions cannot be played backwards. gPlayer.setLoop([#motion: #running, #loop: true, #loop_start: 30, #loop_end: 40]) lockBone(boneName) Locks the specified bone and excludes it from any keyframe animation. This is very useful to create semi-interactive animations. A locked bone can still be transformed by using the function "setSingleBoneTransform()" (see below) gPlayer.lockBone(#torso) unlockBone(boneName) Unlocks the specified bones and (re-)includes it to the control of the player object and any keyframe animations. gPlayer.unlockBone(#torso) setSingleBoneTransform(boneID,[translationVector,rotationVector]) Overwrites the transform for the specified bone. E.g. can be used to align bones to user parameters, like mouse position etc. gPlayer.setSingleBoneTransform(#torso,[#t: vector(), #r: vector(45,-17,33)] ) getSingleBoneTransform(boneID) Returns the transform based on the current frame in keyframe animation for the specified bone. The result can be used to check the position or rotation of bones or use it together with setSingleBoneTransform() to achieve manual overwriting relative to the ongoing keyframe animation. put gPlayer.getSingleBoneTransform(#torso) -- transform(0.96592,0.25814,-0.01909,0.00000, 0.03863,-0.07084,0.99674,0.00000, 0.25595,-0.96351,-0.07840,0.00000, 0.00000,0.00000,0.00000,1.00000) |
© 2002 karsten schmidt (a toxi.co.uk production) |