Table of contents Chapter index Previous slide Next slide 442
A sample Java script

Writing program scripts with Java
A sample Java script
  • Create a Bouncing ball interpolator that computes a gravity-like vertical bouncing motion from a fractional time input

  • Nodes needed:
    DEF Ball Transform {
        children [ . . . ]
    }
    DEF Clock TimeSensor {
        . . .
    }
    DEF Bouncer Script {
        . . .
    }