Table of Contents Chapter Index Previous Slide Next Slide 351
A sample JavaScript script

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

  • Fields needed:
  • Bounce height
  • DEF Bouncer Script {
        field SFFloat bounceHeight 3.0
        . . .
    }