From d9873f23be1ad5a9c4aaeab2dc0f869a6cc838c0 Mon Sep 17 00:00:00 2001 From: Mugen87 Date: Tue, 3 Sep 2019 12:39:19 +0200 Subject: [PATCH] DragControls: Remove deprecated API and checks. --- examples/js/controls/DragControls.js | 36 -------------------------- examples/jsm/controls/DragControls.js | 37 --------------------------- 2 files changed, 73 deletions(-) diff --git a/examples/js/controls/DragControls.js b/examples/js/controls/DragControls.js index 6ea844aa8d..26cb438957 100644 --- a/examples/js/controls/DragControls.js +++ b/examples/js/controls/DragControls.js @@ -6,13 +6,6 @@ THREE.DragControls = function ( _objects, _camera, _domElement ) { - if ( _objects instanceof THREE.Camera ) { - - console.warn( 'THREE.DragControls: Constructor now expects ( objects, camera, domElement )' ); - var temp = _objects; _objects = _camera; _camera = temp; - - } - var _plane = new THREE.Plane(); var _raycaster = new THREE.Raycaster(); @@ -251,35 +244,6 @@ THREE.DragControls = function ( _objects, _camera, _domElement ) { this.deactivate = deactivate; this.dispose = dispose; - // Backward compatibility - - this.setObjects = function () { - - console.error( 'THREE.DragControls: setObjects() has been removed.' ); - - }; - - this.on = function ( type, listener ) { - - console.warn( 'THREE.DragControls: on() has been deprecated. Use addEventListener() instead.' ); - scope.addEventListener( type, listener ); - - }; - - this.off = function ( type, listener ) { - - console.warn( 'THREE.DragControls: off() has been deprecated. Use removeEventListener() instead.' ); - scope.removeEventListener( type, listener ); - - }; - - this.notify = function ( type ) { - - console.error( 'THREE.DragControls: notify() has been deprecated. Use dispatchEvent() instead.' ); - scope.dispatchEvent( { type: type } ); - - }; - }; THREE.DragControls.prototype = Object.create( THREE.EventDispatcher.prototype ); diff --git a/examples/jsm/controls/DragControls.js b/examples/jsm/controls/DragControls.js index f59f240829..10cf9ada95 100644 --- a/examples/jsm/controls/DragControls.js +++ b/examples/jsm/controls/DragControls.js @@ -5,7 +5,6 @@ */ import { - Camera, EventDispatcher, Matrix4, Plane, @@ -16,13 +15,6 @@ import { var DragControls = function ( _objects, _camera, _domElement ) { - if ( _objects instanceof Camera ) { - - console.warn( 'THREE.DragControls: Constructor now expects ( objects, camera, domElement )' ); - var temp = _objects; _objects = _camera; _camera = temp; - - } - var _plane = new Plane(); var _raycaster = new Raycaster(); @@ -261,35 +253,6 @@ var DragControls = function ( _objects, _camera, _domElement ) { this.deactivate = deactivate; this.dispose = dispose; - // Backward compatibility - - this.setObjects = function () { - - console.error( 'THREE.DragControls: setObjects() has been removed.' ); - - }; - - this.on = function ( type, listener ) { - - console.warn( 'THREE.DragControls: on() has been deprecated. Use addEventListener() instead.' ); - scope.addEventListener( type, listener ); - - }; - - this.off = function ( type, listener ) { - - console.warn( 'THREE.DragControls: off() has been deprecated. Use removeEventListener() instead.' ); - scope.removeEventListener( type, listener ); - - }; - - this.notify = function ( type ) { - - console.error( 'THREE.DragControls: notify() has been deprecated. Use dispatchEvent() instead.' ); - scope.dispatchEvent( { type: type } ); - - }; - }; DragControls.prototype = Object.create( EventDispatcher.prototype ); -- GitLab