Commit graph

3484 commits

Author SHA1 Message Date
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
a791a1e64e
Merge pull request #1970 from mzgoddard/image-bitmap
Use Promise.all, createImageBitmap, and one canvas in `load-costume.js`
2019-03-06 11:05:49 -05:00
Michael "Z" Goddard
d717763cf5
Merge pull request #1981 from mzgoddard/bump-text-encoding
update text-encoding to latest version
2019-03-06 11:04:36 -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
53b0b7e923
update text-encoding to latest version 2019-03-04 13:01:37 -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
Karishma Chadha
49a891a014
Merge pull request #2000 from LLK/greenkeeper/scratch-sb1-converter-0.2.7
Update scratch-sb1-converter to the latest version 🚀
2019-03-04 12:35:43 -05:00
Karishma Chadha
ebfba83989
Merge branch 'develop' into greenkeeper/scratch-sb1-converter-0.2.7 2019-03-04 12:15:20 -05:00
Karishma Chadha
ff59ebd7c5
Merge pull request #2019 from LLK/greenkeeper/scratch-parser-4.3.5
Update scratch-parser to the latest version 🚀
2019-03-01 13:24:24 -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
greenkeeper[bot]
0b6613b2c1 chore(package): update lockfile package-lock.json 2019-02-27 22:53:18 +00:00
greenkeeper[bot]
6715b2ec34 fix(package): update scratch-parser to version 4.3.5 2019-02-27 22:53:13 +00: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
Ray Schamp
8f4480f9b4
Merge pull request #2003 from mzgoddard/depend-on-uglify
Depend on uglifyjs-webpack-plugin
2019-02-25 16:00:19 -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
Eric Rosenbaum
ab6a60357e
Merge pull request #2008 from ericrosenbaum/feature/vernier-block-updates
Vernier Force & Accel extension updates
2019-02-25 11:10:02 -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
Eric Rosenbaum
c0e80edfcc Update block and menu icons 2019-02-20 11:13:00 -05:00