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