I have declared object 'Render' and added 2 object 'vector3D'& 'matrix' to it through the prototype. For vector3D object, i have included 3 property through its prototype.
Render = function () {
};
Render.prototype = {
vector3D: function () {
},
matrix: function () {
},
}
var Render = new Render();
Render.vector3D.prototype = {
//Members
x: "",
y: "",
z: "",
isValid: !isNaN(this.x) && !isNaN(this.y) && !isNaN(this.z),
}
If i want to access the vector properties, i have to follow the below steps each time
var Rendered = new Render();
var vector=new Rendered.vector3D();
vector.x=10;
vector.y=20;
Is this correct or is there any other easy way to access the properties of vector object?