Table of Contents Chapter Index Previous Slide Next Slide 383
Syntax: EXTERNPROTO

Creating new node types
Syntax: EXTERNPROTO
  • Prototypes are typically in a separate external file

  • An EXTERNPROTO declares a new node type in an external file
  • name, fields, events - as from PROTO
  • url - the URL of the prototype file
  • EXTERNPROTO BouncingBall [
        field SFFloat bounceHeight 1.0
        field SFTime  cycleInterval 1.0
    ] "bounce.wrl#BouncingBall"