home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch10 / 5041104.wrl < prev    next >
Text File  |  1996-12-17  |  2KB  |  92 lines

  1. #VRML V2.0 utf8
  2. #Example 11.4 - PNG Transparency and the Billboard Node
  3. NavigationInfo {
  4.   type "FLY"
  5. }
  6. Viewpoint {
  7.   position   -0.3 0 10.9
  8.   orientation       0 0 1  0
  9.   fieldOfView       1.05
  10. }
  11. Background {
  12.   skyAngle   [ 1.0472, 2.09439 ]
  13.   skyColor   [ 0.1 0.1 1,
  14.              0.2 0.2 0.6,
  15.              0.6 0.6 0.7 ]
  16. }
  17. Group {
  18.   children    [
  19.     Transform {
  20.       children      Billboard {
  21.         children     DEF Cloud Shape {
  22.           appearance Appearance {
  23.             texture  ImageTexture {
  24.               url    "cloud-1.png"
  25.             }
  26.           }
  27.           geometry   IndexedFaceSet {
  28.             coord    Coordinate {
  29.               point  [ 1 -1 0,
  30.                      1 1 0,
  31.                      -1 1 0,
  32.                      -1 -1 0 ]
  33.             }
  34.             coordIndex    [ 0, 1, 2, 3, -1 ]
  35.             texCoord      TextureCoordinate {
  36.               point [ 1 0,
  37.                     1 1,
  38.                     0 1,
  39.                     0 0 ]
  40.             }
  41.             texCoordIndex [ 0, 1, 2, 3, -1 ]
  42.           }
  43.         }
  44.         axisOfRotation    0 0 0
  45.       }
  46.     }
  47.     Transform {
  48.       children      Billboard {
  49.         children    USE Cloud
  50.         axisOfRotation    0 0 0
  51.       }
  52.       translation   -3.88 2.85 1.71
  53.     }
  54.     Transform {
  55.       children      Billboard {
  56.         children    USE Cloud
  57.         axisOfRotation     0 0 0
  58.       }
  59.       translation   3.89 3.71 2.41
  60.     }
  61.     Transform {
  62.       children      Billboard {
  63.         children    USE Cloud
  64.         axisOfRotation     0 0 0
  65.       }
  66.       translation   -5.31 -3.77 3.23
  67.     }
  68.     Transform {
  69.       children      Billboard {
  70.         children    USE Cloud
  71.       axisOfRotation       0 0 0
  72.       }
  73.       translation   5.14 -3.46 5.16
  74.     }
  75.     Transform {
  76.       children      Billboard {
  77.         children    USE Cloud
  78.         axisOfRotation     0 0 0
  79.       }
  80.       translation   -9.62 2.75 8.22
  81.     }
  82.     Transform {
  83.       children      Billboard {
  84.         children    USE Cloud
  85.       axisOfRotation       0 0 0
  86.       }
  87.       translation   8.95 1.76 7.69
  88.     }
  89.   ]
  90. }
  91. #EOF
  92.