/** * 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 * @constructor */ R3.D3.API.Input.Fly = function ( id, name, domElementId, camera ) { R3.Component.call( this, R3.Component.COMPONENT_FLY_INPUT, { 'camera' : R3.D3.Camera } ); 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.Fly.prototype = Object.create(R3.Component.prototype); R3.D3.API.Input.Fly.prototype.constructor = R3.D3.API.Input.Fly;