-
-
Notifications
You must be signed in to change notification settings - Fork 0
-
New
- Added changelogs
- Game Events
-
mouseScroll- emits GameMouseEvent
-
keyDown- emits GameKeyEvent
-
keyUp- emits GameKeyEvent
- "Camera" is more like to view offset. You can find it in
game.canvasViewOffset. This property is a Vector2. - Added
DrawableGameObject.IsTouching(drawGameObj, drawGameObj2)static method anddrawableGameObject.isTouching(drawGameObj) - Added
JSGL.log(content),JSGL.warn(content),JSGL.error(content). Prints message to dev console with format[DATE] [LEVEL] content
Changes
- Deprecated
-
game.mousePos- Instead usegame.input.mouseWorldPosition
-
game.mouseClientPos- Instead usegame.input.mouseClientPosition
-
game.mousePrecisePos- Instead usegame.input.mousePreciseWorldPosition
-
game.isMousePrimaryButtonDown()- Instead usegame.input.isMousePrimaryButtonDown
- Now GameMouseEvent has properties from
game.input. (Only about mouse)
Fixes
- None.
Presentation of news
Mouse wheel handling
In GameObject
... Update(event){ event.game.input.mouseScrollDelta.y; // x is ignored } ...
Without GameObject
game.on('mouseScroll', (event) => { event.mouseScrollDelta.y; // x is ignored });
How to work with input
In GameObject
... Update(event){ event.game.input.isKeyDown('w'); // <-- returns is 'w' pressed down event.game.input.isKeyUp('s'); // <-- returns is 's' clicked } ...
Without GameObject
... game.on('keyUp' (event) => { event.input.isKeyUp('s'); // <-- returns is 's' clicked }); game.on('keyDown' (event) => { event.input.isKeyDown('w'); // <-- returns is 'w' pressed down }); ...
What's Changed
- User Input, "Camera", isTouching update 1.0.8 by @Moderrek in User Input, "Camera", isTouching update 1.0.8 #13
- 1.0.8 by @Moderrek in 1.0.8 #14
Full Changelog: v1.0.7...v1.0.8
This discussion was created from the release JSGL v1.0.8 - User Input, "Camera", isTouching Update.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment