playground
playground copied to clipboard
Buttons in mouse and touch
this.buttons = {};
seems to be unused in Mouse.js
and Touch.js
.
In Mouse.js
lines like this
this[buttonName] = true;
should be changed to
this.buttons[buttonName] = true;
?
I don't see any use case in Touch.js
.
I probably wanted app.mouse.buttons.left
, but made a typo and got used to app.mouse.left
without noticing it.
I am removing this.buttons
with the next release then.
I guess Pointer.js
is missing button state property now.
Also, gamepads
is unused in here
this.gamepads = {};
because of this line.
var gamepads = navigator.getGamepads();
Or, maybe, the idea was to use this.gamepads[i]
instead of this[i]
?
I don't have gamepads to test but how would you get the number of gamepads? I'm missing something obvious, probably.
And, since I'm at it: what's the purpose of zeroState
? Doesn't seem to be used anywhere.
(i'm just gonna add things here if you don't mind)
Here prevEasing
and prevDuration
seem to have no function.
Here repeat
is defined but there is no implementation for repeating the animation as far as I can see.
VideoRecorder
depends on canvas render. Shouldn't this be under layer/
? I doin't see it in documentation. Is it experimental or deprecated?
Last example on http://playgroundjs.com/playground-tween is not working in Chrome and Firefox (black background).
Gamepads:
The reason for this[i]
over this.gamepads[i]
is because it would end up with app.gamepads.gamepads
which is counter intuitive
I've been using zeroState
at some point as my local copy of a gamepad button stat. I had to copy the buttons as they are read-only and I can't. This whole thing has to be rewriten so I wouldn't be too attached to anything gamepad related.
Video Recorder:
Will probably get removed, it's slow, clumsy, and depends on Whammy.js
Tweens:
I will fix it ;)