51 lines
1.1 KiB
Plaintext
51 lines
1.1 KiB
Plaintext
|
/**
|
||
|
* This component makes the parentEntity (ex. car) follow the path provided by the spline
|
||
|
* @param id String
|
||
|
* @param name String
|
||
|
* @param domElementId
|
||
|
* @param camera R3.D3.Camera
|
||
|
* @param parentEntity
|
||
|
* @constructor
|
||
|
*/
|
||
|
R3.D3.API.Input.Editor = function (
|
||
|
id,
|
||
|
name,
|
||
|
domElementId,
|
||
|
camera,
|
||
|
parentEntity
|
||
|
) {
|
||
|
R3.Component.call(
|
||
|
this,
|
||
|
R3.Component.COMPONENT_EDITOR_INPUT,
|
||
|
{
|
||
|
'camera' : R3.D3.Camera
|
||
|
},
|
||
|
null,
|
||
|
parentEntity
|
||
|
);
|
||
|
|
||
|
if (R3.Utils.UndefinedOrNull(id)) {
|
||
|
id = R3.Utils.RandomId();
|
||
|
}
|
||
|
this.id = id;
|
||
|
|
||
|
if (R3.Utils.UndefinedOrNull(name)) {
|
||
|
name = this.constructor.name;
|
||
|
}
|
||
|
this.name = name;
|
||
|
|
||
|
if (R3.Utils.UndefinedOrNull(domElementId)) {
|
||
|
domElementId = "divCanvas";
|
||
|
}
|
||
|
this.domElementId = domElementId;
|
||
|
|
||
|
if (R3.Utils.UndefinedOrNull(camera)) {
|
||
|
camera = null;
|
||
|
}
|
||
|
this.camera = camera;
|
||
|
|
||
|
};
|
||
|
|
||
|
R3.D3.API.Input.Editor.prototype = Object.create(R3.Component.prototype);
|
||
|
R3.D3.API.Input.Editor.prototype.constructor = R3.D3.API.Input.Editor;
|