diff --git a/examples/js/controls/TransformControls.js b/examples/js/controls/TransformControls.js index 2a0b2b75a57c9c..956f2ddc60c163 100644 --- a/examples/js/controls/TransformControls.js +++ b/examples/js/controls/TransformControls.js @@ -142,6 +142,8 @@ THREE.TransformControls = function ( camera, domElement ) { this.object = object; this.visible = true; + return this; + }; // Detatch from object @@ -151,6 +153,8 @@ THREE.TransformControls = function ( camera, domElement ) { this.visible = false; this.axis = null; + return this; + }; // Defined getter, setter and store for a property diff --git a/examples/jsm/controls/TransformControls.d.ts b/examples/jsm/controls/TransformControls.d.ts index 86082763c06353..5a7a6a43a72b0a 100644 --- a/examples/jsm/controls/TransformControls.d.ts +++ b/examples/jsm/controls/TransformControls.d.ts @@ -29,7 +29,7 @@ export class TransformControls extends Object3D { visible: boolean; attach(object: Object3D): this; - detach(): void; + detach(): this; pointerHover(pointer: Object): void; pointerDown(pointer: Object): void; pointerMove(pointer: Object): void; diff --git a/examples/jsm/controls/TransformControls.js b/examples/jsm/controls/TransformControls.js index 056bc20f395b52..4940987cfa0641 100644 --- a/examples/jsm/controls/TransformControls.js +++ b/examples/jsm/controls/TransformControls.js @@ -167,6 +167,8 @@ var TransformControls = function ( camera, domElement ) { this.object = object; this.visible = true; + return this; + }; // Detatch from object @@ -176,6 +178,8 @@ var TransformControls = function ( camera, domElement ) { this.visible = false; this.axis = null; + return this; + }; // Defined getter, setter and store for a property