home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch11 / waterfall / waterfallRange.wrl < prev    next >
Text File  |  1997-03-31  |  9KB  |  403 lines

  1. #VRML V2.0 utf8 CosmoWorlds V1.0
  2.  
  3. EXTERNPROTO debugSound [
  4.         field        SFVec3f direction 
  5.         field        SFFloat intensity 
  6.         field        SFVec3f location 
  7.         field        SFFloat maxBack 
  8.         field        SFFloat maxFront 
  9.         field        SFFloat minBack 
  10.         field        SFFloat minFront 
  11.         field        SFFloat priority 
  12.         field        SFNode source 
  13.         field        SFBool spatialize 
  14.       ]
  15.     "dsp.wrl"
  16. Group {
  17.   children    [
  18.     DEF terrainInline Transform {
  19.       children    Inline {
  20.     url    "terrainInline.wrl"
  21.     bboxCenter    -0.198013 104.115 -9.964
  22.     bboxSize    982.72 208.231 864.806
  23.       }
  24.  
  25.     }
  26.     DEF oceanInline Transform {
  27.       children    Inline {
  28.     url    "oceanInline.wrl"
  29.     bboxCenter    212.185 1.825 118.143
  30.     bboxSize    7377.15 0 7377.15
  31.       }
  32.  
  33.     }
  34.     DEF background Transform {
  35.       children    Background {
  36.     groundAngle    1.01
  37.     groundColor    [ 0.1 0.1 0.09,
  38.           0.48 0.48 0.45 ]
  39.     skyAngle    [ 0.05, 0.1, 1, 1.57 ]
  40.     skyColor    [ 1 1 0,
  41.           1 1 0.5,
  42.           0.125 0.125 0.5,
  43.           0.3 0.3 0.55,
  44.           0.64 0.73 0.84 ]
  45.       }
  46.  
  47.       translation    139.537 161.86 -16.62
  48.       rotation    0 0 1  0
  49.     }
  50.     DEF Light1 DirectionalLight {
  51.       direction    -0.301666 -0.945287 0.124226
  52.     }
  53.     DEF IslandSound Sound {
  54.       source    DEF cricketClip AudioClip {
  55.     url    "crickets.wav"
  56.     loop    TRUE
  57.     startTime    1
  58.       }
  59.  
  60.       location    0 10 0
  61.       direction    0 0 1
  62.       minFront    400
  63.       maxFront    550
  64.       minBack    400
  65.       maxBack    550
  66.       spatialize    FALSE
  67.     }
  68.     DEF viewpoints Transform {
  69.       children    [
  70.     DEF VP2 Viewpoint {
  71.       position    -955.266 285.332 1151.13
  72.       orientation    -0.0300014 -0.995425 -0.0907165  0.699859
  73.       fieldOfView    0.785398
  74.       description    "full view"
  75.     }
  76.     DEF VP1 Viewpoint {
  77.       position    5.18484 194.517 158.337
  78.       orientation    -0.0321899 -0.995106 -0.0934276  0.703927
  79.       fieldOfView    0.785398
  80.       description    "pond view"
  81.     }
  82.       ]
  83.     }
  84.     Transform {
  85.       children    DEF waveSound Sound {
  86.     source    DEF waveclip AudioClip {
  87.       url    "waves.wav"
  88.       loop    TRUE
  89.       startTime    1
  90.     }
  91.  
  92.     location    0 0 -34.8102
  93.     direction    0 0 1
  94.     minFront    56.4
  95.     maxFront    564
  96.     minBack    56.4
  97.     maxBack    564
  98.       }
  99.  
  100.       translation    0 -27.1887 0
  101.       scale    1 0.152271 1
  102.     }
  103.     Inline {
  104.       url    "pondInline.wrl"
  105.       bboxCenter    150.062 160.882 -12.6917
  106.       bboxSize    126.917 0.867004 98.9718
  107.     }
  108.     DEF upperStream Transform {
  109.       children    Shape {
  110.     appearance    Appearance {
  111.       material    Material {
  112.         ambientIntensity    0.164765
  113.         diffuseColor    0.285566 0.305877 0.382979
  114.         specularColor    0 0 0
  115.         emissiveColor    0 0 0
  116.         shininess    0.2
  117.         transparency    0
  118.       }
  119.  
  120.     }
  121.  
  122.     geometry    IndexedFaceSet {
  123.       coord    Coordinate {
  124.         point    [ 59.5969 146.807 79.907,
  125.               113.073 161.273 26.3747,
  126.               99.4099 161.273 7.55858,
  127.               36.6707 146.807 82.1189,
  128.               25.3372 146.242 149.649,
  129.               37.5961 146.242 148.299 ]
  130.       }
  131.  
  132.       coordIndex    [ 0, 1, 2, 3, -1, 0, 1, 2,
  133.             3, -1, 0, 3, 4, 5, -1, 0,
  134.             3, 4, 5, -1 ]
  135.       colorIndex    [  ]
  136.       texCoord    TextureCoordinate {
  137.         point    [ 0.5 0.92161,
  138.               0.749757 0.92161,
  139.               0.749757 0.92161,
  140.               0.5 0.92161,
  141.               0.562439 0.89052,
  142.               0.66381 0.878816,
  143.               0.5 0.812528,
  144.               0.5 0.812528,
  145.               0.562439 0.89052,
  146.               0.552631 0.832296 ]
  147.       }
  148.  
  149.       texCoordIndex    [ 0, 1, 2, 3, -1, 4, 5, 2,
  150.             3, -1, 0, 3, 6, 7, -1, 8,
  151.             3, 6, 9, -1 ]
  152.       ccw    TRUE
  153.       solid    TRUE
  154.       convex    TRUE
  155.       creaseAngle    0.5
  156.     }
  157.  
  158.       }
  159.  
  160.     }
  161.     DEF waterFall Transform {
  162.       children    [
  163.     DEF DefaultTouchSensor TouchSensor {
  164.     }
  165.     Shape {
  166.       appearance    Appearance {
  167.         material    Material {
  168.           ambientIntensity    0.0631015
  169.           diffuseColor    0.933709 0.950282 1
  170.           specularColor    0 0 0
  171.           emissiveColor    0.489362 0.489362 0.489362
  172.           shininess    0.2
  173.           transparency    0
  174.         }
  175.  
  176.         texture    ImageTexture {
  177.           url    "falltex.gif"
  178.         }
  179.  
  180.         textureTransform    TextureTransform {
  181.           translation    0 0
  182.           rotation    0
  183.           scale    23.1188 3.63558
  184.           center    0 0
  185.         }
  186.  
  187.       }
  188.  
  189.       geometry    IndexedFaceSet {
  190.         coord    Coordinate {
  191.           point    [ 32.7671 90.6663 183.129,
  192.                 37.5961 146.242 148.299,
  193.                 25.3372 146.242 149.649,
  194.                 19.9931 90.6663 188.953,
  195.                 17.6137 23.8628 219.136,
  196.                 35.1548 23.8628 215.602 ]
  197.         }
  198.  
  199.         coordIndex    [ 0, 1, 2, 3, -1, 0, 1, 2,
  200.               3, -1, 4, 5, 0, 3, -1, 4,
  201.               5, 0, 3, -1 ]
  202.         colorIndex    [  ]
  203.         texCoord    TextureCoordinate {
  204.           point    [ 0.5 0.686985,
  205.                 0.5 0.812528,
  206.                 0.5 0.812528,
  207.                 0.5 0.686985,
  208.                 0.518809 0.698483,
  209.                 0.52581 0.784354,
  210.                 0.5 0.577903,
  211.                 0.5 0.577903,
  212.                 0.515802 0.583924,
  213.                 0.514255 0.662021 ]
  214.         }
  215.  
  216.         texCoordIndex    [ 0, 1, 2, 3, -1, 4, 5, 2,
  217.               3, -1, 6, 7, 0, 3, -1, 6,
  218.               8, 9, 3, -1 ]
  219.         ccw    TRUE
  220.         solid    TRUE
  221.         convex    TRUE
  222.         creaseAngle    0.5
  223.       }
  224.  
  225.     }
  226.       ]
  227.       center    27.6049 85.0523 183.717
  228.     }
  229.     DEF lowerStream Transform {
  230.       children    Shape {
  231.     appearance    Appearance {
  232.       material    Material {
  233.         ambientIntensity    0.152091
  234.         diffuseColor    0.309363 0.331367 0.414894
  235.         specularColor    0.106383 0.106383 0.106383
  236.         emissiveColor    0 0 0
  237.         shininess    0.2
  238.         transparency    0
  239.       }
  240.  
  241.       texture    NULL
  242.  
  243.       textureTransform    NULL
  244.  
  245.     }
  246.  
  247.     geometry    IndexedFaceSet {
  248.       coord    Coordinate {
  249.         point    [ 35.1548 23.8628 215.602,
  250.               17.6137 23.8628 219.136,
  251.               19.496 12.9992 335.064,
  252.               43.0546 13.2699 334.429,
  253.               -4.54715 0 406.479,
  254.               39.654 0 402.414 ]
  255.       }
  256.  
  257.       coordIndex    [ 0, 1, 2, 3, -1, 2, 4, 5,
  258.             3, -1, 0, 1, 2, 4, 5, 3,
  259.             -1 ]
  260.       colorIndex    [  ]
  261.       texCoord    TextureCoordinate {
  262.         point    [ 0.5 0.577903,
  263.               0.5 0.577903,
  264.               0.5 0.542437,
  265.               0.5 0.543321,
  266.               0.5 0.5,
  267.               0.5 0.5,
  268.               0.518028 0.541847,
  269.               0.5 0.542437,
  270.               0.519476 0.5,
  271.               0.518671 0.523271 ]
  272.       }
  273.  
  274.       texCoordIndex    [ 0, 1, 2, 3, -1, 2, 4, 5,
  275.             3, -1, 6, 1, 7, 4, 8, 9,
  276.             -1 ]
  277.       ccw    TRUE
  278.       solid    TRUE
  279.       convex    TRUE
  280.       creaseAngle    0.5
  281.     }
  282.  
  283.       }
  284.  
  285.     }
  286.     DEF upstreamSoundGroup Transform {
  287.       children    DEF upperStreamSound Sound {
  288.     source    DEF streamClip_0 AudioClip {
  289.       url    "stream.wav"
  290.       loop    TRUE
  291.       startTime    1
  292.     }
  293.  
  294.     location    0 0 0
  295.     direction    0.00145872 -0.0827781 0.996567
  296.     minFront    50
  297.     maxFront    70
  298.     minBack    50
  299.     maxBack    70
  300.       }
  301.  
  302.       translation    55.3121 147.58 76.6578
  303.       rotation    0.208855 -0.977176 0.0388052  0.45149
  304.       scale    0.709871 0.709871 1.77187
  305.       scaleOrientation    6.50199e-06 5.80232e-06 -1  0.00390625
  306.     }
  307.     DEF loStreamSoundGroup Transform {
  308.       children    Transform {
  309.     children    DEF lowerStreamSound Sound {
  310.       source    USE streamClip_0
  311.  
  312.       location    0 0 0
  313.       direction    0 0 1
  314.       minFront    50
  315.       maxFront    70
  316.       minBack    50
  317.       maxBack    70
  318.     }
  319.  
  320.     translation    31.6566 15.2535 311.177
  321.     rotation    0 0 1  0
  322.     scale    0.728855 0.728856 1.87075
  323.       }
  324.  
  325.     }
  326.     DEF waterfallSoundGroup Transform {
  327.       children    [
  328.     DEF waterfallFar debugSound {
  329.       direction    0 0 1
  330.       location    0 0 0
  331.       maxBack    50
  332.       maxFront    140
  333.       minBack    20
  334.       minFront    60
  335.       source    DEF Sound1clip AudioClip {
  336.         url    "wfRumble.wav"
  337.         loop    TRUE
  338.         startTime    1
  339.       }
  340.  
  341.     }
  342.     DEF waterfallNear debugSound {
  343.       direction    0 0 1
  344.       location    0 0 0
  345.       maxBack    40
  346.       maxFront    70
  347.       minBack    10
  348.       minFront    20
  349.       source    DEF wfnear AudioClip {
  350.         url    "wfSpray.wav"
  351.         loop    TRUE
  352.         startTime    1
  353.       }
  354.  
  355.     }
  356.       ]
  357.       translation    17.5772 29.0766 196.069
  358.       rotation    -0.994789 0.0966599 0.0324386  0.650729
  359.       scale    1.70049 2.86545 1.28977
  360.       scaleOrientation    0 0 1  0
  361.     }
  362.     DEF flyNav NavigationInfo {
  363.       avatarSize    [ 1, 4, 4 ]
  364.       type    "FLY"
  365.     }
  366.     DEF walkNav NavigationInfo {
  367.       avatarSize    [ 1, 4, 4 ]
  368.     }
  369.     DEF mouthView Viewpoint {
  370.       position    -6.7292 7.27252 402.905
  371.       orientation    0.950366 -0.273122 -0.149024  0.227894
  372.       fieldOfView    0.785398
  373.       description    "streamMouth"
  374.     }
  375.     DEF wfBottomVP Viewpoint {
  376.       position    14.6806 25.1763 237.38
  377.       orientation    0.989553 -0.0363016 -0.139527  0.893961
  378.       fieldOfView    1.5
  379.       description    "waterfallBottom"
  380.     }
  381.     DEF wfTopVP Viewpoint {
  382.       position    31.3286 181.273 131.992
  383.       orientation    0.197257 0.853055 0.483101  3.39174
  384.       fieldOfView    0.785398
  385.       description    "waterfallTop"
  386.     }
  387.     DEF overviewVP Viewpoint {
  388.       position    393.936 592.529 260.958
  389.       orientation    -0.454275 0.770076 0.447903  1.48731
  390.       fieldOfView    0.785398
  391.       description    "overview"
  392.     }
  393.     DEF VP3 Viewpoint {
  394.       position    -490.533 355.488 995.049
  395.       orientation    -0.504647 -0.857958 -0.0961225  0.525044
  396.       fieldOfView    0.785398
  397.       description    "rangeView"
  398.     }
  399.   ]
  400. }
  401. ROUTE mouthView.isBound TO walkNav.set_bind
  402. ROUTE wfBottomVP.isBound TO walkNav.set_bind
  403.