- [x] Add a comment with more info on the normalization in `mouseposition()` - presumably: normalization to [-1, 1] and inverting the y axis to go from DOM to three.js world space - [x] Simplify if-statements in `updateSelectionBox()`, `attachSingleTransformControl()`, and `updateSelection()` - reduce unnecessary nesting of if-statements and merge if-branches with the same outcome/shared code - set `showX = (axis === "X")` etc directly if possible - [x] Consistence use of `this.#selectedObject`, `this.#transformControls.object`, and `this.#selectedObjects[0]` - Should they be identical (in most cases) or are there significant differences? - If identical → is it sufficient to just use `this.#selectedObject`? - If not identical → clarify how they differ - [x] Check if `deselectAll()` should reset the `this.#selectedObject` - [x] Should `itemSelectedEvent()` be renamed to `dispatchItemSelectedEvent()`? - [x] In `setUpMouseEvents()`: find a better name for `canvasChild` or add a comment explaining what exactly the last child of canvas is - [x] Can we use `this.#canvas` in `itemSelectedEvent()`?
mouseposition()updateSelectionBox(),attachSingleTransformControl(), andupdateSelection()showX = (axis === "X")etc directly if possiblethis.#selectedObject,this.#transformControls.object, andthis.#selectedObjects[0]this.#selectedObject?deselectAll()should reset thethis.#selectedObjectitemSelectedEvent()be renamed todispatchItemSelectedEvent()?setUpMouseEvents(): find a better name forcanvasChildor add a comment explaining what exactly the last child of canvas isthis.#canvasinitemSelectedEvent()?