r3-legacy/src/r3-api-mouse.js

27 lines
570 B
JavaScript

/**
* R3.API.Mouse
* @param apiComponent
* @constructor
*/
R3.API.Mouse = function(
apiComponent
) {
__API_COMPONENT__;
if (R3.Utils.UndefinedOrNull(apiComponent.position)) {
apiComponent.position = new R3.API.Vector2(
{
parent : this,
register : true,
name : this.name + ' - Position'
}
);
}
this.position = apiComponent.position;
};
R3.API.Mouse.prototype = Object.create(R3.API.Component.prototype);
R3.API.Mouse.prototype.constructor = R3.API.Mouse;