DOM Data Structure

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in book_prev() (line 775 of /home/drbiz/public/tools.realism.com/modules/book/book.module).

Primary tabs

XSeen is fully integrated with DOM. The DOM provides all of the basic access, control, and event methods. XSeen extends or overloads the methods as necessary to have the correct 3C/VR interface and interaction. All XSeen data for a given tag is stored in the _xseen object of the DOM tree element for that tag. In that object are public data and methods mixed with those that are private to the element. This section documents the public methods and data.

External Libraries

  • THREE - used to manage and render the scene
  • TWEEN - used for all animations

Summary

All data and methods are located in <element>._xseen, where <element> is the data structure returned by (for example) document.getElementById (<id-name>). This prefix will be dropped unless needed for clarity in the list and discussion below. Some of the data structures are needed to support the interface with various external libraries.

Data

  • sceneInfo{} - The object that holds all information necessary to render the scene. See the page for this object for details.
  • attributes[] - The parsed attribute values. The parsing operation places the parsed value of each listed attribute in this array.
  • properties[] - The run-time properties used by this node. Writing to this array may cause unpredictable results
  • tagObject - The THREE object that this tag creates.
  • animation[] - An array of TWEENs that are to be animated for this node
  • animate[] - An array of values that can be animated.
  • handlers[] - An array of ???
  • children[] - An array of all THREE scene objects that were created by children of this tag.

Methods

  • getAttribute() - Returns the parsed value of the named attribute.
  • getProperty() - Returns the current value of the named property.
  • setAttribute() - Parses and sets the value of the named attribute.
  • init() - Called when the node is initially parsed
  • fin() - Called when all of the node's children have been parsed
  • event() - Called when the system needs to delivery an event to the node