Difference between revisions of "Canvas 3D - Mesh Tag"

From CDOT Wiki
Jump to: navigation, search
(Syntax)
 
Line 5: Line 5:
 
== Introduction ==
 
== Introduction ==
  
Meshes are a complex array of vertecies that make up a 3D shape. Much like thier primitive counterpart, a mesh shares the same types of attributes. These attributes set the mesh in 3D space and allow it to be manipulated within JavaScript.
+
Meshes are a complex array of vertices that make up a 3D shape. Much like their primitive counterpart, a mesh shares the same types of attributes. These attributes set the mesh in 3D space and allow it to be manipulated within JavaScript.
  
 
== Tag Attributes ==
 
== Tag Attributes ==
Line 12: Line 12:
 
** '''Usage:''' <mesh name="mymesh" />
 
** '''Usage:''' <mesh name="mymesh" />
 
** The ''name'' attribute specifies the identifier so that the mesh can be referenced within JavaScript. This is an alpha numeric String.
 
** The ''name'' attribute specifies the identifier so that the mesh can be referenced within JavaScript. This is an alpha numeric String.
** If this value is ommited, the Mesh will not be accessable within JavaScript.
+
** If this value is omitted, the Mesh will not be accessible within JavaScript.
 
* href
 
* href
 
** '''Usage:''' <mesh href="http://foo.com/bar.mesh" />.
 
** '''Usage:''' <mesh href="http://foo.com/bar.mesh" />.
Line 20: Line 20:
 
** '''Usage:''' <mesh position="0.0, 8.3, 2.4" />.
 
** '''Usage:''' <mesh position="0.0, 8.3, 2.4" />.
 
** The ''position'' attribute refers to the 3D co-ordinates at which the model is located.
 
** The ''position'' attribute refers to the 3D co-ordinates at which the model is located.
** If this attribute is ommited, the default position is {0.0, 0.0, 0.0}.
+
** If this attribute is omitted, the default position is {0.0, 0.0, 0.0}.
 
* orientation
 
* orientation
 
** '''Usage:''' <mesh orientation="0.0, 3.5, 2.5" />.
 
** '''Usage:''' <mesh orientation="0.0, 3.5, 2.5" />.
 
** The ''orientation'' attribute is the direction the model is facing.
 
** The ''orientation'' attribute is the direction the model is facing.
** If the orientation attribute is ommited, then the default orientation vector is {0.0, 0.0, -1.0}.
+
** If the orientation attribute is omitted, then the default orientation vector is {0.0, 0.0, -1.0}.
 
* size
 
* size
 
** '''Usage:''' <mesh size="2.1" />.
 
** '''Usage:''' <mesh size="2.1" />.
 
** The ''size'' attribute sets the relative size of the mesh.
 
** The ''size'' attribute sets the relative size of the mesh.
** If it is ommited, the default value of the size is {1.0}.
+
** If it is omitted, the default value of the size is {1.0}.
  
 
== Syntax ==
 
== Syntax ==

Latest revision as of 18:50, 20 October 2006

Cube Tag Reference

Back To XML 3D Main Page

Introduction

Meshes are a complex array of vertices that make up a 3D shape. Much like their primitive counterpart, a mesh shares the same types of attributes. These attributes set the mesh in 3D space and allow it to be manipulated within JavaScript.

Tag Attributes

  • name
    • Usage: <mesh name="mymesh" />
    • The name attribute specifies the identifier so that the mesh can be referenced within JavaScript. This is an alpha numeric String.
    • If this value is omitted, the Mesh will not be accessible within JavaScript.
  • href
    • Usage: <mesh href="http://foo.com/bar.mesh" />.
    • The href attribute is a hyperlink reference to a mesh file.
    • This attribute is mandatory.
  • position
    • Usage: <mesh position="0.0, 8.3, 2.4" />.
    • The position attribute refers to the 3D co-ordinates at which the model is located.
    • If this attribute is omitted, the default position is {0.0, 0.0, 0.0}.
  • orientation
    • Usage: <mesh orientation="0.0, 3.5, 2.5" />.
    • The orientation attribute is the direction the model is facing.
    • If the orientation attribute is omitted, then the default orientation vector is {0.0, 0.0, -1.0}.
  • size
    • Usage: <mesh size="2.1" />.
    • The size attribute sets the relative size of the mesh.
    • If it is omitted, the default value of the size is {1.0}.

Syntax

<canvas>
 <mesh name="somemesh" href="file:///file.mesh" position="0.0, 0.0, 6.0" size="2.5" orientation="1.0, 2.0, 3.0" />
</canvas>

References

  • None.