1 /** 2 * @class renderMesh 3 * @extends component 4 * @description 5 * Component that cna render a 3D object that reduces to a Mesh. 6 * 7 * Meshess are typically loaded from files or data buffers via {@link sandboxe.assets.load}. 8 * See {@link mesh}. 9 * 10 */ 11 function renderMesh() { 12 13 /** 14 * Adds a mesh to this renderer. 15 * @param {mesh} mesh 16 */ 17 this.addMesh = function(){}; 18 19 /** 20 * Retrieves the mesh at the given index if any. 21 * @param {Number} index 22 * @returns {mesh} 23 */ 24 this.getMesh = function(){}; 25 26 /** 27 * Clears out all references to meshes within this renderer. 28 */ 29 this.clear = function(){}; 30 31 32 33 /** 34 * Type of rendering primitive. 35 * The defualt is a triangle. 36 * See {@link sandboxe.renderMesh.polygon} for possible choices. 37 * @type {Number} 38 */ 39 this.primitive = 0; 40 41 /** 42 * Sets/gets the material to use with this renderer. 43 * @type {material} 44 */ 45 this.material = {}; 46 47 /** 48 * The node of this renderMesh. 49 * @type {node} 50 */ 51 this.node = {}; 52 53 /** 54 * Returns the numer of mesh objects that are being used by this renderMesh 55 * @type {Number} 56 */ 57 this.meshCount = 0; 58 59 60 61 62 63 return this; 64 }