소스 검색

Playground: Add more hotkeys to the playground (#27762)

- Escape for deselection
- Delete for node deletion
abc013 1 년 전
부모
커밋
04c0514f47
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      playground/NodeEditor.js

+ 8 - 1
playground/NodeEditor.js

@@ -411,8 +411,15 @@ export class NodeEditor extends THREE.EventDispatcher {
 
 					this.preview = ! this.preview;
 
-				}
+				} else if ( key === 'Delete' ) {
+
+					if ( this.canvas.selected ) this.canvas.selected.dispose();
+					
+				} else if ( key === 'Escape' ) {
 
+					this.canvas.select( null );
+
+				}
 			}
 
 		} );