Using EXTERNPROTO in VRML
IntroductionPROTOs are an easy way of making new commands in vrml. EXTERNPROTO is the way to use a PROTO which is stored in a seperate file.
Simple EXTERNPROTOThis is an example usage of PROTO and EXTERNPROTO. This is only used for PROTOs which contain geometry or self contained animations etc.
EXTERNPROTO Example1 [ The file proto1.wrl contains
PROTO Example1 [
EXTERNPROTO with eventOut and eventInThis is a simple example. notice how the field and exposedField values are present in the PROTO but not the EXTERNPROTO. This example also shows how multiple URLs can be used.
EXTERNPROTO Example4 [ The PROTO itself 'exampleproto.wrl'
PROTO Example4 [
EXTERNPROTO when multiple PROTOs in the same file.
In the above examples only one (1) PROTO is stored in the seperate wrl.
EXTERNPROTO Tree1 [ As you can see we need to add #'proto name' after the filename. It should be noted this doesn't work in Cosmo Player due to a known bug, it does however work in most other VRML plugins including the major ones.
NotesNone at this time.
|