Is there any way to trigger a function when setting the property of an object?
function Vector(x,y,z){
this.x= Quaternion(x);
this.y=y;
this.z=z;
}
function Quaternion(x,y,z,w){
this.x=x;
this.y=y;
this.z=z;
this.w=w;
}
Is there any way to trigger a function when setting the property of an object?
function Vector(x,y,z){
this.x= Quaternion(x);
this.y=y;
this.z=z;
}
function Quaternion(x,y,z,w){
this.x=x;
this.y=y;
this.z=z;
this.w=w;
}