Interaction with a vrml world can take many forms, but the basic principle is the same. We can place various sensors in the world that monitor some user action (like loading the file, clicking on some object, getting close to some object) and that will trigger some animation.
The logic of programming interactive worlds is more or less the same as in traditional GUI programming. You will have to define what =>Events the browser should generate who should handle them and how they should be handled. The difference is that all (?) VRML nodes can generate and receive events. =>ROUTEs will define how different VRML are bound together (i.e. affect each other).
In order to understand events, you have to rethink the concept of a VRML node. You might want to read the entry =>``Nodes, Fields and Events'' in the specification also. Typically, a VRML node is composed of a set of fields. Some of these, i.e. the exposed fields can be altered by incoming events. Each VRML node also has a set of incoming and outcoming events defined and you can hook together nodes by defining a route that links together any outcoming and incoming event of the same time. In the next sections you will learn how to to this.
In some cases, user triggered events are first routed to a script node. Scripts in VRML are just a kind of VRML nodes, but nodes that can compute and that can make changes to any kind of exposed VRML fields. Figure 5.1 describes such a setup.
At a more abstract level we can describe a typical ``Animation Event Path'' as described in chapter 9 [Hartman et Wernecke, 1996], a book you might want to buy if you want a better introduction. More sophisticated animations are triggered off by some sensor, (e.g. the user clicks on an object), the event generated by the browser is routed to a script that will trigger a timer. The timer will trigger a engine (e.g. a position interpolator for moving objects) which in turn affect a VRML object (e.g. the position field of a transform node).
In the next section (5.2) will first teach you how to do animation without scripting and we will introduce the other elements of the typical animation path