Joke Book
43faf2a64d
Use a utility function for random number picking
2019-03-09 14:30:17 +00:00
Eric Rosenbaum
580e93d15a
fix norwegian id
2019-03-07 17:00:48 -05:00
Eric Rosenbaum
9455112d74
improve variable name
2019-03-07 17:00:40 -05:00
Katie Broida
c37745e97e
Cast sprite name to string before getSpriteTargetByName
2019-03-07 16:09:46 -05:00
unknown
c603e0d653
Fixing linting errors.
2019-03-07 08:38:52 -05:00
unknown
0a9f629fb4
Comment out console logs.
2019-03-07 08:26:38 -05:00
unknown
43fde03f57
Fixing the comment yet again.
2019-03-06 13:17:06 -05:00
unknown
f1fc54bfaf
Fixing comment based on cwf suggestion.
2019-03-06 13:13:57 -05:00
unknown
2148e9ead1
Adding stopAll binding back in after un-rebased merge.
2019-03-06 13:08:55 -05:00
unknown
54ed67ac22
Adding TaskQueue import back in after un-rebased merge.
2019-03-06 12:57:32 -05:00
unknown
7a14dad668
Removing console logs that came in accidentally via un-rebased merge.
2019-03-06 12:55:04 -05:00
unknown
fed43e1841
Removing busy flag again which was reintroduced via a un-rebased merge.
2019-03-06 12:53:17 -05:00
unknown
b31a1f0e98
Move argument processing outside of TaskQueue.do calls.
2019-03-06 12:47:44 -05:00
Evelyn Eastmond
f5dc90f729
Fixing comment again.
2019-03-06 12:47:44 -05:00
Evelyn Eastmond
d2c14f872c
Fixing comment.
2019-03-06 12:47:44 -05:00
Evelyn Eastmond
00d1a407ac
Fixing some comments.
2019-03-06 12:47:44 -05:00
Evelyn Eastmond
3c77f82238
Changing maxTokens and refillRate for microbit test.
2019-03-06 12:47:44 -05:00
Evelyn Eastmond
fb36731ce4
Add catches for task queue Promise rejections, and some debug console logs.
2019-03-06 12:47:44 -05:00
Evelyn Eastmond
eecd508464
Fix usage of task queue with an opcode that has its own promise/time delay resolution (i.e. displayText in microbit).
2019-03-06 12:46:56 -05:00
Evelyn Eastmond
dbb884ddef
Removing task queue constructor hacks.
2019-03-06 12:46:08 -05:00
Evelyn Eastmond
6688106852
Continuing to test the newest TaskQueue with microbit.
2019-03-06 12:44:22 -05:00
Eric Rosenbaum
59586291d7
Comments
2019-03-06 12:03:54 -05:00
Eric Rosenbaum
ee0d395b9c
Cleanup check supported and get extension locale
2019-03-06 12:03:46 -05:00
Michael "Z" Goddard
882a83db9a
do not evaluate text-encoding until it is needed
...
text-encoding has about ~700KB of data that is great to skip decoding
for systems that have a browser provided TextDecoder.
2019-03-06 11:11:44 -05:00
Michael "Z" Goddard
bc5605cf80
lazy evaluate project loading related code
2019-03-06 11:11:44 -05:00
Michael "Z" Goddard
a5009b4c59
delay extension evaluation until that extension is installed
...
Reduce the amount of code that needs to evaluated before we can
starting the target project if there is one. It is key to note that the
music extension includes ~2MB of base64 encoded sound samples. This
skips evaluating those samples and decoding base64 into binary typed
arrays.
2019-03-06 11:11:44 -05:00
Michael "Z" Goddard
d05a414439
turn getCanvas into a class CanvasPool
2019-03-06 10:53:15 -05:00
Eric Rosenbaum
8fc3111b21
use id for default language
2019-03-06 10:51:08 -05:00
Michael "Z" Goddard
c01175613b
load-costume: idiomatic promise and createImageBitmap
2019-03-06 10:49:27 -05:00
Michael "Z" Goddard
9bd1bc5915
load-costume: use one canvas pool
2019-03-06 10:49:27 -05:00
Eric Rosenbaum
65d0a3aa11
cleanup
2019-03-06 10:37:36 -05:00
Eric Rosenbaum
d059f8baa6
Check and set language, handling many-to-one mapping
2019-03-06 10:37:36 -05:00
Eric Rosenbaum
ab633d3448
WIP updating to use new language info data
2019-03-06 10:37:36 -05:00
Eric Rosenbaum
bc9e215ee8
Fill in language info data
2019-03-06 10:37:36 -05:00
Eric Rosenbaum
04c6bc189a
Add language ids
2019-03-06 10:37:36 -05:00
Eric Rosenbaum
da212bcf06
wip switching from using locales to language IDs internally
2019-03-06 10:37:36 -05:00
Eric Rosenbaum
920096d061
Add romanian and fix ordering
2019-03-06 10:37:36 -05:00
Eric Rosenbaum
3996cc0c6b
Add Welsh, Swedish and Turkish
2019-03-06 10:37:36 -05:00
Eric Rosenbaum
f33e07132e
Add hindi, korean, norwegian, and adjust rates
2019-03-06 10:37:36 -05:00
Eric Rosenbaum
5b5c0d80eb
Set tenor playback rate for single gender languages
2019-03-06 10:37:36 -05:00
Eric Rosenbaum
0d12cead31
key language info by locale id, and add chinese
2019-03-06 10:37:36 -05:00
Katie Broida
aeea9c1a51
Use bitmap source width
2019-03-05 16:05:07 -05:00
Kevin Andersen
a4e005cf2b
Merge branch 'develop' of https://github.com/LLK/scratch-vm into boostextension
2019-03-04 18:11:26 -05:00
Kevin Andersen
6cf00a4235
Linted
2019-03-04 17:39:02 -05:00
Evelyn Eastmond
cd85e8ddfa
Merge pull request #2014 from evhan55/extensions/microbit-timeout
...
Fix micro:bit auto-disconnect from setInterval to setTimeout
2019-03-04 15:29:38 -05:00
Michael "Z" Goddard
33f4482127
Merge pull request #1972 from mzgoddard/sound-bank-over-sprite
...
Sound bank over sprite
2019-03-04 12:51:10 -05:00
Michael "Z" Goddard
9350c2a9c2
Merge pull request #1947 from mzgoddard/sb2-load-assets-first
...
Deserialize sb2 assets before other sprite data and blocks
2019-03-04 12:50:09 -05:00
Kevin Andersen
852ae43348
This commit is a combination of changes after an internal play test with the Scratch Team, as well as code cleanup.
...
Motors:
- motor position will now initially report 0 instead of false
- removed remaining motor position zeroing functions.
- removed startBraking().
- turnOn() and turnOnForDegrees() are now using an absolute max power as per the protocol documentation.
- the "turn for rotations"-block now accepts negative values.
-- turnOnForDegrees() accepts a direction to reflect the change above. The direction from the block is calculated against the motors current direction.
- commented EV3 tacho calculation code for motor positioning removed.
- Changed BoostMotorLabel to reflect actual motor block argument.
- startMotorPower() renamed to setMotorPower() since it doesn't start the motor.
- setMotorPower() will not start the motor.
- Max number of rotations for a motor-block is clamped to 100 rotations.
- 'Default' removed from BoostMotorLabel-enum as it wasn't used.
Sensors:
- removed remaining distance-related functions.
- color-reporters default value is now none rather than black.
- tilt-angles left and right switched to reflect the hubs orientation.
2019-03-04 12:38:02 -05:00
Kevin Andersen
669ff1abf1
- Boost-icon added to blocks
...
- Added BoostColorLabel-enum for color sensing block argument labels
- Regrouped blocks to be grouped by functionality, promoting color sensing
- Added 'any' to whenColor hat-block which triggers if the color sensor reports a value that is not none. Implemented an oldColor-value that allows the hat-block to trigger between color-changes, even if the sensor doesnt see 'none' in the meantime.
2019-03-01 11:36:57 -05:00
Evelyn Eastmond
59ab3b717d
Fixing clearInterval > clearTimeout.
2019-03-01 10:04:56 -05:00
Evelyn Eastmond
7a1367d81a
Change from setInterval to setTimeout for auto disconnect feature.
2019-03-01 10:02:30 -05:00
Kevin Andersen
ed051cdd82
Changed color-sensing values to be strings instead of LEGO numbering, which seems more intuitive.
2019-02-27 15:49:24 -05:00
Kevin Andersen
d2d236d282
After discussion with @ericrosenbaum, decided to change the following:
...
- Regroup blocks by functionality, i.e. motors, led, color-sensing, etc.
- Remove motor position zero-ing as concept and use MathUtil.wrapClamp to instead wrap everything around 360 degrees.
- WIP: "Set motor power to"-block should update motors that are currently running to emphasize principle that blocks have actions.
2019-02-27 15:19:40 -05:00
Kevin Andersen
7fc705b741
- Consolidated BLE enums for brevity
...
- Added IOs from documentation to BoostIO enumotor follows the speed set by Scratch and not the highest possible speed.
- Cleaned up line breaks in codebrake rather than float when stopping.
- Cleaned up documentationensors
- Deleted unused MOTOR_OUTPUT from BoostMode-enumbased on BoostMode-enum
- Set default-value for "set motor power to"-block to be all motors after feedback from @ericrosenbaum
- Implemented check in getMotorPosition() to see if motor is actually there before reporting position
2019-02-26 14:44:13 -05:00
Chris Willis-Ford
bb42c0019c
Merge pull request #1998 from cwillisf/task-queue-enhancements
...
Task queue enhancements
2019-02-25 21:28:05 -05:00
Katie Broida
cff1c2c0a4
Merge pull request #1959 from ktbee/declare-const-once
...
Declare const once to be reused in for loop
2019-02-25 15:57:52 -05:00
Karishma Chadha
475eaf3dfa
Merge pull request #1969 from mzgoddard/benchmark-more-data
...
Benchmark more data
2019-02-25 11:38:09 -05:00
Michael "Z" Goddard
0e9357b062
benchmark load now
...
This is a slight ergonomics improvement for faster benchmark loading.
We should be able to apply this to gui as well if it already does do
the same thing.
2019-02-22 16:01:09 -05:00
Michael "Z" Goddard
991acbb36a
benchmark more loading stats
...
- Display time to load just the (json) data
- Display progress and time for content
- Display progress and time hydrating the downloaded assets
2019-02-22 16:01:08 -05:00
Michael "Z" Goddard
84de5cdc7e
determine _pushThread defaults without Object.assign
2019-02-22 15:56:34 -05:00
Kevin Andersen
40c022ca8e
- Refactoring of output commands:
...
- Simplified generateOutputCommand() to follow the LEGO Wireless Protocol command-structure. Every output-command must have a portID, execution information, sub-command, and then followed by a custom payload which must be defined according to the protocol documentation mentioned in the extension.
- Simple motor commands now use the above subcommand-structure rather than the former primitive command structure.
- stopLED()-function removed since it's not used
- Implemented check of pendingPromiseFunction() for motors before firing.
2019-02-22 12:50:19 -05:00
Kevin Andersen
9767d72188
- Cleaned up TODOs!
...
- Added and made use of more enums rather than hardcoded bytes
2019-02-21 14:47:30 -05:00
Kevin Andersen
a3dcdd01dd
Merge branch 'develop' of https://github.com/LLK/scratch-vm into boostextension
2019-02-21 14:00:43 -05:00
Kevin Andersen
1d72b3b971
- Removed unused distance-mode from BoostMode-enum
...
- Added descriptions to BoostMode-enums
- Improved motor-position handling
- Added helper-functions for converting to/from motor position values
- Added default value to BoostMotor._pendingPromiseFunction
- Added changeLedColorBy-block
- Only motors will now try to resolve motor-promises
- Changed motor position wording from 'zero' to 'reset'
- Modified tilt-thresholds to improve tilt-handling
2019-02-21 13:35:21 -05:00
Joke Book
b29f07636d
fix: Equalise the chances when picking a random backdrop
2019-02-20 21:11:27 +00:00
Eric Rosenbaum
c0e80edfcc
Update block and menu icons
2019-02-20 11:13:00 -05:00
Eric Rosenbaum
931d7e9a62
More re-ordering
2019-02-20 11:00:21 -05:00
Eric Rosenbaum
9e650279a6
Re-order blocks
2019-02-20 10:59:07 -05:00
Eric Rosenbaum
7da54dd067
Add tilted any option
2019-02-20 10:49:03 -05:00
Eric Rosenbaum
a19585af75
Add tilt blocks
2019-02-19 16:09:58 -05:00
Eric Rosenbaum
ba548701e2
Set update rate to 80ms
2019-02-19 15:14:37 -05:00
Eric Rosenbaum
f4662f833f
rename “tilt angle” and “spin speed” reporters
2019-02-19 15:06:03 -05:00
Eric Rosenbaum
ec2ca32ffa
Remove “moved” gesture
2019-02-19 13:55:24 -05:00
Christopher Willis-Ford
e6dd3f1175
Fix TaskQueue constructor when no options passed
2019-02-15 15:20:38 -08:00
Michael "Z" Goddard
146e93e4ec
start loading sb2 sounds before handling sb2 data
2019-02-15 17:43:55 -05:00
Michael "Z" Goddard
d4320f1c26
start loading sb2 assets before handling sb2 data
2019-02-15 17:34:14 -05:00
Karishma Chadha
a86dc5bb58
Merge pull request #1944 from mzgoddard/benchmark-load-time
...
Benchmark load time
2019-02-15 13:52:48 -05:00
Kevin Andersen
e99a217ba5
Merge branch 'develop' of https://github.com/LLK/scratch-vm into boostextension
2019-02-14 13:31:13 -05:00
Kevin Andersen
32a9674b5d
Added disconnect-handling per new extensions-spec. Motor-commands that fail will now also cause their blocks to complete
2019-02-14 13:30:58 -05:00
unknown
ac571ece5a
Fixing comment.
2019-02-13 14:14:05 -05:00
Evelyn Eastmond
8bbdc4e691
Resolves #1988 : Vernier gdxfor tilt values should be 0 when disconnected.
2019-02-13 14:14:05 -05:00
Chris Willis-Ford
7ab41d2bd9
Merge pull request #1881 from apple502j/pen-legacy
...
Fix legacy `set pen color` block's transparency behavior
2019-02-13 10:51:47 -08:00
Chris Willis-Ford
a02fb3877b
Merge pull request #1871 from Affonso-Gui/fix_dynamic_menu_string
...
Fix dynamic menus for string arrays
2019-02-13 10:41:36 -08:00
Paul Kaplan
3b203a2a9b
Merge pull request #1995 from paulkaplan/is-discrete
...
Support isDiscrete flag on monitors
2019-02-13 11:19:51 -05:00
Christopher Willis-Ford
be040f4c9b
TaskQueue: Add option for max total cost
2019-02-12 18:57:58 -08:00
Christopher Willis-Ford
2a9a3b11b9
TaskQueue: support canceling a single task
2019-02-12 18:11:13 -08:00
Kevin Andersen
245ba998d2
merge changes from origin/develop
2019-02-12 13:18:28 -05:00
chrisgarrity
77fd88302f
Merge pull request #1993 from chrisgarrity/handle-nested-sb2
...
handle sb2 files zipped in a folder
2019-02-12 16:41:27 +01:00
Kevin Andersen
e2bd28b85e
Cleaned up documentation (WIP). Added Output subcommand enum for use throughout extension
2019-02-12 10:10:21 -05:00
Karishma Chadha
59f58b0284
Merge pull request #1933 from ErikMejerHansen/feature/field_type_support
...
Feature/field type support
2019-02-12 09:59:22 -05:00
Christopher Willis-Ford
d27dc5d54a
TaskQueue: reduce number of async steps before task runs
2019-02-11 12:46:48 -08:00
Christopher Willis-Ford
5a17bb1451
Add clearTimeout
to Timer and MockTimer
2019-02-11 12:14:44 -08:00
Kevin Andersen
c902bbaa0d
Cleaned up some documentation. Consolidated and renamed Boost enums
2019-02-11 11:30:22 -05:00
Paul Kaplan
6754fa9334
Add isDiscrete to monitor record, update sb2,3 and conversion tests
2019-02-11 11:09:01 -05:00
Kevin Andersen
bf02426a4a
added named variables to onMessage for readability. Changed wording of motor-blocks. Added BLE Advertisement Manufacturer Data as filter for scanning, for https://github.com/LLK/scratch-link/issues/112
2019-02-11 10:57:57 -05:00
chrisgarrity
a4b0550013
handle sb2 files zipped in a folder
...
If the asset can’t be found by name, look for the same asset in a folder within the zipfile.
2019-02-08 15:03:27 +01:00
Chris Willis-Ford
51252531af
Update src/extensions/scratch3_pen/index.js
...
Co-Authored-By: apple502j <33279053+apple502j@users.noreply.github.com>
2019-02-08 20:03:54 +09:00
Chris Willis-Ford
2d575a9208
Update src/extensions/scratch3_pen/index.js
...
Co-Authored-By: apple502j <33279053+apple502j@users.noreply.github.com>
2019-02-08 20:03:48 +09:00
Christopher Willis-Ford
46a1ae83a0
Use MockTimer for TaskQueue tests
2019-02-07 16:35:33 -08:00
Christopher Willis-Ford
7f80fe17b3
Build a mock Timer class and add tests for it
2019-02-07 16:35:32 -08:00
Evelyn Eastmond
b5eb54fc44
Resolves 1975: Vernier gdxfor extension should disconnect on sensor timeout.
2019-02-07 16:18:56 -05:00
Evelyn Eastmond
16ebcb82b2
Merge pull request #1986 from evhan55/bug/gdxfor-falling
...
Vernier gdxfor "falling?" report false when not connected
2019-02-07 15:54:46 -05:00
Evelyn Eastmond
7e7326f474
Merge pull request #1984 from evhan55/extensions/gdxfor-update-rate
...
Vernier gdxfor input rate change
2019-02-07 15:24:11 -05:00
Evelyn Eastmond
a68886cee9
Resolves #1977 : Vernier gdxfor extension falling? reports true while hardware disconnected.
2019-02-07 14:51:59 -05:00
picklesrus
b03d6ee7a5
Merge pull request #1985 from kchadha/fix-type-handling-xml-escape
...
Fix issue where non-strings were getting passed in to escape functions
2019-02-07 13:35:50 -05:00
Eric Rosenbaum
9dd8e9398a
Merge pull request #1982 from VernierST/extensions/gdx-for-freefall-and-tilt
...
GDX-FOR better freefall algorithm and different tilt options
2019-02-07 11:59:50 -05:00
Karishma Chadha
c761a9c82e
Fix issue where non-strings were getting passed in to escape functions for handling special characters that can appear in xml. Add tests.
2019-02-07 11:58:10 -05:00
Evelyn Eastmond
104e997b59
Changing the input rate, resolves 1976.
2019-02-07 10:48:48 -05:00
Paul Kaplan
765f2b2549
Merge pull request #1983 from picklesrus/broadcast-msg-chars
...
Broadcast msg chars
2019-02-07 08:32:55 -05:00
Paul Kaplan
6deab79903
Merge pull request #1979 from paulkaplan/share-blocks-new-ids
...
Add a utility for giving blocks new IDs, use it for sharing blocks.
2019-02-07 08:31:25 -05:00
picklesrus
b904f19c1d
Fix loading broadcast messages with special characters for projects that were converted from 2.0.
2019-02-06 16:58:46 -05:00
picklesrus
ecbfcd78bd
Fix sb2 loading of broadcast messages with special characters.
2019-02-06 16:48:39 -05:00
Ian Honohan
7b3996a173
Add localization to the front/back/left/right menu items
2019-02-06 12:51:32 -08:00
Ian Honohan
7cbf4e2a60
Changes the tilt options from x/y to front/back and left/right. Also limits the tilt range to +/-90, just like micro::bit
2019-02-06 10:52:18 -08:00
Eric Rosenbaum
7f6fa5f272
Merge pull request #1978 from ericrosenbaum/feature/vernier-spacers-and-rename
...
Vernier gdxfor extension: add spacers and rename "spin"
2019-02-06 11:55:10 -05:00
Eric Rosenbaum
3ae6c93394
Change l10n id so translations will update
2019-02-06 10:40:06 -05:00
Paul Kaplan
31fbcfa4d7
Add a utility for giving blocks new IDs, use it for sharing blocks.
2019-02-06 10:16:22 -05:00
Eric Rosenbaum
48e01fe1a3
Rename “spin speed” to “spin”
2019-02-05 17:22:17 -05:00
Eric Rosenbaum
78c72f4185
Add spacers
2019-02-05 17:22:06 -05:00
Karishma Chadha
4e924bf4b5
Merge pull request #1973 from kchadha/fix-variable-characters
...
Fix variable characters
2019-02-05 17:01:43 -05:00
Karishma Chadha
c796a8b1cc
Merge pull request #1962 from LLK/project-dirty-state-fixes
...
Project dirty state fixes
2019-02-05 16:38:30 -05:00
Ian Honohan
5a2eb3b296
Accounts for any rotation in the GDX-FOR while trying to detect freefall
2019-02-05 12:12:17 -08:00
Karishma Chadha
af0bebb773
Fix typo in comment
2019-02-04 23:33:18 -05:00
Evelyn Eastmond
39f69bd8c1
Separate out _spinSpeedFromGyro function.
2019-02-04 21:56:20 -05:00
Evelyn Eastmond
8da82cfe01
Adding JSDoc and removing extension manager gdx uncommenting.
2019-02-04 21:45:23 -05:00
Evelyn Eastmond
da3fc930b1
Factoring out a _onSensorValueChanged function.
2019-02-04 21:41:57 -05:00
Evelyn Eastmond
e87dd01629
Add clearing of values on disconnect.
2019-02-04 19:43:50 -05:00
Evelyn Eastmond
93aecc88be
Filling in some comments.
2019-02-04 19:41:07 -05:00
Evelyn Eastmond
9390cd0f8a
Fixing 'gyro' labels to 'spin speed'.
2019-02-04 19:41:07 -05:00
Evelyn Eastmond
d84dd72a8c
Removing canReadSensors and sensorsEnabled, first pass.
2019-02-04 19:41:07 -05:00
Evelyn Eastmond
eb4f6235d9
Testing new sensor array to store sensor data on/offline.
2019-02-04 19:41:07 -05:00
Karishma Chadha
d91c19434f
Rename util function to be more descriptive. Refactor parameters to remove unused code.
2019-02-04 19:05:28 -05:00
Kevin Andersen
5822f762ca
Multiple motor-changes. Changed _isOn to _status to reflect the more advanced states a motor (or port) can be in. Implemented promise-based completion on motor-on-for-rotation-block, since this block requires a callback from the hub. Changed lower threshold for power-bias function. Deleted some outdated todos. Changed connectID-terminology to portID. Implemented handling port output command feedback. Commented out some distance and tilt-related blocks that I think we can do without and that will lower the number of blocks.
2019-02-04 16:30:04 -05:00
Karishma Chadha
7faddb6c8f
Replace xml-unsafe chars in sb3 variables.
2019-02-04 15:32:01 -05:00
Karishma Chadha
57f112cbfd
Remove unsafe chars from variable ids when importing from 2.0.
2019-02-04 10:29:24 -05:00
Karishma Chadha
166bc37f6f
Merge pull request #1945 from yokobond/fix-message-variable-name-destruction
...
Escape variable name in XML
2019-02-04 10:10:13 -05:00
Kevin Andersen
c03dc60feb
Deleted BoostUnit, since the new protocol has prescribed units for a particular mode. Implemented helper-function for turning javascript numbers into a bytearray. Changed generateInputCommand()-function delta-parameter to be int32 according to the new protocol. Fixed issue that whenColor hat-block didn't work until dropdown value changed.
2019-02-01 10:19:59 -05:00
Eric Rosenbaum
12283daaa4
Merge pull request #1958 from ericrosenbaum/feature/vernier-updates
...
Update, re-order and clean up Vernier Force & Accel extension blocks
2019-01-30 16:49:46 -05:00
Karishma Chadha
13e69bad7b
Code cleanup -- move out duplicate .then
statements after the next .then
(at the higher level)
2019-01-30 16:45:38 -05:00
Karishma Chadha
94cc7e66b6
Remove superfluous runtime not optional warnings.
2019-01-30 15:57:56 -05:00
Karishma Chadha
dfcd09fedc
Stop emitting project changes within 'runtime._step()'. Emit project changes in scenarios that were previously taking advantage of runtime._step()
2019-01-30 10:59:25 -05:00
Karishma Chadha
e276bcc9fd
Emit project changes when actually editing blocks instead of whenever scratch-blocks events are fired.
2019-01-30 10:59:25 -05:00
Karishma Chadha
a9cf509a55
Merge pull request #1941 from kchadha/add-runtime-to-blocks
...
Add reference for `runtime` to blocks container
2019-01-30 10:57:45 -05:00
Eric Rosenbaum
3bdb13f049
Rename and re-order freefall threshold constant
2019-01-29 17:12:15 -05:00
Eric Rosenbaum
6cbc71f8d1
Add facing threshold
2019-01-29 17:09:11 -05:00
Katie Broida
356a4e7880
Declare const once to be resused in for loop
2019-01-29 10:47:54 -05:00
Eric Rosenbaum
4449ee7f0f
Only round sensor vals in opcodes
2019-01-28 17:45:16 -05:00
Eric Rosenbaum
c033732d62
Use enums and constants in isFacing
2019-01-28 17:15:37 -05:00
Eric Rosenbaum
f795197047
Enum and localization for facing up/down
2019-01-28 17:12:25 -05:00
Eric Rosenbaum
b5fb80190d
Factor out and scale spin speed
2019-01-28 17:06:14 -05:00
Eric Rosenbaum
1abbf55f55
Re-order and update blocks
2019-01-28 14:05:39 -05:00
Karishma Chadha
d7134d2edd
Merge pull request #1946 from kchadha/fix-slider-min-max-save-load
...
Fix saving and loading of slider min max values.
2019-01-28 11:10:14 -05:00
Eric Rosenbaum
c542b2384f
Merge pull request #1938 from ericrosenbaum/bugfix/text2speech-default-input-localization
...
Fix Text to Speech extension default input localization
2019-01-28 10:40:58 -05:00
Karishma Chadha
94fa3d56c8
Fix saving and loading of slider min max values. Add test for sb2 to sb3 conversion that tests all montior properties remain the same after save and load.
2019-01-25 14:14:46 -05:00
yokobond
8eee92d41a
Escape variable name in XML
2019-01-25 10:31:33 +09:00
Michael "Z" Goddard
08c939f522
add simple loading time benchmark detail
2019-01-24 17:48:17 -05:00
Michael "Z" Goddard
d8ae96a58c
build playground/benchmark.js
2019-01-24 17:48:17 -05:00
Eric Rosenbaum
92d2a1673a
Updating blocks
2019-01-24 17:01:46 -05:00
Karishma Chadha
0bf5d8ab90
Update VM getPlaygroundData function to remove circular dependency in blockContainer. It wasn't being used by the tests or the playground and it is not an issue with actual project serialization. Update test to stop passing in runtime to blocklyListen function.
2019-01-24 15:26:16 -05:00
Erik Mejer Hansen
c750957465
Convert lint breakage
2019-01-24 13:21:46 +01:00
Kevin Andersen
2aaf424279
stuff
2019-01-24 10:08:17 +01:00
Karishma Chadha
e5723e299a
Add runtime to blocks container since it was getting passed in everywhere where it was being referenced. Update calls to blocks constructor.
2019-01-23 18:18:38 -05:00
Eric Rosenbaum
09daeb53a1
Don’t use a variable in formatMessage
2019-01-23 17:56:38 -05:00
Eric Rosenbaum
9e00c06ddf
Localize the makey makey blocks
2019-01-23 14:05:00 -05:00
Karishma Chadha
98b92be2d7
Merge pull request #1928 from kchadha/timer-perf
...
Improve the performance of the timer utilitiy
2019-01-23 11:41:41 -05:00
Karishma Chadha
7588f08f3b
Use sequencer runtime directly instead of doing an extra lookup
2019-01-23 11:33:36 -05:00
Kevin Andersen
ffb5cd63af
added zero-block for motor positioning. Added turn-for-rotation-block, but its WIP. Modified generateOutputCommand to allow for advanced motor commands. Changed motor position reporter to follow hardware instead of wrap-clamping.
2019-01-23 09:10:03 +01:00
Kevin Andersen
7cee07db83
Changed default motor to A instead of all. Added TODOs and DEBUG code comments. Changed output-commands to use proper enums
2019-01-21 08:01:10 +01:00
Erik Mejer Hansen
ceaa3c7857
Add support extensions to define custom field types.
...
This is done by adding a new element "customFieldTypes" to the extension info structure. Ex:
```
customFieldTypes: {
angleField: {
implementation: { fromJson: options => new AngleField(options) },
output: 'number',
outputShape: 2,
}
}
```
Field types are defined by an implementation that has to match what is expected by ScratchBlocks.Field.register and its output and shape.
src/engine/runtime.js has been updated to handle the new "customFieldTypes"-field:
- Existing (global) field types cannot be overridden
- New fields are "namespaced" to the extension in the same way as opcodes are.
Once the custom field type has been picked up by scratch-vm a "EXTENSION_FIELD_ADDED" event is emitted.
It is then up to the hosting app to call ScratchBlocks.Field.register to register the field type with ScratchBlocks. Ex:
```
vm.addListener('EXTENSION_FIELD_ADDED', fieldInfo => {
this.ScratchBlocks.Field.register(fieldInfo.name, fieldInfo.implementation);
});
```
2019-01-20 21:24:32 +01:00
Eric Rosenbaum
9d4442444f
Merge pull request #1914 from bocoup/sensor-error
...
Prevent console errors when disconnecting/reconnect to Vernier extension
2019-01-18 17:09:38 -05:00
Eric Rosenbaum
0b251adace
Merge pull request #1763 from evhan55/extensions/disconnect-errors
...
Various fixes to extension disconnect errors
2019-01-18 16:58:45 -05:00
Evelyn Eastmond
7831256044
Change event names to be more descriptive. Fix some typos.
2019-01-16 20:17:19 -05:00
Evelyn Eastmond
6f9a4864e9
Fix typo.
2019-01-16 19:59:51 -05:00
Evelyn Eastmond
802f752ded
Prevent setting onCharactericChanged callback to null.
2019-01-16 19:50:32 -05:00
Evelyn Eastmond
6e290ea937
Calling microbit timeout error in an arrow function.
2019-01-16 16:23:06 -05:00
Evelyn Eastmond
e1e8e57403
Adding TODOs.
2019-01-16 16:08:15 -05:00
Evelyn Eastmond
5c885911e7
Replacing a timeout clear.
2019-01-16 16:06:44 -05:00
Evelyn Eastmond
28a54d6e83
Adding back in the disconnect branch to be fixed later in another PR.
2019-01-16 16:05:13 -05:00
Evelyn Eastmond
2761209631
Changing JSDoc slightly, again.
2019-01-16 16:00:25 -05:00
Evelyn Eastmond
c30807a678
Finetuning a JSDOC.
2019-01-16 15:56:58 -05:00
Evelyn Eastmond
7ec9494804
Making corrections based on discussion with ericr.
2019-01-16 15:54:38 -05:00
Evelyn Eastmond
bd8f129022
Adding a TODO for an optional read param.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
e4b82aeaef
Adding callback back to battery read to fix clearing the characteristicChanged callback by accident.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
d7b6cfae97
Move micro:bit data stopped error string to constant. Added another jsdoc.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
f030afbdc5
Removing extra params from a BLE read in WeDo2.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
156b1bc21a
Adding new runtime event for intentional peripheral disconnects.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
7518a9c149
Changing error to be more accurate.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
2d9531a15c
Removing console logs.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
fdda1e53e3
Change microbit extension to send BLE socket error on data lost, instead of calling disconnect directly.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
fab292889f
Adding disconnect callback to BT/BLE error system.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
a177b4eeb7
Adding interval to check for battery level.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
ae95df553d
Merge pull request #1924 from evhan55/extensions/vernier-withresponse-fix
...
Removing withResponse flag in GDX-FOR extension write method
2019-01-16 15:14:35 -05:00
Karishma Chadha
0fa5e9181a
Merge pull request #1839 from mzgoddard/fix-missing-no-param
...
fix: initialize stack frame params for all procedures
2019-01-16 14:06:38 -05:00
Karishma Chadha
325372233d
Improve the performance of the timer utilitiy so that it does not garbage collect multiple times per frame.
2019-01-16 10:09:19 -05:00
Eric Rosenbaum
5d329663aa
do not load vernier extension yet
2019-01-15 15:20:05 -05:00
Evelyn Eastmond
a6c05d8f61
Removing withResponse flag since it is not needed and was causing a crash on Windows.
2019-01-15 11:43:08 -05:00
Karishma Chadha
d5c2991a25
Merge pull request #1923 from ktbee/missing-block-early-exit
...
Add early exit for non-existent block
2019-01-15 11:29:40 -05:00
Karishma Chadha
fefb032f17
add comment before using util.initParams
...
Co-Authored-By: mzgoddard <mzgoddard@gmail.com>
2019-01-15 11:24:47 -05:00
Katie Broida
8256b3d5c5
Add early exit for non-existent block
2019-01-15 11:15:23 -05:00
Eric Rosenbaum
b57b6c0a84
Merge pull request #1916 from ericrosenbaum/bugfix/vernier-dont-keep-data
...
Prevent excess event emitting in Vernier extension
2019-01-15 11:07:35 -05:00
Eric Rosenbaum
e414e1b246
Add todo comment about keepValues flag
2019-01-15 10:46:22 -05:00
Eric Rosenbaum
2856b32dd5
Merge branch 'develop' into sensor-error
2019-01-15 10:38:51 -05:00
Eric Rosenbaum
8b2f326469
Merge pull request #1920 from evhan55/extensions/vernier-peripheral-list
...
Properly disconnect BLE socket in GDX-FOR scan/disconnect
2019-01-15 10:31:48 -05:00
Evelyn Eastmond
308bb7095a
Properly disconnect BLE socket.
2019-01-14 20:17:18 -05:00
Eric Rosenbaum
7111513169
Merge pull request #1909 from ericrosenbaum/feature/vernier-block-icon
...
Add Vernier extension block icon
2019-01-14 18:26:12 -05:00
Karishma Chadha
43fd733b15
Merge pull request #1912 from kchadha/executable-targets-fix
...
Populate executable targets when runtime.targets is populated
2019-01-14 14:57:29 -05:00
Eric Rosenbaum
8f0e025261
Use flag to not keep data, and remove listener hack
2019-01-14 14:01:43 -05:00
Karishma Chadha
59a865ef47
Create a new addTarget
function on the runtime which populates the targets list as well as the executable targets list.
2019-01-14 11:48:11 -05:00
Kevin Andersen
0557fc8e09
Motor position reporter kinda working. LED commands working. Added mode information to generateOutputCommand-function. Removed value-format switch-case in favor of hard-coded value-interpretation, but put in a TODO that we perhaps should consider doing it in the future.
2019-01-13 21:10:20 +01:00
Valerie Young
daccdb0a71
Satisfy linter
2019-01-11 16:53:47 -05:00
Valerie Young
f2f4af2590
Don't send disconnect to a closed device
2019-01-11 16:47:42 -05:00
Valerie Young
328e4480f6
Prevent reading non-existing sensors
2019-01-11 16:43:08 -05:00
Karishma Chadha
fbee37e915
Populate executable targets when runtime.targets is populated so that scripts don't run before they are supposed to (e.g. before targets are done getting installed).
2019-01-11 14:52:34 -05:00
Eric Rosenbaum
730ec44e5d
Update block icon
2019-01-11 12:07:16 -05:00
Valerie Young
9e612acb27
Forgotten parens
2019-01-11 11:00:08 -05:00
Valerie Young
92297444a0
Is jumped should call is freefalling
2019-01-10 15:39:46 -05:00
Valerie Young
f669b4bcb7
satisfy linter
2019-01-10 12:19:00 -05:00
Valerie Young
7a1b6d4f60
Remove normal force from acceleration magnitude
2019-01-10 12:19:00 -05:00
Valerie Young
92e1f040c3
Add when jumped and is free falling
2019-01-10 12:19:00 -05:00
Valerie Young
a62f5b9b0e
Add facing blocks
2019-01-10 12:19:00 -05:00
Eric Rosenbaum
522b5e1a8e
Merge pull request #1905 from bocoup/update-blocks
...
Add Vernier's GDX-FOR extension
2019-01-10 11:04:33 -05:00
Valerie Young
ac29927c22
other minor feedback
2019-01-10 10:21:32 -05:00
Valerie Young
477c307304
Remove one copy of constants
2019-01-10 10:11:46 -05:00
Valerie Young
5d4aebf301
Satisfy linter
2019-01-09 18:02:36 -05:00
Valerie Young
ae889304c5
satisfy linter
2019-01-09 17:51:56 -05:00
Valerie Young
d2fec35fd8
Set the period to 10 milliseconds
2019-01-09 17:50:25 -05:00
Valerie Young
338b30a17b
Increase speed of sample
2019-01-09 17:09:08 -05:00
Valerie Young
abf84975bd
Add tilt blocks
2019-01-09 17:08:01 -05:00
Paul Kaplan
c33d6caa2b
Merge pull request #1902 from picklesrus/unknown-monitors
...
Allow projects with unknown monitors to load.
2019-01-09 14:50:25 -05:00
Valerie Young
d3e5c7d928
Remove directions option from hats and use magnitude
2019-01-09 13:55:35 -05:00
Kevin Andersen
af800956fe
Initial commit. WIP
2019-01-09 10:06:48 -05:00
Eric Rosenbaum
aebc0d25be
Merge pull request #1903 from ericrosenbaum/bugfix/midi-drum-import
...
Add legacy drum block to specmap
2019-01-08 18:07:43 -05:00
picklesrus
cdec5a1cef
Allow projects with unknown monitors to load.
2019-01-08 15:00:00 -05:00
Eric Rosenbaum
a6421b91f8
Add legacy drum block to specmap
2019-01-08 14:49:34 -05:00
Karishma Chadha
bb8463f14a
Log a warning for currentCostume out of range when incorrect project is being serialized.
2019-01-08 13:26:06 -05:00
Karishma Chadha
c27b624401
When loading a project, clamp the currentCostume number to an appropriate value.
2019-01-08 13:07:46 -05:00
Valerie Young
da608f6f18
degrees/s instead of radians, normalize force
2019-01-08 12:07:39 -05:00
Valerie Young
a0e1b5aa5b
Rename spin speed, make hat blocks work
2019-01-08 11:53:51 -05:00
Valerie Young
be35eb1f70
remove units
2019-01-08 11:15:55 -05:00
Valerie Young
b5decacee2
update name of variable
2019-01-07 18:20:45 -05:00
Valerie Young
5696b76d9a
fix typo
2019-01-07 18:17:20 -05:00
Valerie Young
4d75f7776c
Remove the onClose skeletons
2019-01-07 18:09:23 -05:00
Valerie Young
4529533aa8
Remove accidental double declarations
2019-01-07 17:45:20 -05:00
Karishma Chadha
36fe6378db
Merge pull request #1899 from paulkaplan/less-cloning
...
Do not deep clone before serializing.
2019-01-07 13:36:34 -05:00
Paul Kaplan
94240d743e
Merge pull request #1897 from kchadha/fix-cloud-var-limit
...
Fix cloud variable limit
2019-01-07 13:28:47 -05:00
Paul Kaplan
fd2723ff7d
Do not deep clone before serializing.
...
This was ok when we did not attach assets, but it is not cool now. With large assets, this made saving extremely slow
2019-01-07 13:02:30 -05:00
Valerie Young
9a3517d878
First draft communication with scratch link and vernier
2019-01-07 11:54:15 -05:00
Valerie Young
a0cccba3be
satisfy linter
2019-01-07 11:29:26 -05:00
Valerie Young
deab7dd209
Add @vernier/godirect module
2019-01-07 11:29:26 -05:00
Valerie Young
1471248657
Clean up and all sensors working
2019-01-07 11:29:26 -05:00
Valerie Young
d70fb96d01
Force working with vernier node module
2019-01-07 11:29:26 -05:00
Valerie Young
a0bf69f17c
Change extension name
2019-01-07 11:29:26 -05:00
Valerie Young
c305379393
format menu
2019-01-07 11:29:26 -05:00
Valerie Young
e4d9f9cdff
tilt to speed
2019-01-07 11:29:26 -05:00
Valerie R Young
e209ec3240
satisfy linter
2019-01-07 11:29:26 -05:00
Valerie R Young
1503b0add9
Add some names
2019-01-07 11:29:26 -05:00
Valerie R Young
26067a9287
Draft of goforce blocks
2019-01-07 11:29:26 -05:00
Karishma Chadha
85843e5d6f
Fix cloud variable limit
2019-01-07 11:12:47 -05:00
Eric Rosenbaum
ad6f15bfa1
Merge pull request #1869 from apple502j/english-meow-meow
...
Always use English for kitten
2019-01-07 10:54:14 -05:00
Karishma Chadha
808cb2cd60
Merge pull request #1878 from towerofnix/clamp-ghost
...
Clamp ghost effect
2019-01-06 17:42:43 -05:00
Ray Schamp
11546c7f0d
Skip failing tests, this is @thisandagain's fault :)
2019-01-02 12:41:09 -05:00
Ray Schamp
2406286180
Fix test expectation, this is @kchadha's fault :)
2019-01-02 12:13:43 -05:00
Ray Schamp
80ff7e6756
Generate md5s for uploaded assets
...
Without this, we were erroneously setting uploaded assets as clean, so they wouldn't be saved when uploaded from an .sb2/3 file.
2019-01-02 11:46:47 -05:00
apple502j
7863731bb4
Change legacy pen color block's behavior
2018-12-29 09:49:31 +09:00
Florrie
fbb6d63e03
Clamp ghost effect
...
Cherry-picked from 35c8890425
(#1887 )
2018-12-28 10:39:42 -04:00
Karishma Chadha
ed21af577c
Let errors from loadCostume bubble up so that we do not attempt to call installTargets on an invalid target (e.g. one that has no costumes).
2018-12-26 14:15:57 -05:00
Karishma Chadha
c5284469d3
Merge pull request #1831 from apple502j/stop-ask
...
Clear ask bubble when stopForTarget
2018-12-26 10:29:23 -05:00
Guilherme Affonso
f4c6816ea7
Fix dynamic menus for string arrays
2018-12-26 19:26:59 +09:00
apple502j
a22d7dd6de
remove todo
2018-12-23 00:22:41 +09:00
apple502j
cbf70d9609
This kitten speaks only English
2018-12-22 17:59:57 +09:00
Karishma Chadha
23298bd18f
Fix issue where uploading an sb with jpg images wasn't saving and loading properly.
2018-12-21 16:04:39 -05:00
Karishma Chadha
c38a054d4a
Fix issue where uploading the default vector image in place of a broken image was not correctly setting the costume's md5.
2018-12-20 19:29:37 -05:00
Karishma Chadha
4ad101f5d4
Apply suggestions from code review
...
Co-Authored-By: mzgoddard <mzgoddard@gmail.com>
2018-12-20 14:12:33 -05:00
Karishma Chadha
f1a24e3296
Update src/virtual-machine.js
...
Co-Authored-By: mzgoddard <mzgoddard@gmail.com>
2018-12-20 14:11:58 -05:00
Michael "Z" Goddard
5593b28984
try handling as a Scratch 1 file after scratch-parser validation fails
2018-12-20 13:55:49 -05:00
Michael "Z" Goddard
a92f33960f
fix: use ValidationError to determine if an SB1File error should throw
2018-12-20 13:32:30 -05:00
Michael "Z" Goddard
f43163fc73
depend on scratch-sb1-converter and convert sb1 files to sb2
2018-12-20 12:09:58 -05:00
Katie Broida
5941b9173e
Use default builtin SVG asset for SVGs that can't be loaded for some reason
2018-12-19 14:34:18 -05:00
DD Liu
fe375fa672
Merge pull request #1849 from fsih/addCostumeFromLibrary
...
Add addCostumeFromLibrary
2018-12-18 12:12:18 -05:00
picklesrus
fee248cd98
Merge pull request #1853 from mzgoddard/fix-execute-last-operation
...
Always pop the stack when the promised value is from the last op
2018-12-18 11:13:57 -05:00
picklesrus
178bdbd81b
Fix typo in comment
2018-12-18 11:01:53 -05:00
Eric Rosenbaum
724cdb5785
For order of key menu to match the core block
2018-12-17 18:24:14 -05:00
Eric Rosenbaum
d629d10717
Merge pull request #1854 from ericrosenbaum/bugfix/kitten-removes-punctuation
...
Prevent text to speech kitten voice from speaking names of punctuation
2018-12-17 16:00:28 -05:00
Michael "Z" Goddard
bdebfaf823
always pop the stack when the promised value is from the last op
2018-12-17 15:25:26 -05:00
julescubtree
040aeaa44e
enable loading draggability
...
in sb3.js, parseScratchObject()
2018-12-14 16:17:36 -08:00
Eric Rosenbaum
3bfc422ce0
Replace all non-space chars with meow
2018-12-14 17:28:45 -05:00
DD
a4744f5ac9
Add addCostumeFromLibrary
2018-12-14 14:20:42 -05:00
Karishma Chadha
6c1031c534
Use '' instead of null
...
Co-Authored-By: apple502j <33279053+apple502j@users.noreply.github.com>
2018-12-14 17:35:07 +09:00
Karishma Chadha
dfd4735871
Merge pull request #1833 from kchadha/fix-sb2-from-sb1-import
...
Fix issue importing some sb2s that were originally sb1s, with baseLayerMd5 property formatted differently.
2018-12-13 15:59:44 -05:00
Eric Rosenbaum
f86a23df98
Merge pull request #1790 from ericrosenbaum/midi-play-drum-v3
...
Add support for scratch 1.x MIDI drum blocks
2018-12-13 13:39:29 -05:00
Paul Kaplan
2f6527cb1d
Merge pull request #1843 from paulkaplan/fix-mouse-rounding
...
Round the values reported from the sensing mouse x/y reporters
2018-12-13 11:27:05 -05:00
Paul Kaplan
1bede31ec1
Round the values of mouse io getScratchX/Y
2018-12-13 11:06:31 -05:00
Michael "Z" Goddard
20ff75b776
fix: initialize stack frame params for all procedures
...
A previous change fixed compatibility with Scratch 2 removing 3's
unintentional scope leaking. This furthers that change so that
procedures with no parameters will also not accidentally use values in
other procedure stacks.
2018-12-13 10:51:44 -05:00
Karishma Chadha
6c51c40245
Merge pull request #1834 from kchadha/edge-hat-duplicate-sprite
...
Fix issue where edge-activated hats only run on one sprite after duplicating the sprite
2018-12-12 21:13:09 -05:00
Karishma Chadha
95dafb43c4
Serialize x and y for topLevel blocks even if one or both of the values is 0.
2018-12-12 18:51:36 -05:00
Karishma Chadha
e5b00dfd95
Fix issues uncovered where clones were triggering automatically on create.
2018-12-12 13:25:19 -05:00
Karishma Chadha
6c4fb29523
Move tracking of edge activated hat values into target.
2018-12-12 12:05:55 -05:00
Karishma Chadha
19737d4e39
Fix issue where edge-activated hats only run on one sprite when sprite is duplicated or cloned.
2018-12-11 12:28:37 -05:00
apple502j
73968895d8
Display the next ask
2018-12-11 18:39:09 +09:00
Karishma Chadha
eeac4e62f6
Fix issue where sb2s originally from sb1s sometimes have baseLayerMd5 formatted incorrectly.
2018-12-10 18:17:24 -05:00
Karishma Chadha
532e63da15
Merge pull request #1830 from kchadha/fix-svg-sprite-upload
...
Fix sprite upload from vector image uploading at the wrong size
2018-12-10 10:40:19 -05:00
Eric Rosenbaum
fdbb0b26a8
Remove “space space space”, add CCW sequence
2018-12-09 23:16:32 -05:00
Eric Rosenbaum
a785b86949
Clear key press buffer on stop button
2018-12-09 23:13:55 -05:00
apple502j
aea7000917
Clear ask bubble when stopForTarget
2018-12-09 13:14:42 +09:00
Karishma Chadha
c1b697b575
Compare asset type runtime formats instead of AssetType objects because costume assets can get flattened (e.g. while uploading a sprite from file).
2018-12-07 21:46:28 -05:00
picklesrus
ebe06a97d9
Merge pull request #1818 from picklesrus/monitor-vars-project-load
...
Clear out the blocks in dispose. Fixes #1758 where old monitored vari…
2018-12-07 15:08:09 -05:00
picklesrus
3f3c34b43a
Given the bug found with the old approach, fix this by going and deleting all of the monitor blocks for each sprite and the global variables.
2018-12-06 18:59:58 -05:00
Paul Kaplan
8405ff00d4
Merge pull request #1825 from paulkaplan/emit-start-publicly
...
Emit PROJECT_START event publicly on green flag click.
2018-12-06 15:38:05 -05:00
Paul Kaplan
56c062eee3
re-emit the PROJECT_START event publicly, add unit test
2018-12-06 11:47:09 -05:00
Karishma Chadha
87f57c8c95
Merge pull request #1823 from kchadha/slider-cloud-vars
...
Request cloud variable update in top level setVariableValue API
2018-12-06 10:56:07 -05:00
Paul Kaplan
23d9c21a0e
Merge pull request #1822 from paulkaplan/fix-list-clones
...
Make duplicateVariable deep copy the array instead of keeping reference.
2018-12-06 09:21:41 -05:00
Paul Kaplan
4756726e43
Merge pull request #1816 from paulkaplan/do-save-tl-var-blocks
...
Add a test and fix for not serializing top-level variable reporters
2018-12-06 05:32:23 -05:00
Paul Kaplan
9e57404222
Merge pull request #1821 from paulkaplan/fix-variable-monitor-switching
...
Fix an issue where the targetId of a monitor could be reassigned
2018-12-06 05:32:11 -05:00
Karishma Chadha
dc4fd15197
Make a cloud device requestVariableUpdate when setting a variable through the vm's top level setVariableValue API. Add unit test for new functionality.
2018-12-05 22:38:06 -05:00
Paul Kaplan
809d2de9f2
Fix typo uncovered by loading lonely variable reporters
2018-12-05 16:59:47 -05:00
Paul Kaplan
d50504e339
Make duplicateVariable deep copy the array instead of keeping reference.
2018-12-05 16:27:10 -05:00
Paul Kaplan
e0b314d3fb
Fix an issue where the targetId of a monitor could be reassigned
...
This caused a local variable monitor to try running its thread on a different sprite, causing a new local variable to be created with the same monitor id.
2018-12-05 15:02:27 -05:00
Katie Broida
9d3d53537d
Merge pull request #1741 from ktbee/load-video-state
...
Set video state after project load and after adding extension through UI
2018-12-05 14:33:19 -05:00
Eric Rosenbaum
1ce88ca8bc
Merge pull request #1819 from ericrosenbaum/bugfix/text2speech-encoding
...
Text to Speech use encodeURIComponent
2018-12-05 12:45:33 -05:00
Eric Rosenbaum
d46dd31bb0
Use encodeURIComponent
2018-12-05 12:35:17 -05:00
Paul Kaplan
ff3391718d
Merge pull request #1815 from paulkaplan/clear-pen-on-dispose
...
Clear the pen layer when runtime dispose happens.
2018-12-05 12:30:24 -05:00
picklesrus
cddcea652b
Clear out the blocks in dispose. Fixes #1758 where old monitored variables were getting kept across project loads
2018-12-05 12:09:12 -05:00
Paul Kaplan
be65b615a2
Add a test and fix for not serializing top-level variable reporters
2018-12-05 11:35:22 -05:00
Katie Broida
ef8bbb7186
Set video state after project load event, adding extension for the first time
2018-12-05 11:08:00 -05:00
Paul Kaplan
4fe06153d6
Merge pull request #1809 from paulkaplan/serialize-infinity
...
Serialize Infinity and NaN to 0
2018-12-05 08:28:50 -05:00
Paul Kaplan
6bd2307c99
Clear the pen layer when runtime dispose happens.
2018-12-04 16:43:31 -05:00
Paul Kaplan
37fe0eb0a9
Merge pull request #1812 from paulkaplan/no-video-thumbnails
...
Add a flag to force the video layer to be transparent.
2018-12-04 15:29:13 -05:00
Paul Kaplan
051e2f5014
Merge pull request #1803 from paulkaplan/remove-promise-finally
...
Remove promise finally because we are having trouble with polyfills
2018-12-04 13:01:34 -05:00
Paul Kaplan
5d0d82bc0a
Make sure to never set the ghost property without considering the forceTransparentPreview property as well.
2018-12-04 12:34:24 -05:00
Paul Kaplan
2c6428dcdc
Add a flag to force the video layer to be transparent.
...
This is needed to allow the GUI to toggle the video preview using postIOData('video', {forceTransparentPreview: true}) before taking a snapshot.
2018-12-04 12:30:08 -05:00
Paul Kaplan
7e96ef2985
Serialize Infinity and NaN to 0
2018-12-04 10:52:49 -05:00
Katie Broida
967cab8f20
Make the wait block's logic and behavior more consistent with Scratch 2 ( #1759 )
2018-12-04 10:35:42 -05:00
Paul Kaplan
821dbb88d3
Remove promise finally because we are having trouble with polyfills
2018-12-03 16:47:46 -05:00
Eric Rosenbaum
536305af1b
Remove vestigial device manager ( #1793 )
2018-12-03 15:52:23 -05:00
Karishma Chadha
3952c7e4fa
Merge pull request #1795 from kchadha/cloud-rename-bugfix
...
Serialize variable isCloud flag to xml.
2018-12-03 13:21:25 -05:00
Paul Kaplan
1811eef8fa
Fix usage of loadCostumeFromAsset.
...
Fixes the issue where duplicating a sprite did not correctly assign a new skinId for the renderer. It was because the renderer didn't appear to be available, so a new skinId was not assigned.
2018-12-03 10:48:35 -05:00
Karishma Chadha
5917ea571d
Serialize variable isCloud flag to xml.
2018-11-29 22:59:55 -05:00
DD Liu
122443a75f
Merge pull request #1754 from bocoup/handle-infinity
...
Make Scratch 3 comparisons with +/-Infinity match Scratch 2
2018-11-29 14:31:10 -05:00
Valerie R Young
8c2da6b56a
Satisfy linter
2018-11-29 14:07:27 -05:00
Eric Rosenbaum
7198ace595
Makey Makey extension ( #1782 )
...
* Initial working makey makey extension
* Cleanup and localization
* Add block icon
* Localization and cleanup
* Docs and cleanup
* Update block icon
* Cleanup
* Fix key press args
2018-11-29 10:45:40 -05:00
Karishma Chadha
ff2566fec4
Merge pull request #1778 from kchadha/emit-cloud-data-update
...
Emit cloud data update
2018-11-28 17:23:29 -05:00
Eric Rosenbaum
f617723348
Add support for scratch 1.x MIDI drum blocks
2018-11-28 15:39:00 -05:00
Karishma Chadha
6d033af61e
When clearing the runtime, emit has cloud data update.
2018-11-28 15:03:20 -05:00
Karishma Chadha
b828444ea8
Update comments for addCloudVariable and removeCloudVariable.
2018-11-28 15:03:20 -05:00
Karishma Chadha
431e92aa54
Fix up tests and remove unused function.
2018-11-28 15:03:20 -05:00
Karishma Chadha
86d61a4c20
Emit event tracking when the project's hasCloudData status changes. Cloud var creation now happens regardless of connectivity to the provider.
2018-11-28 15:03:19 -05:00
picklesrus
90b627982c
fix todo
2018-11-28 12:34:49 -05:00
picklesrus
eefe021425
add todo and remove a newline
2018-11-28 12:33:04 -05:00
picklesrus
4a542b455d
fix code review comments
2018-11-28 10:36:22 -05:00
picklesrus
f214d3a191
VM changes for the sensing_of block. This handles lists properly (by ignoring them like Scratch2 and makes the attribute menu update based on what was chosen in the target menu.
2018-11-28 10:35:35 -05:00
Paul Kaplan
421aac6340
Ensure setCompatibilityMode continues to restart if previously started.
...
This was previous behavior, but the previous commit which prevents restarts based on _steppingInterval truthiness broke it because clearInterval does not modify the value of _steppingInterval
2018-11-28 08:47:51 -05:00
Paul Kaplan
4378603d36
Prevent the runtime from spawning new stepping intervals
2018-11-28 08:34:22 -05:00
Chris Willis-Ford
05979e2e93
Merge pull request #1784 from cwillisf/setLocale-always-refreshBlocks
...
Make setLocale consistently refresh blocks
2018-11-27 19:19:41 -08:00
Valerie R Young
70f00e30c4
Revert changes to toNumber, fix comparison of infinity in cast.compare
2018-11-27 17:53:20 -05:00
Paul Kaplan
ffb02c607d
Merge pull request #1783 from paulkaplan/emit-start-event
...
Emit a RUNTIME_STARTED event to track if the vm has been started
2018-11-27 16:38:27 -05:00
Evelyn Eastmond
acc2e6dba2
Merge pull request #1781 from evhan55/extensions/rpc-error
...
Adding check for open request before calling RPC reject/resolve.
2018-11-27 12:06:10 -08:00
Christopher Willis-Ford
4256f86ac3
Make setLocale consistently refresh blocks
...
This change makes the VM's `setLocale` method call `refreshBlocks` even
when not changing the language, though it still skips an unnecessary
call to `formatMessage.setup` in this case.
2018-11-27 10:26:04 -08:00
Paul Kaplan
cc4751228e
Emit a RUNTIME_STARTED event to track if the vm has been started
2018-11-27 11:37:01 -05:00
Evelyn Eastmond
9c3518ba6d
Adding check for open request before calling reject/resolve. Resolves #1764 .
2018-11-27 09:43:53 -05:00
Ray Schamp
dd2023e2f3
Merge pull request #1779 from rschamp/project-dirty-signal
...
Add "project changed" event
2018-11-27 08:54:30 -05:00
Ray Schamp
5022227c15
Add "project changed" event
...
And emit it whenever we think the project has changed. Try to not emit it when a change has happened internally that shouldn't affect the serialized project.
This iteration fires the event too frequently, e.g., when switching sprites. This is meant as a simple initial implementation that can be improved.
2018-11-26 17:10:43 -05:00
Eric Rosenbaum
045ebb5026
Apply sprite's volume to music extension notes and drums ( #1735 )
...
* Use a gain node for volume instead of effects chain
* Use a gain node for volume for drums too
2018-11-26 11:46:25 -05:00
DD Liu
5802723dc7
Merge pull request #1737 from fsih/textLayer
...
Support text layer in sb2 files
2018-11-21 13:18:47 -05:00
DD Liu
17d0033f1c
Remove conditional because text layer file name always comes from sb2
2018-11-21 12:03:52 -05:00
DD Liu
94227c00fa
Remove catches that do nothing
2018-11-21 12:01:48 -05:00
Karishma Chadha
63c4b53b09
Replace reference to deleted variable with specific variable info needed.
2018-11-21 11:45:16 -05:00
Karishma Chadha
25ce08131a
Add rename and delete functionality for cloud variables. Refactor function name for cloud variable creation API.
2018-11-20 15:11:12 -05:00
DD
c68da6605b
Move reject earlier and add loadedOne comment
2018-11-20 15:08:25 -05:00
Valerie R Young
dd81a261df
Remove Cast import
2018-11-16 16:49:27 -05:00
Valerie R Young
73e157ba7c
Use Number instead of Cast.toNumber
2018-11-16 16:30:26 -05:00
Katie Broida
bb82c46f8a
Handle coordinate precision the same as Scratch 2 ( #1722 )
2018-11-15 15:50:56 -05:00
Valerie Young
2ca735eab4
Merge pull request #1716 from bocoup/unknown-block-input-fix
...
Handle unknown opcode in input
2018-11-15 10:09:46 -05:00
Ray Schamp
f2550d582c
Merge pull request #1750 from rschamp/feature/sb3-json-assets
...
Add method for collecting all targets' assets
2018-11-15 10:31:58 +00:00
Ray Schamp
bcd1c5b13a
Consolidate collectAssets into getter
2018-11-15 10:26:05 +00:00
Karishma Chadha
0c9da5d963
Merge pull request #1755 from kchadha/cloud-var-create
...
Create cloud variables
2018-11-14 21:39:29 -05:00
Eric Rosenbaum
26ced0dd58
Use note picker in imported play note blocks ( #1757 )
...
* Use note picker in imported play note blocks
* Set default for obscured note shadows to 60
2018-11-14 14:55:12 -05:00
Valerie R Young
ebd3b46cc2
Address feedback
2018-11-14 14:24:09 -05:00
Paul Kaplan
8aa88fa2a2
Merge pull request #1723 from mzgoddard/blocks-monitored-cache
...
Cache the set of actively monitored blocks
2018-11-14 14:16:36 -05:00
Karishma Chadha
3dd0d0a657
Merge pull request #1686 from kchadha/monitor-save-load
...
Monitor save & load
2018-11-14 13:23:10 -05:00
Karishma Chadha
5b2667556c
Comment cleanup
2018-11-14 13:15:36 -05:00
Karishma Chadha
56ee6ba575
Merge pull request #1747 from kchadha/load-visible-extension-monitors
...
Always ignore video sensing monitor when importing from 2.0 and import visible extension monitors.
2018-11-14 10:54:25 -05:00
Karishma Chadha
dccb41e3c4
Comment and test cleanup.
2018-11-14 10:42:52 -05:00
Karishma Chadha
3fc1b89b30
Add ability to create cloud variables, and have cloud provider wait for confirmation from server.
2018-11-13 16:43:51 -05:00
DD
679ddf9fb7
Comment fixes and instantiate textImageElement only as necessary
2018-11-13 15:31:00 -05:00
DD
0b72608624
Remove swp file
2018-11-13 15:09:47 -05:00
Valerie R Young
3fe1d3bf6d
Minor typo
2018-11-13 14:58:28 -05:00
Valerie R Young
43c5d5c053
Correct infinity comparisons and toNumber
2018-11-13 13:51:12 -05:00
Ray Schamp
df56e615ec
Add method for collecting all targets' assets
...
Resolves #1601 . Does not include the project JSON since that would require knowledge of a project ID, which the VM has not been responsible for so far.
For now, it is the responsibility of the consumer to determine if these assets should be saved or not. Otherwise the VM would need to be responsible for saving, which has been out of its scope.
2018-11-12 15:13:02 +00:00
jokebookservice1
306996e54c
feat: Implement "point towards random direction"
...
We subtract 180 even though the value will be clamped, for clarity. We round so that
using the "direction" getter will yield a sensible result. Note that this
implements 'point towards random direction', not 'point towards random
position' -- they have slightly different behaviours.
2018-11-11 01:51:37 +00:00
Karishma Chadha
14bee14d8c
Update extensions to load when deserializing monitors. This is necessary when the monitor is the only part of the project that uses the extension. Update extension monitor color category.
2018-11-09 23:45:49 -05:00
Karishma Chadha
df24ca7b46
Refactor sb3 monitor deserialization. Create monitor blocks with the relevant info if they don't exist.
2018-11-09 23:45:49 -05:00
Karishma Chadha
1b9b3ac909
Revert changes that were made to leverage the monitor blocks getting created when the toolbox is loaded. This approach does not work when viewing the project detached from scratch-blocks (e.g. player mode).
2018-11-09 23:45:48 -05:00
Karishma Chadha
ebdd548c8f
Update for auto-positioning monitors so that having just one of x or y be 0 (e.g. a monitor placed in the top right corner of the stage) does not result in the monitor being treated as a new monitor and get auto-positioned.
2018-11-09 23:45:48 -05:00
Karishma Chadha
d690c76a34
Update sb2 deserialization of monitors.
2018-11-09 23:45:48 -05:00
Karishma Chadha
1a4f0a75f2
Serialize and deserialize monitors. Obtain monitor block information from runtime. Fix issue where stage monitors weren't getting loaded correctly.
2018-11-09 23:45:48 -05:00
Karishma Chadha
cfa71723eb
Ignore video sensing monitor and import music tempo monitor unless it is hidden. Load extensions for visible monitors. Add tests for new functionality.
2018-11-09 00:09:54 -05:00
Evelyn Eastmond
3050f496b2
Resolves #1687 . Clears discover timeout when needed. ( #1697 )
2018-11-08 15:31:15 -05:00
Evelyn Eastmond
53c165c2f6
Close Scratch Link web socket on every new peripheral scan attempt ( #1696 )
...
* Progress towards: #1671 : Close web socket before making a new one for hardware extensions.
* Always disconnect before scanning for new peripheral. Removing console logs.
* Removing unused test code.
2018-11-08 15:21:28 -05:00
Karishma Chadha
fe186913ac
Merge pull request #1742 from kchadha/multi-monitors
...
Multi monitors
2018-11-08 14:44:22 -05:00
Karishma Chadha
7ea310a194
Fix typo in comment
2018-11-08 14:43:07 -05:00
Karishma Chadha
87244b4110
Normalize capitalization of sensing_current block fields during sb2 import and during monitor id generation. Update monitors integration test to include sensing_current block monitors.
2018-11-08 14:11:30 -05:00
Ray Schamp
4f5aba4fe6
Merge pull request #1727 from paulkaplan/add-ext-on-share
...
Add unloaded extensions on block sharing
2018-11-08 10:15:58 +00:00
Karishma Chadha
5db3db3a92
monitor id getter should use block fields instead of a list of strings
2018-11-08 01:33:26 -05:00
Karishma Chadha
7d1226458f
Fix import of current day of week block from sb2.
2018-11-08 00:37:49 -05:00
Karishma Chadha
0e7eae98d5
Separate out monitors for blocks reporter blocks that have parameters.
2018-11-08 00:37:28 -05:00
Karishma Chadha
8aa0fa11aa
Merge pull request #1649 from mzgoddard/get-attribute-stage-alt-name
...
Get attribute stage alt name
2018-11-07 17:47:44 -05:00
Karishma Chadha
4bb2d19584
Merge pull request #1683 from mzgoddard/sequencer-thread-cleanup
...
Sequencer thread cleanup
2018-11-07 17:15:11 -05:00
Eric Rosenbaum
2cff4159bb
Use the new note picker field in music and EV3 extensions ( #1720 )
...
* Add note field type
* Note picker in music extension plays notes
* Use note picker in EV3 beep block
2018-11-07 11:50:15 -05:00
Eric Rosenbaum
eef1885fad
On websocket error, use sendRequestError instead of disconnect ( #1736 )
2018-11-07 10:25:09 -05:00
Paul Kaplan
ce94144051
Fixup from comments
2018-11-07 10:11:16 -05:00
DD
5ad193b96e
Better comment
2018-11-06 17:51:39 -05:00
DD
1cef52e180
Remove mysterious swp file
2018-11-06 17:43:26 -05:00
DD
3c95b32da0
Rearrange so that if we already have the asset, there's no need to go through promise.all
2018-11-06 17:39:26 -05:00
DD
2a032be1a9
Remove todo
2018-11-06 17:34:07 -05:00
DD
6763355d00
Fix scaling to perform nearest neighbor
2018-11-06 17:22:25 -05:00
DD
2bd468950f
Why do our lint rules require such weird formatting
2018-11-06 16:54:41 -05:00
DD
998c5a186e
Merge images as part of fetch bitmap
2018-11-06 16:44:17 -05:00
Eric Rosenbaum
3bd0797810
Make volume a sprite-specific monitor ( #1730 )
2018-11-06 10:52:40 -05:00
DD
e538800293
Merge branch 'pull915' into textLayer
2018-11-06 10:39:43 -05:00
DD
876139847a
Merge branch 'develop' into pull915
2018-11-06 10:39:27 -05:00
DD
b6b3ca21d7
Load text layer asset
2018-11-06 10:36:52 -05:00
DD
88b6bdd06c
Get text assets from zip
2018-11-05 18:07:56 -05:00
DD
86149325b1
Try to make loadCostume more readable, and revert deserializeCostume to changing the costume object directly
2018-11-05 17:11:07 -05:00
Paul Kaplan
c8ad1955d4
Load extensions before sharing blocks.
...
This commit fixes the unit tests so the assertions are made after the promise resolves
2018-11-05 13:00:35 -05:00
Paul Kaplan
bc1da9fa44
Move extension ID parsing into a helper and add test
2018-11-05 12:57:09 -05:00
Michael "Z" Goddard
692b71a737
Merge pull request #1709 from mzgoddard/cast-to-number
...
Shortcut Cast.toNumber if given a number
2018-11-02 15:58:15 -04:00
Michael "Z" Goddard
a3f9aa1e22
cache the set of actively monitored blocks
...
Projects can have 100's of potentially monitored blocks. Caching the
set of monitored blocks can save time in Runtime._step every frame.
2018-11-02 15:24:05 -04:00
Karishma Chadha
d64322a110
Merge pull request #1719 from rschamp/hotfix/sprite-upload-from-image
...
Handle images uploaded as sprites
2018-11-01 18:18:52 -04:00
Ray Schamp
3d06f0e633
Handle images uploaded as sprites
...
The sprite upload code in GUI serializes asset data, flattening it. We need to rehydrate the asset.
2018-11-01 18:28:54 +00:00
Paul Kaplan
596d0c4f5f
Include the origin blockId of the top block being dragged.
...
This is required by the GUI in order to take a snapshot of the blocks for the backpack. Only the ID is needed, the rest can be done by the GUI.
2018-11-01 14:13:07 -04:00
Michael "Z" Goddard
bca01a9ed2
rename Stage to _stage_ when its the OBJECT input for getAttributeOf
2018-11-01 12:33:56 -04:00
Karishma Chadha
ffef2e92fc
Fix up docs and incorrect initialization of cloud data manager functions. Add 'spec' unit tests that the cloud data manager functions are actually functions.
2018-10-31 19:20:13 -04:00
Michael "Z" Goddard
2ffa8eb333
update runtime thread tests
...
Threads are now removed after every "inner" step. Any thread that
reaches its DONE conditions is immediately removed instead of requiring
an extra step to remove it. As such tests that check the number of
threads have been updated to consider this.
2018-10-31 17:56:12 -04:00
Valerie R Young
26c928d10b
Handle unknown opcode in input
2018-10-31 17:40:08 -04:00
Michael "Z" Goddard
ec414fffc6
use Number.isNaN in Cast.toNumber
...
Number.isNaN does not coerce and may help performance since we either
do not need to coerce the value or already have with Number.
2018-10-31 14:40:19 -04:00
Karishma Chadha
1df6743a5f
Refactor cloud data manager to break out cloud data limit check vs. limit update.
2018-10-31 13:40:05 -04:00
Karishma Chadha
848deaff30
Track whether a project has cloud data and enforce a cloud data limit on projects being loaded into the runtime.
2018-10-30 18:53:57 -04:00
Katie Broida
6ef600dc2c
Add runtime event for when the project is loaded ( #1669 )
2018-10-30 15:26:22 -04:00
Karishma Chadha
fd5e178d3b
Merge pull request #1703 from kchadha/cloud-io
...
Cloud IO
2018-10-30 11:57:20 -04:00
Michael "Z" Goddard
5b10d41ba3
check if toNumber is given a number and shortcut if so
...
If toNumber is called on a number avoiding passing the number to Number
can provide a small performance improvement.
2018-10-30 11:28:22 -04:00
Karishma Chadha
991d7be7f4
Fix documentation of cloud io device.
2018-10-29 18:31:35 -04:00
Paul Kaplan
b245b3868f
Merge pull request #1416 from paulkaplan/fix-mouse-down
...
Make click hats trigger on mouse down instead of up
2018-10-29 15:05:18 -04:00
Karishma Chadha
be238d35d2
Merge pull request #1517 from joker314/costume-compatibility
...
Make "switch costume" and "switch backdrop" blocks compatible with 2.0
2018-10-29 11:39:41 -04:00
Karishma Chadha
aa200e6df3
Set the cloud provider and request updates to the cloud var when updating the variable through blocks.
2018-10-29 00:59:06 -04:00
Karishma Chadha
4959ab9ff3
Create a new cloud io device
2018-10-29 00:58:30 -04:00
Paul Kaplan
e002db48f2
Add logic to trigger click hats on mouse up on a draggable target
...
As long as the event was not a drag
2018-10-25 15:08:37 -04:00
Paul Kaplan
ef50092daa
Make when clicked hats trigger on mouse down
2018-10-25 14:06:36 -04:00
Ray Schamp
de86eb3f19
Merge pull request #1691 from rschamp/storage-no-cache
...
Store asset objects on costumes and sounds
2018-10-25 10:15:47 +01:00
Karishma Chadha
d3e38c1ae9
Merge pull request #1640 from mzgoddard/set-procedure-param-missing
...
Set procedure param missing
2018-10-25 00:13:51 -04:00
Katie Broida
18c83dcc67
Prevent non-core extensions from adding monitors ( #1688 )
2018-10-24 16:43:01 -04:00