Auto Mouse
Automouse provides a point at the mouse position. It's the last known position of the mouse; updated upon mousemove.
let point = Point.mouse.position
Meta Data
| title | Auto Mouse |
| dependencies | () |
| unused_keys | () |
| unknown_keys | ('tags',) |
| tags | ['mouse'] |
| filepath_exists | True |
| path | automouse |
| filepath | automouse.js |
| clean_files | () |
-
VariableDeclaration
-
ClassDeclarationclass
AutoMouse
extends Noneclass comments:The _AutoMouse_ class cares for much of the mouse pointer functionality for a stage and the a point. It's functionality is designed to hook onto preparing `stages` and their canvas. It exists as a singleton `autoMouse`: autoMouse = new AutoMouse() autoMouse == stage.mouse Point.mouse == stage.mouse Initiate like this: Point.mouse?.mount(stage.canvas) Synonymous to: installCanvas(canvas, stage){ this.canvasMap.set(canvas, stage) Point.mouse?.listen(canvas) }-
dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])The _AutoMouse_ class cares for much of the mouse pointer functionality for a stage and the a point. It's functionality is designed to hook onto preparing `stages` and their canvas. It exists as a singleton `autoMouse`: autoMouse = new AutoMouse() autoMouse == stage.mouse Point.mouse == stage.mouse Initiate like this: Point.mouse?.mount(stage.canvas) Synonymous to: installCanvas(canvas, stage){ this.canvasMap.set(canvas, stage) Point.mouse?.listen(canvas) }a reference of clicks
-
dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])The given event has a stage ready for mounting. Perform any changes, such as adding a reference to the mouse.console.log('AutoMouse::stagePrepareHandler', d)
-
dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])A function to help clamp the wheel scroll within a range. By using this function, the wheel value doesn't exceed the clamp. let size = mouse.clampWheelSize(5, 20) The same can be done with the clamp function let size = clamp(mouse.wheelSize(), 30, 300) but when the wheel exceeds the clamp, it'll scroll into an unused range.
ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])VariableDeclarationExpressionStatement:
dict_keys(['type', 'expression', 'pos'])ExpressionStatement:
dict_keys(['type', 'expression', 'pos']) -