#VRML V2.0 utf8 ## ##@ world DEF WorldInfo WorldInfo { title "Movie Cube Grid Space 1" info [ "12/1999 / 05 2001 Holger Grahn hg@snafu.de" "options:relativeTime=true,wwwProgress=true" ] } ##@ translate 4 times PROTO T4 [ field SFVec3f bboxSize -1 -1 -1 field SFVec3f bboxCenter 0 0 0 field MFNode children [] field SFVec3f scale 1 1 1 ] { Group { children [ Transform { bboxSize IS bboxSize bboxCenter IS bboxCenter children IS children translation 50 0 50 scale IS scale } Transform { bboxSize IS bboxSize bboxCenter IS bboxCenter children IS children translation -50 0 50 scale IS scale } Transform { bboxSize IS bboxSize bboxCenter IS bboxCenter children IS children translation 50 0 -50 scale IS scale } Transform { bboxSize IS bboxSize bboxCenter IS bboxCenter children IS children translation -50 0 -50 scale IS scale } ] } } ##@ world DEF background Background { skyColor 0 0 0.1 leftUrl "logo.jpg" rightUrl "logo.jpg" backUrl "logo.jpg" frontUrl "logo.jpg" topUrl "logo.jpg" bottomUrl "logo.jpg" # "../textures/starstr.gif" } NavigationInfo { type [ "WALK" "ANY" ] headlight TRUE avatarSize [0.5 1.75, 0.75 ] ## visibilityLimit 140 speed 10 } Fog { fogType "LINEAR" visibilityRange 1500 ##visibilityStart 50 color 0 0 1 } Viewpoint { position 0 0 120 description "Entry" fieldOfView 1 } ##@ collision(s) Collision { collide FALSE children [ DEF Root Group { } #Shape { # geometry DEF gridIls IndexedLineSet { ## will be computed by script # coord DEF gridCoord Coordinate { } #}} DEF MasterTime TimeSensor { loop TRUE startTime 0 cycleInterval 20 } DEF MasterTransform Transform { rotation 0 1 0 0 scaleOrientation 0 1 0 0 } ] } ##@ gridder DEF Gridder Script { field SFNode root USE Root field SFNode master USE MasterTransform field SFNode masterTime USE MasterTime field MFNode particleObjects [ Shape { geometry Box { size 10 10 10 } appearance Appearance { material DEF MasterMaterial Material { diffuseColor 0.7 0.7 0.7 transparency 0.5 } ##texture ImageTexture { url "../textures/redpat1blur.png" } texture DEF M1 MovieTexture { loop TRUE startTime 0 url [ ## "star wars vi - return of the jedi [divx].avi" "../assets/clips/tube/about-content.mpg" ] } textureTransform DEF tx TextureTransform { } } } ] field MFNode particles [] field SFInt32 uDimension 7 field SFInt32 vDimension 7 field SFInt32 wDimension 7 field SFVec3f bboxSize 60 60 60 field SFVec3f bboxCenter 0 0 0 ##field SFNode gridIls USE gridIls # the ILS for visualization field MFVec3f pts [] field MFVec3f scale [] field SFVec3f scaleSize 2 2 2 field SFVec3f scaleCenter 1.5 1.5 1.5 ## anim stuff field SFVec3f center 0 0 0 eventIn SFFloat centerAnim eventIn SFVec3f set_center eventIn SFTime enterTime eventIn SFTime exitTime ##@ script url "javascript: // compute equal spaced 3D grid coordinates, based on bbox function computeGridCoord(nu,nv,nw) { var u,v,w; var x,y,z; var bmin = bboxCenter.subtract(bboxSize.multiply(0.5)); //var pts = new MFVec3f(); var ptsi=0; pts.length = nw*nv*nu; for(w=0; w