home *** CD-ROM | disk | FTP | other *** search
/ Magazyn WWW 2001 May / cd49www.iso / inne / spirit / www.spiritpower.org / imgcube.wrl / imgcube
Text File  |  2000-11-03  |  9KB  |  12 lines

  1. #VRML V2.0 utf8
  2. WorldInfo {
  3.  title "cube.htm"
  4.  info ["Copyright, 1998, TriVista Technologies, Inc. All rights reserved.",
  5.    "The content and structure of this document are",
  6.    "protected by U.S. copyright and international",
  7.    "treaties and may not be copied without the express",
  8.    "permission of TriVista Technologies, Inc."]
  9. }
  10. #Unregistered Version.
  11. Background {  skyColor 1 1 1 } NavigationInfo {   type "NONE" } Viewpoint {  description "Initial"  position 0 0 6.195  orientation 0 1 0 0  fieldOfView 0.3 } PROTO Face_STF [   field MFString textureURL [""]   field MFVec2f cp4 [0 1,0 0,1 0,1 1] ] {  Group {    children Shape {      appearance Appearance {        texture ImageTexture { url IS textureURL }      }      geometry IndexedFaceSet {        coord Coordinate {          point [-0.5 0.5 0,-0.5 -0.5 0,0.5 -0.5 0,0.5 0.5 0]       }       coordIndex [0, 1, 2, 3]       texCoord TextureCoordinate { point IS cp4 }       normalPerVertex FALSE        creaseAngle     0.5      }    }  } } Group {  children [   DEF CubeXXfm Transform {   translation 0 0 0.525   rotation 0.7 1 0 0.8     children DEF CubeYXfm Transform {       children DEF CubeZXfm Transform {         children [           Transform {             translation -0.5 0 0             rotation    0 1 0  4.71239        children  [         Face_STF {          textureURL "imgcube_m01.jpg"           cp4 [0.005 0.9950,0.005 0.505,0.4950 0.505,0.4950 0.9950]         }        ]           }           Transform {             translation 0 0 0.5        children  [         Face_STF {          textureURL "imgcube_m01.jpg"           cp4 [0.505 0.9950,0.505 0.505,0.9950 0.505,0.9950 0.9950]         }        ]           }           Transform {             translation 0.5 0 0             rotation    0 1 0  1.5708        children  [         Face_STF {          textureURL "imgcube_m01.jpg"           cp4 [0.005 0.4950,0.005 0.005,0.4950 0.005,0.4950 0.4950]         }        ]           }           Transform {             translation 0 0 -0.5             rotation    0 1 0  3.14159        children  [         Face_STF {          textureURL "imgcube_m01.jpg"           cp4 [0.505 0.4950,0.505 0.005,0.9950 0.005,0.9950 0.4950]         }        ]           }           Transform {             translation 0 0.5 0             rotation    1 0 0  4.71239        children  [         Face_STF {          textureURL "imgcube_m02.jpg"           cp4 [0.005 0.9950,0.005 0.505,0.4950 0.505,0.4950 0.9950]         }        ]           }           Transform {             translation 0 -0.5 0             rotation    1 0 0  1.5708        children  [        Anchor { url "http://www.trivista.com" description "TriVista 3D ImageCube" parameter ["target=target_imgcube"] children [         Face_STF {          textureURL "imgcube_m02.jpg"           cp4 [0.505 0.9950,0.505 0.505,0.9950 0.505,0.9950 0.9950]         }        ]}        ]           }         ]       }     }   }  ] } Group { children [  DEF RandTouch TouchSensor {}  Transform {   translation -0.7 -0.82 0.5   rotation 0.7 1 0 0.8   scale 1 1 1   children DEF SpinYXfm Transform {    children DEF SpinZXfm Transform {     children [      DEF JackPiece Group {       children [        Shape {         appearance DEF JackApp Appearance {          material Material {           diffuseColor 0.5 0.5 0.6 specularColor 0.7 0.7 0.4 shininess 0.1          }         }         geometry Box { size 0.14 0.02 0.02 }        }        Transform { translation 0.07 0 0         children DEF JBall Shape { appearance USE JackApp geometry Sphere { radius 0.02 }}        }        Transform { translation -0.07 0 0 children USE JBall}       ]      }      Transform { rotation 0 1 0 1.5708 children USE JackPiece }      Transform { rotation 0 0 1 1.5708 children USE JackPiece }     ]    }   }  } ]} Group { children [  DEF StepTouch TouchSensor {}  Transform {   translation 0.7 -0.82 0.5   children DEF StepXfm Transform {   scale 1 1 1   children Transform {    children Shape {     appearance Appearance { material Material {      diffuseColor 0 0 0.6 specularColor 0.2 0.2 0.2 shininess 1 }}     geometry IndexedFaceSet {      coord Coordinate {       point [        -0.063 0.063 0.063, -0.063 -0.063 0.063,         0.063 -0.063 0.063, 0.063 0.063 0.063,         0.063 0.063 0.063, 0.063 -0.063 0.063,         0.063 -0.063 -0.063, 0.063 0.063 -0.063,         0.063 0.063 -0.063, 0.063 -0.063 -0.063,        -0.063 -0.063 -0.063, -0.063 0.063 -0.063,        -0.063 0.063 -0.063, -0.063 -0.063 -0.063,        -0.063 -0.063 0.063, -0.063 0.063 0.063,        -0.063 -0.063 0.063, -0.063 -0.063 -0.063,         0.063 -0.063 -0.063, 0.063 -0.063 0.063,        -0.063 0.063 -0.063, -0.063 0.063 0.063,         0.063 0.063 0.063, 0.063 0.063 -0.063       ]      }      coordIndex [0 1 2 3 -1 4 5 6 7 -1 8 9 10 11 -1 12 13 14 15                 -1 16 17 18 19 -1 20 21 22 23      ]      colorPerVertex FALSE      color Color {       color [ 0.3 0.2 0.2, 0.2 0.3 0.2, 0.2 0.2 0.3, 0.25 0.25 0.15, 0.25 0.15 0.25, 0.15 0.25 0.25]      }      colorIndex [ 0 1 2 3 4 5]     }    }}}  } ]} Group { children [  DEF GrabSense SphereSensor { }  Transform {   translation 0.0 -0.82 0.5   children DEF GrabXfm Transform {    children [     Shape {      appearance Appearance { material Material {          diffuseColor 0.5 0.5 0.5 specularColor 0.3 0.3 0.2 shininess 1 transparency 0.5 }}      geometry Sphere { radius 0.08 }     }     DEF BandShape Shape {      appearance DEF BandApp Appearance { material Material {          diffuseColor 0.4 0.4 0.4 }}      geometry Cylinder { radius 0.082 height 0.02 top FALSE bottom FALSE }     }     Transform { rotation 1 0 0 1.5708 children USE BandShape }     Transform { rotation 0 0 1 1.5708 children USE BandShape }    ]   }  } ]} DEF RandClock TimeSensor {  cycleInterval 34  loop TRUE} DEF RandClock2 TimeSensor {  cycleInterval 28  loop TRUE} DEF RandOrientY OrientationInterpolator {  key [0,0.5,1.0]  keyValue [1 0 1 0,1 0 1 3.1416,1 0 1 6.2832]} DEF RandOrientZ OrientationInterpolator {  key [0,0.5,1.0]  keyValue [0 1 0 0,0 1 0 3.1416,0 1 0 6.2832]} DEF RandScript Script {  url "javascript:  function touchTime (eTime) {  if (isOn) {  toggleOff = eTime;  isOn = false;  }  else {  toggleOn = eTime;  isOn = true;  }  }"  field SFBool isOn TRUE  eventIn SFTime touchTime  eventOut SFTime toggleOn  eventOut SFTime toggleOff } DEF StepClock TimeSensor {  cycleInterval 1.0  loop FALSE} DEF StepInterp OrientationInterpolator {  key [0,1.0]  keyValue [0 1 0 0,0 1 0 0]} DEF StepResetInterp OrientationInterpolator {  key [0,1.0]  keyValue [0 1 0 0,0 1 0 0]} DEF StepTurn Script {  url "javascript:  function turnItRight(bool) {   if ( bool == true ) {    frame=frame+1;    if (frame == 6) frame=0;    if (frame == 0 ){    tKy[0]= new SFRotation(1,0,0,-1.5708);    tKy[1]= new SFRotation(0,1,0,0.0);    }    if (frame == 1 ){    tKy[0]= new SFRotation(0,1,0,0.0);    tKy[1]= new SFRotation(0,1,0,-1.5708);    }    if (frame == 2 ){    tKy[0]= new SFRotation(0,1,0,-1.5708);    tKy[1]= new SFRotation(0,1,0,-3.1416);    }    if (frame == 3 ){    tKy[0]= new SFRotation(0,1,0,-3.1416);    tKy[1]= new SFRotation(0,1,0,-4.7124);    }    if (frame == 4 ){    tKy[0]= new SFRotation(0,1,0,-4.7124);    tKy[1]= new SFRotation(1,0,0,1.5708);    }    if (frame == 5 ){    tKy[0]= new SFRotation(1,0,0,1.5708);    tKy[1]= new SFRotation(1,0,0,-1.5708);    }    endRot=tKy[1];   }   else { return; }  }"  field SFInt32 frame 0  eventIn SFBool turnItRight  eventOut MFRotation tKy  eventOut SFRotation endRot } ROUTE RandTouch.touchTime TO RandScript.touchTime ROUTE RandScript.toggleOn TO RandClock.set_startTime ROUTE RandScript.toggleOn TO RandClock2.set_startTime ROUTE RandScript.toggleOff TO RandClock.set_stopTime ROUTE RandScript.toggleOff TO RandClock2.set_stopTime ROUTE RandClock.fraction_changed TO RandOrientY.set_fraction ROUTE RandOrientY.value_changed TO CubeYXfm.set_rotation ROUTE RandClock2.fraction_changed TO RandOrientZ.set_fraction ROUTE RandOrientZ.value_changed TO CubeZXfm.set_rotation ROUTE RandOrientY.value_changed TO SpinYXfm.set_rotation ROUTE RandOrientZ.value_changed TO SpinZXfm.set_rotation ROUTE GrabSense.rotation_changed    TO GrabXfm.set_rotation ROUTE GrabSense.rotation_changed    TO CubeXXfm.set_rotation ROUTE StepTouch.isActive TO StepTurn.turnItRight ROUTE StepTurn.tKy TO StepInterp.set_keyValue ROUTE StepTouch.touchTime TO StepClock.set_startTime ROUTE StepClock.fraction_changed TO StepInterp.set_fraction ROUTE StepClock.fraction_changed TO StepResetInterp.set_fraction ROUTE StepInterp.value_changed TO CubeXXfm.set_rotation ROUTE StepResetInterp.value_changed TO CubeYXfm.set_rotation ROUTE StepResetInterp.value_changed TO CubeZXfm.set_rotation ROUTE StepInterp.value_changed TO StepXfm.set_rotation ROUTE StepTurn.endRot TO GrabSense.set_offset 
  12.