Paul Kaplan
0838f6c875
Remove duplicate play
2018-04-13 11:12:44 -04:00
Paul Kaplan
71333765c9
Use new mediaDevices API for getUserMedia
2018-04-13 11:08:32 -04:00
Corey Frang
fe7aa8a78f
Add @param documentation for the frameInfo descriptor param
2018-04-10 13:59:23 -04:00
Corey Frang
a86202b8e2
make onError a prototype method
2018-04-10 13:59:23 -04:00
Corey Frang
0180964333
Simplify setup method promise, add onError
2018-04-10 13:59:23 -04:00
Corey Frang
89dd4720a4
store ghost state so previews will use last value whenever setup
2018-04-10 13:59:23 -04:00
Corey Frang
d0a71dcaf9
store the ghost effect in case preview is setup after it was last set
2018-04-10 13:59:23 -04:00
Corey Frang
9cd5e4da2b
Reduce indentation waterfall
2018-04-10 13:59:22 -04:00
Corey Frang
f3a956af2b
add enabled state tracking, disable state waits for setup complete
2018-04-10 13:59:22 -04:00
Corey Frang
ce03e978dc
stop the track in the "on-off" scenario
2018-04-10 13:59:22 -04:00
Corey Frang
825ff22fa4
Guard against some issues that could happen with enable/disable video quickly
2018-04-10 13:59:22 -04:00
Corey Frang
f19ae793c0
enableVideo - get rid of "requests"
2018-04-10 13:59:22 -04:00
Corey Frang
efa6b3a069
stop track
2018-04-10 13:59:22 -04:00
Corey Frang
46b4ef4d80
Use a global mirror state
2018-04-10 13:59:21 -04:00
Corey Frang
90166dc732
Add extra control blocks for video transparency and on/off control
2018-04-10 13:59:21 -04:00
Corey Frang
e4bd9cf6b2
Move methods around to sort the public interface nearer the top
2018-04-10 13:57:54 -04:00
Corey Frang
992e884668
Make disableVideo a public method
2018-04-10 13:57:54 -04:00
Corey Frang
d512042415
Add set preview ghost
2018-04-10 13:57:54 -04:00
Corey Frang
da05e673fa
_singleSetup makes more sense
2018-04-10 13:57:54 -04:00
Corey Frang
c10696f88c
Rewrite the setup/disable process from review comments
2018-04-10 13:57:53 -04:00
Corey Frang
eef88f6c2d
First draft of video IO device
2018-04-10 13:57:53 -04:00
Paul Kaplan
140094a7ad
Make "when clicked" blocks target dependent.
...
This involves adding a new opcode, event_whenstageclicked, and adding a
method to the blocks container to update the opcode pair depending on
whether the target is the stage. This method is then called in two
places: first after the sb2 import parses the blocks (not done in the
sb2 parsing itself because no other blocks are target specific) and then
again when blocks are shared between targets.
Also added tests for the block container method, and a fixture project
that tests the opcode splitting on sb2 import.
2018-03-20 10:41:50 -04:00
Karishma Chadha
d51a2ad39f
Use wasDragged flag to selectively activate 'when this sprite clicked' block on mouse up.
2018-02-28 16:45:26 -05:00
Florrie
be83c0ee74
Mouse wheel IO system
...
Towards fixing #865 . This adds an IO class for detecting the mouse wheel
being scrolled. Basic tests are included; they mock the runtime to see
what blocks are activated by scrolling.
2018-01-26 17:13:01 -04:00
Paul Kaplan
327d1179d9
Update the mouse io to give scratch coordinates and client coordinates
...
Fixes GUI #642 https://github.com/LLK/scratch-gui/issues/642
Fixes GUI #179 https://github.com/LLK/scratch-gui/issues/179
2018-01-09 10:37:16 -05:00
Paul Kaplan
bbcb6bd5b7
Differentiate clamped from non clamped mouse io data (GUI#179)
2018-01-09 09:42:16 -05:00
Andrew Sliwinski
b78bdb4c93
Address feedback from review
2017-11-27 15:00:53 -05:00
Andrew Sliwinski
a8c629dc9b
Replace 'got' module with 'nets'. Resolves GH-802
2017-11-20 17:04:17 -05:00
Ray Schamp
32bc087bba
Fix remaining lint issues
2017-08-26 13:24:10 -04:00
Christopher Willis-Ford
9d306962bd
Fix socket.io-client dependency problems re: build
...
The Socket.io client library pulls in some extra dependencies in a way
that isn't fully compatible with Webpack. Switching to their build
output file, instead of the file specified in their `package.json`,
makes those errors go away.
2017-05-11 12:07:46 -07:00
Christopher Willis-Ford
35d0544ce0
Respond to review comments
...
- Pin `got` and `socket-io.client`
- Finish removing `removeSocket`-related code
2017-05-05 10:37:29 -07:00
Christopher Willis-Ford
e096f43487
DeviceManager: add more jsdoc, remove _sockets
...
It turns out we don't need the Device Manager to centrally track each
socket, so this change removes the Device Manager's `_sockets` property
and related code.
2017-05-03 16:28:06 -07:00
Christopher Willis-Ford
9a9c509e76
Implement a few tests for io/deviceManager
2017-04-28 14:50:57 -07:00
Christopher Willis-Ford
f3c6be2881
Add an I/O device to represent the Device Manager
2017-04-28 13:40:13 -07:00
Ray Schamp
a4f095db5e
Use ES6 style classes
2017-04-17 19:42:48 -04:00
Ray Schamp
e01c4ae108
Pass with --fix
2017-04-17 15:10:04 -04:00
Ray Schamp
11e28111c5
Activate click hats on mouse up to match 2.0
2017-03-02 11:32:10 -05:00
SillyInventor
8354774fcf
Switch from return null to return empty string in keyCodeToScratchKey
2017-02-09 14:09:01 -05:00
Andrew Sliwinski
1b4a1ca1bc
Resolve merge conflicts
2016-10-24 15:53:42 -04:00
Andrew Sliwinski
153df22918
Address feedback from PR review
2016-10-24 15:16:06 -04:00
Andrew Sliwinski
279a9560af
Resolve JSDoc lint errors
2016-10-24 12:04:06 -04:00
Andrew Sliwinski
336bc65e2d
Add minimal test coverage and docs for mouse module
2016-10-24 11:56:52 -04:00
Andrew Sliwinski
2de58050dd
Conform JSdoc for keyboard module to format used elsewhere
2016-10-24 11:40:07 -04:00
Ray Schamp
7712b2902f
Fix quote-props
2016-10-24 11:02:19 -04:00
Ray Schamp
f6c0064235
All linting other than console statements
2016-10-23 22:20:29 -04:00
Ray Schamp
68ed110b49
Pass with eslint --fix
...
Resolved whitespace issues, e.g., space-before-function-paren and key-spacing
2016-10-23 12:41:45 -04:00
Andrew Sliwinski
faf8a898a0
Add minimal test coverage and docs for keyboard module.
2016-10-21 18:31:07 -04:00
Tim Mickel
e49f076fa1
Interpreter fixes, enhancements, features ( #280 )
...
* Thread stepping rework; interp.redraw equivalent
* Add turbo mode and pause mode
* Yielding behavior to match Scratch 2.0
* Implement warp-mode procedure threads
* Add check for recursive call
* Inline wait block timer
* Revert to setInterval and always drawing
* Restore yielding in glide
* 30TPS compatibility mode
* 5-call count recursion limit
* Removing dead primitive code
* To simplify, access runtime.threads inline in `stepThreads`.
* Warp mode/timer fixes; recursive check fixes; clean-up
* Add basic single-stepping
* Add single-stepping speed slider
* Allow yielding threads to run in single-stepping
* Restore inactive threads tracking for block glows
* Add clock pausing during pause mode
* Documentation and clean-up throughout
* Don't look for block glows in `thread.topBlock`.
* Add null check for block glows; rename `_updateScriptGlows` to reflect block glowing
* Use the current executed block for glow, instead of stack
* Add more comments to `stepToProcedure`, and re-arrange to match 2.0
* Tweak to Blocks.prototype.getTopLevelScript
* Revert previous
* Fix threads array to be resilient to changes during `stepThreads`
* Restore inactive threads filtering
* Fix typo in "procedure"
* !! instead of == true
2016-10-17 23:23:16 -04:00
Ray Schamp
499ba5235c
Scope renderer to instance
...
This allows usage without global scope to attach a renderer to the VM. It also provides the ability to have multiple VMs/renderers to be used at once.
2016-09-20 02:52:33 -04:00
Tim Mickel
542899949e
Update for RenderWebGLLocal -> RenderWebGL ( #181 )
...
* Update for RenderWebGLLocal -> RenderWebGL
* Move button under title
2016-09-15 19:02:03 -04:00
Tim Mickel
833c5ed313
When clicked hats ( #156 )
2016-09-12 17:16:10 -04:00
Tim Mickel
c357a62005
Key repeats, with OS delay ( #168 )
2016-09-12 13:52:44 -04:00
Tim Mickel
f7e339f7c2
Remove uppercase from keyboard hat activators
2016-09-07 16:00:22 -04:00
dekrain
7caf8e588a
More hats ( #143 )
...
* Key pressed hat
* Tabs -> Spaces
* Oops
* Edge activate
* Fix hat
Phew...
* I forgot to change it also here
:/ :/ :\
* Minor fixes for TravisCi
* Minor docs
* Line length
2016-09-03 16:33:45 -04:00
Tim Mickel
e831866789
Keyboard events, "key is down" reporter ( #117 )
...
* Keyboard events, "key is down" reporter
* Update comment about inputs
* Simplify/generalize keyMap into a keys-pressed list
* Cast values passed to scratchKeyToKeyCode appropriately.
* Cut unspaced key values
* Fix lint from merge commit
2016-09-02 11:23:09 -04:00
Tim Mickel
aebcfde492
Add VM "I/O devices", clock, mouse as demo
2016-08-15 21:37:36 -04:00