and more
#
##
# file : hanimanm_jump.wrl
# description : jump animation according to the Humanoid Animation Working Group humanoid standard.
# author : R.E. Blom
# created : 20-01-2000
# modified : 20-01-2000
# remarks : the animation is triggered by TimeGesture1.
# Adapted from "<a href=http://www.ballreich.ne>/vrml/h-anim/nancy_h-anim.wrl".
##
DEF Animations Group {
children [
DEF r_ankleRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.36, 0.4, 0.44, 0.48, 0.64, 0.76, 0.84, 0.88, 0.92, 0.96, 1 ]
keyValue [ 0 0 1 0, -1 0 0 0.6735, -1 0 0 0.6735,
-1 0 0 0.3527, -1 0 0 0.3038,
-1 0 0 0.07964, 1 0 0 0.3001,
1 0 0 0.6509, 1 0 0 0.3001,
-1 0 0 0.2087, -1 0 0 0.3756,
-1 0 0 0.3279, -1 0 0 0.1193, 0 0 1 0 ]
}
DEF r_kneeRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.48, 0.64, 0.76, 0.88, 1 ]
keyValue [ 0 0 1 0, 1 0 0 2.005, 1 0 0 2.005,
0 0 1 0, 1 0 0 0.9507, 1 0 0 0.5845,
1 0 0 0.9054, 0 0 1 0 ]
}
DEF r_hipRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.36, 0.4, 0.44, 0.48, 0.64, 0.76, 0.88, 1 ]
keyValue [ 0 0 1 0, 1 0 0 4.433, 1 0 0 4.433,
1 0 0 4.647, -1 0 0 0.8943,
-1 0 0 0.3698, 0 0 1 0, -1 0 0 0.4963,
-1 0 0 0.3829, -1 0 0 0.5169, 0 0 1 0 ]
}
DEF l_ankleRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.36, 0.4, 0.44, 0.48, 0.64, 0.76, 0.84, 0.88, 0.92, 0.96, 1 ]
keyValue [ 0 0 1 0, -1 0 0 0.625, -1 0 0 0.625,
-1 0 0 0.3364, -1 0 0 0.2742,
-1 0 0 0.05078, 1 0 0 0.2833,
1 0 0 0.6667, 1 0 0 0.2833,
-1 0 0 0.2108, -1 0 0 0.375,
-1 0 0 0.3146, -1 0 0 0.1174, 0 0 1 0 ]
}
DEF l_kneeRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.48, 0.64, 0.76, 0.88, 1 ]
keyValue [ 0 0 1 0, 1 0 0 2.047, 1 0 0 2.047,
0 0 1 0, 1 0 0 1.566, 1 0 0 0.5913,
1 0 0 0.9235, 0 0 1 0 ]
}
DEF l_hipRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.36, 0.4, 0.44, 0.48, 0.64, 0.76, 0.88, 1 ]
keyValue [ 0 0 1 0, 1 0 0 4.349, 1 0 0 4.349,
1 0 0 4.615, -1 0 0 0.9136,
-1 0 0 0.3614, 0 0 1 0, -1 0 0 0.7869,
-1 0 0 0.3918, -1 0 0 0.5433, 0 0 1 0 ]
}
DEF lower_bodyRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.48, 0.76, 1 ]
keyValue [ 0 0 1 0, 1 0 0 0.1892, 1 0 0 0.1892,
0 0 1 0, 0 0 1 0, 0 0 1 0 ]
}
DEF r_wristRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.64, 0.76, 1 ]
keyValue [ 0 0 1 0, -0.0585279 0.983903 -0.168849 1.85956,
-0.0585279 0.983903 -0.168849 1.85956,
-0.00222418 0.99801 -0.0630095 1.46072,
0 1 0 0.497349,
0 0 1 0 ]
}
DEF r_elbowRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.64, 0.76, 1 ]
keyValue [ 0 0 1 0, -1 0 0 0.04151,
-1 0 0 0.04151, -1 0 0 0.5855,
-1 0 0 0.5852, 0 0 1 0 ]
}
DEF r_shoulderRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.64, 0.76, 0.88, 1 ]
keyValue [ 0 0 1 0, 0.9992 0.02042 0.03558 4.688,
0.9992 0.02042 0.03558 4.688, 0.9989 -0.04623 0.005159 4.079,
-0.8687 -0.2525 -0.4261 1.501, -0.941 -0.2893 -0.1754 0.4788, 0 0 1 0 ]
}
DEF l_wristRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.64, 0.76, 0.88, 1 ]
keyValue [ 0 0 1 0, 0.0672928 0.989475 -0.128107 4.15574,
0.0672928 0.989475 -0.128107 4.15574,
0.00364942 0.999901 0.0135896 4.5822,
0 -1 0 0.655922,
-0.00050618 -0.999999 0.0012782 1.28397, 0 0 1 0 ]
}
DEF l_elbowRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.64, 0.76, 1 ]
keyValue [ 0 0 1 0, -1 0 0 0.1229,
-1 0 0 0.1229, -1 0 0 0.5976,
-1 0 0 0.3917, 0 0 1 0 ]
}
DEF l_shoulderRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.64, 0.76, 0.88, 1 ]
keyValue [ 0 0 1 0, -0.9987 0.02554 0.04498 1.57,
-0.9987 0.02554 0.04498 1.57, 1 0.0004113 0.003055 4.114,
-0.8413 0.3238 0.4329 1.453, -0.877 0.4198 0.2337 0.6009, 0 0 1 0 ]
}
DEF headRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.48, 0.76, 1 ]
keyValue [ 0 0 1 0, -1 0 0 0.5989, -1 0 0 0.5989,
-1 0 0 0.3216, 1 0 0 0.06503, 0 0 1 0 ]
}
DEF neckRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.48, 0.76, 1 ]
keyValue [ 0 0 1 0, -1 0 0 0.1942, -1 0 0 0.1942,
0 0 1 0, 1 0 0 0.2284, 0 0 1 0 ]
}
DEF upper_bodyRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.48, 0.76, 0.88, 1 ]
keyValue [ 0 0 1 0, 1 0 0 1.038, 1 0 0 1.038,
-1 0 0 0.1057, 1 0 0 0.2171,
1 0 0 0.3465, 0 0 1 0 ]
}
DEF whole_bodyRotInterp_Jump OrientationInterpolator {
key [ 0, 0.28, 0.32, 0.48, 0.64, 0.76, 1 ]
keyValue [ 0 0 1 0, 1 0 0 0.3273, 1 0 0 0.3273,
0 0 1 0, 0 0 1 0, 0 0 1 0, 0 0 1 0 ]
}
DEF whole_bodyTranInterp_Jump PositionInterpolator {
key [ 0, 0.04, 0.08, 0.12, 0.16, 0.2, 0.24, 0.28, 0.32, 0.36, 0.4, 0.44,
0.48, 0.64, 0.76, 0.8, 0.84, 0.88, 0.92, 0.96, 1 ]
keyValue [ 0 0 0, 0 -0.01264 -0.01289, 0 -0.04712 -0.03738,
-0.0003345 -0.1049 -0.05353, -0.0005712 -0.1892 -0.06561,
-0.0008233 -0.286 -0.06276, -0.0009591 -0.3795 -0.05148,
-0.00106 -0.4484 -0.03656, -0.00106 -0.4484 -0.03656,
-0.001122 -0.3269 -0.1499, -0.0008616 -0.13 -0.06358,
-0.0005128 -0.03123 -0.05488, 0.0004779 0.053 0.02732,
0.0001728 0.4148 0.006873, 0 0.03045 0.02148,
0 -0.01299 -0.01057, 0 -0.06932 -0.01064,
0.0001365 -0.1037 -0.005059, 0.0001279 -0.07198 -0.007596,
0.000141 -0.01626 -0.004935, 0 0 0 ]
}
]
}
ROUTE TimeGesture1.fraction_changed TO r_ankleRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO r_kneeRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO r_hipRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO l_ankleRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO l_kneeRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO l_hipRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO lower_bodyRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO r_wristRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO r_elbowRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO r_shoulderRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO l_wristRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO l_elbowRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO l_shoulderRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO headRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO neckRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO upper_bodyRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO whole_bodyRotInterp_Jump.set_fraction
ROUTE TimeGesture1.fraction_changed TO whole_bodyTranInterp_Jump.set_fraction
ROUTE r_ankleRotInterp_Jump.value_changed TO hanim_r_ankle.set_rotation
ROUTE r_kneeRotInterp_Jump.value_changed TO hanim_r_knee.set_rotation
ROUTE r_hipRotInterp_Jump.value_changed TO hanim_r_hip.set_rotation
ROUTE l_ankleRotInterp_Jump.value_changed TO hanim_l_ankle.set_rotation
ROUTE l_kneeRotInterp_Jump.value_changed TO hanim_l_knee.set_rotation
ROUTE l_hipRotInterp_Jump.value_changed TO hanim_l_hip.set_rotation
ROUTE lower_bodyRotInterp_Jump.value_changed TO hanim_sacroiliac.set_rotation
ROUTE r_wristRotInterp_Jump.value_changed TO hanim_r_wrist.set_rotation
ROUTE r_elbowRotInterp_Jump.value_changed TO hanim_r_elbow.set_rotation
ROUTE r_shoulderRotInterp_Jump.value_changed TO hanim_r_shoulder.set_rotation
ROUTE l_wristRotInterp_Jump.value_changed TO hanim_l_wrist.set_rotation
ROUTE l_elbowRotInterp_Jump.value_changed TO hanim_l_elbow.set_rotation
ROUTE l_shoulderRotInterp_Jump.value_changed TO hanim_l_shoulder.set_rotation
ROUTE headRotInterp_Jump.value_changed TO hanim_skullbase.set_rotation
ROUTE neckRotInterp_Jump.value_changed TO hanim_vc4.set_rotation
ROUTE upper_bodyRotInterp_Jump.value_changed TO hanim_vl1.set_rotation
ROUTE whole_bodyRotInterp_Jump.value_changed TO hanim_HumanoidRoot.set_rotation
ROUTE whole_bodyTranInterp_Jump.value_changed TO hanim_HumanoidRoot.set_translation
#
# include second part of lego-look avatar prototype.
#
##
# file : hanimlegoavatarproto.wrl
# description : lego-look avatar prototype.
# author : R.E. Blom
# created : 20-01-2000
# modified : 28-01-2000
# remarks : hanimlegoavatarproto.wrl declares an Avatar proto according to the specifications
# by Blaxxun.
# The actual avatar geometry and animations are not hardcoded in this file, but
# are #@included from separate files.
# The following timers are DEFed in hanimlegoavatarproto.wrl and can be used to
# trigger #@included animations:
# TimeMove : triggered when the avatar moves, this timer is used to move
# the avatar whenever it is not viewed in 3rd person mode or
# is viewed in another browser than that of the owner of the avatar.
# It is generally not necessary to use this timer to trigger
# animations, use TimeWalk instead.
# TimeStop : triggered when the avatar stops moving, this timer is currently
# used to reset the avatar to its neutral position.
# TimeWalk : triggered when the avatar moves, this timer can be used to
# run a walk animation while the avatar is moving.
# TimeGesture1: triggered when the avatar receives a gesture1 event.
# TimeGesture2: triggered when the avatar receives a gesture2 event.
# TimeGesture3: triggered when the avatar receives a gesture3 event.
# TimeGesture4: triggered when the avatar receives a gesture4 event.
# TimeGesture5: triggered when the avatar receives a gesture5 event.
# TimeGesture6: triggered when the avatar receives a gesture6 event.
# TimeGesture7: triggered when the avatar receives a gesture7 event.
# TimeGesture8: triggered when the avatar receives a gesture8 event.
# The cycleinterval of each timer can be set by defining 1
# through 1 respectively.
##
DEF AvatarInterpolator PositionInterpolator {
key [0, 1]
keyValue [0 0 0, 0 0 0]
}
DEF AvatarScript Script {
eventIn SFVec3f set_position IS position
eventIn SFBool timemoveisactive
eventIn SFBool timestopisactive
eventOut SFTime startmove
eventOut SFTime startwalk
eventOut SFTime stopwalk
eventOut MFVec3f keyvalues_changed
exposedField SFBool ispilot IS isPilot
field SFBool moveactive FALSE
field SFBool newmove FALSE
field SFVec3f curposition 0 0 0
field MFVec3f keyvalues []
field SFNode avatartransform USE AnimatedAvatar
field SFNode humanoid USE Humanoid
field SFRotation defrotation 0 0 1 0
directOutput TRUE
url
"vrmlscript:
function set_position(value, timestamp) {
if ((curposition[0]==value[0])&&(curposition[1]==value[1])&&(curposition[2]==value[2]))
return;
curposition=value;
if (ispilot) {
avatartransform.set_translation=value;
startwalk=timestamp;
stopwalk=timestamp+1;
}
else if (moveactive)
newmove=true;
else
move(timestamp);
}
function timemoveisactive(value, timestamp) {
moveactive=value;
if (!moveactive) {
if (newmove) {
newmove=false;
move(timestamp);
}
else
stopwalk=timestamp;
}
}
function timestopisactive(value, timestamp) {
if (!value) {
for (i=0; i<17; i++)
humanoid.joints[i].rotation=defrotation;
}
}
function move(timestamp) {
if(!ispilot) {
keyvalues[0]=avatartransform.translation_changed;
keyvalues[1]=curposition;
keyvalues_changed=keyvalues;
startmove=timestamp;
startwalk=timestamp;
}
}
"
}
]
}
]
}
ROUTE AvatarScript.keyvalues_changed TO AvatarInterpolator.set_keyValue
ROUTE AvatarScript.startmove TO TimeMove.set_startTime
ROUTE AvatarScript.startwalk TO TimeWalk.set_startTime
ROUTE AvatarScript.stopwalk TO TimeWalk.set_stopTime
ROUTE AvatarScript.stopwalk TO TimeStop.set_startTime
ROUTE AvatarInterpolator.value_changed TO AnimatedAvatar.set_translation
ROUTE TimeMove.fraction_changed TO AvatarInterpolator.set_fraction
ROUTE TimeMove.isActive TO AvatarScript.timemoveisactive
ROUTE TimeStop.isActive TO AvatarScript.timestopisactive
}
Transform {
translation 0 1 8
children Avatar { }
}