14.5. PROTOs

PROTO is a way to define new nodes by combining the functionality of predefined nodes. Scenes that use PROTOs contain a section of PROTO definitions, which can then be instantiated in the scene and used like normal nodes.

The implementation of PROTO was done with the following objectives:

  1. Efficient implementation with minimal changes to the reference code, in order not to compromise the efficiency and stability of the code.

  2. Restriction of the changes to the scene manipulation layer so that no modifications will be required at the rendering layer.

To achieve that, the following problems needed to be solved:

  1. Both PROTO definition and PROTO instantiation need to be implemented—two tasks that seem fairly complex.

  2. Although a PROTO can be ...

Get MPEG-4 Book, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.