Skip to content

Commit 839c370

Browse files
committed
Have Picker use controlling instead of root
In order to share property with base class.
1 parent e1476b6 commit 839c370

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

examples/Examples.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107
"hover_point = Mesh(geometry=SphereGeometry(radius=0.05),\n",
108108
" material=MeshLambertMaterial(color='hotpink'))\n",
109109
"\n",
110-
"click_picker = Picker(root=surf, event='dblclick')\n",
111-
"hover_picker = Picker(root=surf, event='mousemove')\n",
110+
"click_picker = Picker(controlling=surf, event='dblclick')\n",
111+
"hover_picker = Picker(controlling=surf, event='mousemove')\n",
112112
"\n",
113113
"# Set up scene:\n",
114114
"key_light = DirectionalLight(color='white', position=[3, 5, 1], intensity=0.4)\n",

js/scripts/three-class-config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ module.exports = {
251251
superClass: 'Controls',
252252
properties: {
253253
event: new Types.String('click'),
254-
root: new Types.ThreeType('Object3D', {nullable: true}),
255254
all: new Types.Bool(false),
256255
distance: new Types.Float(null, {nullable: true}),
257256
point: new Types.Vector3(0, 0, 0),

js/src/controls/Picker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var PickerModel = PickerAutogen.PickerModel.extend({
3535

3636
onPick: function() {
3737
var mouse = this.obj.pickCoordinates;
38-
var objects = pick(mouse, this.camera, this.get('root').obj);
38+
var objects = pick(mouse, this.camera, this.get('controlling').obj);
3939

4040
var info = getinfo(objects.length > 0 ? objects[0] : null);
4141

0 commit comments

Comments
 (0)