Skip to content

Commit 04c0514

Browse files
authored
Playground: Add more hotkeys to the playground (mrdoob#27762)
- Escape for deselection - Delete for node deletion
1 parent 319e314 commit 04c0514

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

playground/NodeEditor.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,15 @@ export class NodeEditor extends THREE.EventDispatcher {
411411

412412
this.preview = ! this.preview;
413413

414-
}
414+
} else if ( key === 'Delete' ) {
415+
416+
if ( this.canvas.selected ) this.canvas.selected.dispose();
417+
418+
} else if ( key === 'Escape' ) {
415419

420+
this.canvas.select( null );
421+
422+
}
416423
}
417424

418425
} );

0 commit comments

Comments
 (0)