Nancy having fun scuba diving - developmental model using ProtoInstance instead of HAnim native tags, do not use this pattern.
This is a developmental example, use HAnim native tags as shown in other examples instead of the prototypes and ProtoInstances shown here.
Cindy Ballreich cindy@ballreich.net 3Name3D
1997 3Name3D / Yglesias, Wallock, Divekar, Inc., all rights reserved.
X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit
The Joint node is used as a building block to describe the articulations of the humanoid figure. Each articulation of the humanoid figure is represented by a Joint node each of which is organized into a hierarchy that describes the overall skeleton of the humanoid.
"NancyPrototypes.x3d#Joint" "https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Prototypes/NancyPrototypes.x3d#Joint" "NancyPrototypes.wrl#Joint" "https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Prototypes/NancyPrototypes.wrl#Joint"
The Segment node is used describe the attributes of the physical links between the joints of the humanoid figure. Each body part (pelvis thigh calf etc) of the humanoid figure is represented by a Segment node.
"NancyPrototypes.x3d#Segment" "https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Prototypes/NancyPrototypes.x3d#Segment" "NancyPrototypes.wrl#Segment" "https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Prototypes/NancyPrototypes.wrl#Segment"
The Humanoid node serves as overall container for the Joint Segment Site and Viewpoint nodes which define the skeleton geometry and landmarks of the humanoid figure. Additionally the node provides a means for defining information about the author copyright and usage restrictions of the model.
"NancyPrototypes.x3d#Humanoid" "https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Prototypes/NancyPrototypes.x3d#Humanoid" "NancyPrototypes.wrl#Humanoid" "https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Prototypes/NancyPrototypes.wrl#Humanoid"
HAnim 1.1 field container for body geometry Hint: replaced by 2.0 skeleton
Version of the humanoid being modeled. Hint: HAnim version 2.0
HAnim 2.0 field container for body geometry Hint: replaces 1.1 humanoidBody
ViewPositionOrientation provides provides console output of local position and orientation as user navigates
"../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "https://savage.nps.edu/Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation" "../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" "../../Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation" "https://savage.nps.edu/Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation"
Whether or not ViewPositionOrientation sends output to console
Output internal trace messages for debugging this node, intended for developer use only
Ability to turn output tracing on/off at runtime
MFString value of new Viewpoint, suitable for use in string field of a Text node
"Copyright (c) 1997. 3Name3D / Yglesias Wallock Divekar, Inc."
Nancy - an HAnim compliant avatar by 3Name3D
ecmascript: var finWarpL; var finWarpR; function initialize () { finWarpL = 0; finWarpR = 0; } function finL(value, timeStamp) { if (value == 0) { finWarpL = 0; } else { finWarpL = 1; } //print ('finWarpL' + finWarpL); } function finR(value, timeStamp) { if (value == 0) { finWarpR = 0; } else { finWarpR = 1; } //print ('finWarpR' + finWarpR); } function finMove(fraction, timeStamp) { if (finWarpL == 1) { // level 3 (warp outside) Left kVL7 = new SFVec3f(1.25, 0, 25); kVL8 = new SFVec3f(2.5, 0, 30); kVL9 = new SFVec3f(3.25, 0, 34); } else { // level -2 (warp inside) Left kVL7 = new SFVec3f(-1.25, 0, 25); kVL8 = new SFVec3f(-2.5, 0, 30); kVL9 = new SFVec3f(-3.25, 0, 34); } if (finWarpR == 0) { // level 1 (warp outside ) Right kVR7 = new SFVec3f(1.25, 0, 25); kVR8 = new SFVec3f(2.5, 0, 30); kVR9 = new SFVec3f(3.25, 0, 34); } else { // level -2 ( warp inside) Right kVR7 = new SFVec3f(-1.25, 0, 25); kVR8 = new SFVec3f(-2.5, 0, 30); kVR9 = new SFVec3f(-3.25, 0, 34); } // Left Fin (fixed spine) kVL1 = new SFVec3f(0, 0, 1); kVL2 = new SFVec3f(0, 0, 5); kVL3 = new SFVec3f(0, 0, 8); kVL4 = new SFVec3f(0, 0, 12); kVL5 = new SFVec3f(0, 0, 15); kVL6 = new SFVec3f(0, 0, 18); keyValueL = new MFVec3f(kVL1, kVL2, kVL3, kVL4, kVL5, kVL6, kVL7, kVL8, kVL9); // Right Fin (fixed spine) kVR1 = new SFVec3f(0, 0, 1); kVR2 = new SFVec3f(0, 0, 5); kVR3 = new SFVec3f(0, 0, 8); kVR4 = new SFVec3f(0, 0, 12); kVR5 = new SFVec3f(0, 0, 15); kVR6 = new SFVec3f(0, 0, 18); keyValueR = new MFVec3f(kVR1, kVR2, kVR3, kVR4, kVR5, kVR6, kVR7, kVR8, kVR9); //tracePrint ('[keyValueL = ]' + keyValueL); //tracePrint ('[keyValueR = ]' + keyValueR); } function set_fraction (value, timeStamp) { finMove(value); //tracePrint('time fraction =' + value); } function tracePrint (outputString) { if (traceEnabled) Browser.println ('[Fin Move]' + outputString); }
"small_logo.gif" "https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Prototypes/small_logo.gif"
ecmascript: var positionX; var positionY; var positionZ; var rotation; function initialize() { positionX = 0.0; positionY = 0.0; positionZ = 0.0; rotation = 0.0; } function set_rotationL( value, timeStamp) { rotationFinL = new SFRotation(positionX, positionY, positionZ, rotation); rotationFinL = value; //print ('rotationFinL[0] ' + rotationFinL[0]); if (rotationFinL[0] <= 0) { fin_warpL = 0; } else { fin_warpL = 1; } } function set_rotationR( value, timeStamp) { rotationFinR = new SFRotation(positionX, positionY, positionZ, rotation); rotationFinR = value; //print ('rotationFin[0] ' + rotationFinR[0]); if (rotationFinR[0] <= 0) { fin_warpR = 0; } else { fin_warpR = 1; } }