morant
19275799df
Load md5 information from sounds
2017-02-09 10:44:28 -05:00
Andrew Sliwinski
4bb5f30bd8
Merge pull request #410 from griffpatch/optimisation/only-check-for-compatability-once
...
Optimisation - Only check browser compatability once
2017-02-09 08:17:51 -05:00
Andrew Sliwinski
d650e5393e
Merge pull request #439 from griffpatch/bug/StopThisScript
...
Implement "Stop this script" function
2017-02-09 08:10:00 -05:00
griffpatch
464722f7bd
Feature - Fencing of sprites
...
This change requires that the pull request for scratch-render (Feature
fencing #82 ) be taken first
2017-02-09 10:02:45 +00:00
griffpatch
a6c56a6e20
Merge remote-tracking branch 'refs/remotes/LLK/develop' into bug/PenColorOpacity
2017-02-09 08:51:10 +00:00
griffpatch
2ba177aa0f
Bug - Return pen opacity to opaque
...
When setting the pen color using pen blocks, the opacity should be reset
to fully opaque if no alpha is supplied.
2017-02-09 08:50:37 +00:00
griffpatch
276ae82769
Fixes Case Insensitive Broadcast Bug
...
Broadcasts are case sensitive #433
2017-02-08 10:05:48 +00:00
griffpatch
9cb595312e
Implement "Stop this script" function
...
Existing implementation incorrectly terminates the entire thread.
See: http://llk.github.io/scratch-vm/#144142535
2017-02-08 09:44:10 +00:00
griffpatch
cf215bf0bc
Fix for the "Empty or white space strings equal 0" bug
...
See: Empty or white space strings equal 0 #435
2017-02-08 08:38:50 +00:00
griffpatch
7d69ecc005
Optimisation - Only check browser compatability once
...
Disable use of more accurate timer temporarilly due to performance.
However, with the rearrange and introduction of the 'nowObj' it turns
out most of the delay is in resolving 'self.performance'... so keeping
this cached in nowObj actually mitigates most of the delay.
2017-02-08 08:11:10 +00:00
griffpatch
57c222e94f
Merge remote-tracking branch 'refs/remotes/LLK/develop' into optimisation/only-check-for-compatability-once
2017-02-08 08:04:47 +00:00
morant
ed978e3062
Read sprite costume names from JSON, and write currentCostume to JSON
2017-02-07 20:12:55 -05:00
morant
6b545ea16d
Update isStage for each sprite when loading JSON, removing things copied from SB2 which are not relevant.
2017-02-07 18:38:44 -05:00
morant
0dc1883e9f
Write costumes and sounds to JSON on save
2017-02-07 18:15:11 -05:00
morant
e16f2924a3
Merge branch 'develop' of https://github.com/LLK/scratch-vm into develop
2017-02-07 09:53:17 -05:00
Andrew Sliwinski
92ff57de7d
Add basic test coverage for the sound blocks
2017-02-03 17:39:36 -05:00
Eric Rosenbaum
9741dc2e35
Merge branch 'develop' of https://github.com/LLK/scratch-vm into sound
2017-02-02 16:37:07 -05:00
Ray Schamp
727fcc7875
Lint for eslint-config-scratch@3
2017-02-01 16:27:55 -05:00
Eric Rosenbaum
0947775a31
Merge branch 'develop' of https://github.com/LLK/scratch-vm into sound
2017-02-01 10:18:01 -05:00
SillyInventor
1ac89f5aa4
Added new util function that sends tan function infinities correctly
...
Changed mathop to call new math util
Changed sin & cos to round correctly (to get 0)
Added testing for the new math util function
Added testing for the new mathop functions
2017-01-31 19:05:54 -05:00
Eric Rosenbaum
53127f6320
use customstate for sound volume, instrument, effects
2017-01-31 18:33:32 -05:00
Eric Rosenbaum
95e29ed66a
move sound-related code out of rendered target
2017-01-31 18:32:46 -05:00
Andrew Sliwinski
fff63e3af2
Merge pull request #414 from thisandagain/bugfix/413
...
Bugfix - Continue import if opcode is not found during SB2 import
2017-01-30 15:36:24 -05:00
Andrew Sliwinski
c2a488a197
Merge pull request #408 from griffpatch/optimisation/avoid-negative-index-lookups
...
Optimisation - Avoid negative index lookups #407
2017-01-30 15:06:02 -05:00
Andrew Sliwinski
249c0d6dca
Merge pull request #409 from griffpatch/optimisation/remove-redundant-lookups
...
Optimisation - Remove redunant lookups
2017-01-30 15:04:42 -05:00
Andrew Sliwinski
7c18b33f99
Continue import if opcode is not found during SB2 import. Resolves GH-413
2017-01-30 14:32:32 -05:00
Eric Rosenbaum
2d8491123e
Merge branch 'develop' of https://github.com/LLK/scratch-vm into sound
2017-01-30 11:28:52 -05:00
Eric Rosenbaum
dd30e07052
comments on getSoundIndex
2017-01-30 10:56:50 -05:00
Eric Rosenbaum
9d8819ddc7
audio engine handles rest block
2017-01-30 10:56:31 -05:00
Eric Rosenbaum
cb4209b27a
target handles playnote via audio engine
2017-01-30 10:56:06 -05:00
Eric Rosenbaum
5966a46bbd
target manages instrument setting
2017-01-30 10:54:24 -05:00
Eric Rosenbaum
4e4b0b86e1
target manages audio effect values
2017-01-30 10:53:12 -05:00
Eric Rosenbaum
01e237a2d5
audio engine loads all sounds
2017-01-30 10:50:28 -05:00
Eric Rosenbaum
4e57ab561d
move playsound function to target
2017-01-30 10:45:15 -05:00
Eric Rosenbaum
d5e0d433aa
include md5 in sprite sound object
2017-01-30 10:43:28 -05:00
griffpatch
fbf2c0c345
Optimisation - Recycle Stack Frame for cosecutive blocks
...
This saves popping, destroying, recreating, and pushing the stack frame,
and then reassigning the warp mode attribute for every block to block
step in the execution.
2017-01-28 17:06:07 +00:00
griffpatch
bd405ecc4a
Optimisation - Only check browser compatability once
...
This saves doing the checks everytime the time functions are referenced
2017-01-28 16:43:37 +00:00
griffpatch
76c9c993f2
Optimisation - Remove redunant lookups
...
It's surprising how much time it takes to do an object member lookup, so
reducing these is a great idea.
2017-01-28 16:33:20 +00:00
Andrew Sliwinski
824628220c
Merge pull request #406 from griffpatch/bugfix/end-warp-bug
...
Runtime does not exit warp mode if at end of loop #398
2017-01-28 09:56:04 -05:00
griffpatch
bd9159b9fb
More negative index checks
2017-01-28 14:39:22 +00:00
griffpatch
a25e117412
optimisation/avoid negative index lookups #407
...
Run-time Optimisation
The thread.stackFrames array is accessed all the time to retrieve the
'parent' stack frame. This is done using as index of [this.stack.length
- 1]. However, a lot of the time this evaluated to [-1]. Although this
results in null, which is fine, to get to this javascript actually
defers from a numeric array lookup to an object lookup using the string
"-1". This is roughly 100 times slower to compute and so a simple catch
for negative indexes is well worth the extra check.
2017-01-28 14:38:13 +00:00
griffpatch
c6a872ef4a
Fix whitespace issues
2017-01-28 14:11:48 +00:00
griffpatch
5f100129b6
Fix for ending warp bug
...
When popping down the stack frame it is assumed that you keep using the
previous warp state rather than looking at the warp state of the level
you just popped out to. This causes the loss of screen updates if the
warping block was the last statement in a loop as the loop does not obey
it's 'non warp' status.
2017-01-28 14:03:29 +00:00
morant
c6c1a63ff0
Merge branch 'feature/194' of https://github.com/morantsur/scratch-vm into develop
...
+ Solve code conflicts, and handle deserialization of 3.0 projects.
# Conflicts:
# src/index.js
# test/unit/serialization_sb2.js
2017-01-27 20:05:54 -05:00
Andrew Sliwinski
de4035055b
Merge pull request #403 from griffpatch/feature/Support-ARGB-for-pen
...
Fix for Support ARGB for pen #393
2017-01-27 17:07:43 -05:00
griffpatch
0dcaa46107
Fix lint issues
...
Had to update the test scripts to handle the alpha channel, also I note
that all the hex tests are using CSS notation, not scratch notation
(which is 0x not #)
2017-01-27 17:05:17 +00:00
Andrew Sliwinski
eb3b7bfd40
Merge pull request #401 from griffpatch/Effect-not-correctly-copied-to-clones
...
Effect not correctly copied to clones #337
2017-01-27 10:52:24 -05:00
griffpatch
b856041d9a
Fix for Support ARGB for pen #393
...
Requires fix to scratch-render before this will work (see:
6f5acfee7b961d71237f1fd50bb3d5a5139c527e)
2017-01-27 13:45:16 +00:00
griffpatch
2ac4b73a1f
Importers: adjust block coordinate calculation so blocks overlap less. #326
...
This change imports the scratch blocks much closer to the Scratch 2
spacing.
2017-01-27 13:39:21 +00:00
griffpatch
cf43efe3ee
Effect not correctly copied to clones #337
...
Fixes Effect not correctly copied to clones #337
2017-01-27 13:11:17 +00:00
Christopher Willis-Ford
88cc50aa18
Code review: more docs, move constants, clone util
...
Changes include:
- Added missing JSDoc for items in `scratch3_pen.js` and `target.js`.
- Moved constants used by `Scratch3PenBlocks` into the class.
- Created a constant for minimum and maximum pen size.
- Added `util/clone.js` to host cloning functionality.
- Pen blocks now check for the renderer before trying to use it.
- The pen integration test covers all blocks, though `clear`, `stamp`,
and `pen down` will skip some of their functionality when there is no
renderer.
2017-01-20 11:26:18 -08:00
Christopher Willis-Ford
d0845728ee
Add unit tests for new color-related functionality
...
Also, fix a math error in `Color.rgbToHsv`.
Newly covered functions:
- `toRbgColorObject` from `util/cast.js`
- `hsvToRgb` from `util/colors.js`
- `rgbToHsv` from `util/colors.js`
- `mixRgb` from `util/colors.js`
2017-01-19 15:24:45 -08:00
Christopher Willis-Ford
a6190da774
Lint fixes and related cleanup
2017-01-19 12:50:46 -08:00
Christopher Willis-Ford
369c02b5d5
Implement pen blocks
...
These blocks implement pen features as found in Scratch 2.0
Supporting changes include:
- `Target` is now an event emitter
- `RenderedTarget` now emits an event when it moves
- `Target` can now store arbitrary "extra" data, called "custom state"
in the code, using a `Target`'s `setCustomState` and `getCustomState`
methods. This is used to store per-target pen state without requiring
`Target` or `RenderedTarget` to know anything about the pen.
- `Cast` can now cast to an RGB color object.
- `Color` now has functions to convert between RGB and HSV, constants
for for black & white, and a `mixRgb` function to lerp between two
colors.
2017-01-19 11:51:22 -08:00
Ray Schamp
c6c4c4c00c
Merge pull request #379 from rschamp/bugfix/empty-rotation-center
...
Only update costume rotationCenter if it exists
2017-01-13 16:55:39 -05:00
Chris Willis-Ford
9b04392211
Move build outputs into a dist/
subdirectory ( #375 )
...
* Move Node output: /dist.js => /dist/node/scratch-vm.js
* Move web output: /vm{.js,.min.js} => /dist/web/scratch-vm{.js,.min.js}
* Update build output references in package.json and the playground's index.html
* Move the VirtualMachine class out of index.js into its own file, referenced by index.js. The VirtualMachine class is otherwise unchanged.
* Add .gitattributes rules for new file types which were added to this repository without specifying their text/binary attributes
* Turn on source maps in webpack and add corresponding .gitignore rule
2017-01-13 13:34:26 -08:00
Ray Schamp
a56346d0a9
Only update costume rotationCenter if it exists
...
This prevents sending `NaN`s to the renderer as the rotation center, which prevents the initial render of the costume/backdrop.
Towards LLK/scratch-gui#18
2017-01-13 13:05:06 -05:00
Ray Schamp
4ba76bbdbd
Fix adding SVG costumes
...
Previously it assumed every costume to have a `bitmapResolution` property which doesn't apply to vector costumes. This caused the renderer to not render added SVG costumes when they were added with setCostume.
2017-01-12 15:34:05 -05:00
Eric Rosenbaum
4022703537
move audio state vars into rendered target
2017-01-11 15:42:07 -05:00
Eric Rosenbaum
9cc1c316d6
wrapclamp drum and instrument to num available
2017-01-11 11:41:21 -05:00
Eric Rosenbaum
f2ad364b90
vm converts one-indexing of drums and instruments to zero-indexing
2017-01-11 11:23:39 -05:00
Eric Rosenbaum
71339874de
fix name of DRUM arg
2017-01-11 11:22:58 -05:00
Eric Rosenbaum
76a475c31c
cast args to numbers
2017-01-10 18:00:33 -05:00
Eric Rosenbaum
3344c92f7e
change ‘drumtype’ to ‘drum’ in specmap
2017-01-10 18:00:02 -05:00
Eric Rosenbaum
f034564603
Merge branch 'develop' of https://github.com/LLK/scratch-vm into sound
2017-01-09 15:51:47 -05:00
Eric Rosenbaum
4d7ff97011
instrument number is zero-indexed inside audio engine
2017-01-09 15:48:31 -05:00
Eric Rosenbaum
ce8b069140
include volume reporter
2017-01-09 15:48:02 -05:00
Eric Rosenbaum
2d7cfd128a
use a single global tempo owned by audioengine
2017-01-09 15:47:29 -05:00
Eric Rosenbaum
dc9126e067
Merge pull request #373 from ericrosenbaum/sound
...
Integrate audio engine
2017-01-06 16:28:09 -05:00
Eric Rosenbaum
bd8fdad1d4
add check for audioengine
2017-01-06 16:24:16 -05:00
Eric Rosenbaum
18c88c8ee0
fix stop for audio
2017-01-06 16:14:41 -05:00
Eric Rosenbaum
b88c6c96e2
initialize audio player once per sprite (not for clones)
2017-01-06 16:14:27 -05:00
Eric Rosenbaum
9980f4da3f
lint
2017-01-06 16:13:43 -05:00
Eric Rosenbaum
fec9e5b91a
add audio to playground
2017-01-06 11:49:25 -05:00
Eric Rosenbaum
9350baef3b
add current volume block
2017-01-06 10:31:11 -05:00
Eric Rosenbaum
dbe2cef93c
move promise into audio engine
...
changes to play note, play drum and rest blocks so their promises to wait are returned by the audio engine
2017-01-06 10:31:01 -05:00
Eric Rosenbaum
c0d57b4b6b
separate out main audioengine from audioplayer for each clone
2017-01-04 18:37:55 -05:00
Eric Rosenbaum
5a1386f727
remove redundant type check
2017-01-04 14:42:00 -05:00
Eric Rosenbaum
3bf9238e0c
treat numeric input to sound name as 1-indexed
2017-01-04 14:41:14 -05:00
Eric Rosenbaum
7a49a3ae43
lint
2017-01-03 23:41:49 -05:00
Andrew Sliwinski
5daaaa4438
Merge pull request #362 from thisandagain/bugfix/coverage
...
Add integration test coverage
2017-01-03 09:38:14 -05:00
Andrew Sliwinski
6d83931341
WIP clean-up
2016-12-30 10:19:58 -05:00
Andrew Sliwinski
04d9620631
Merge branch 'patch-24' of https://github.com/TheBrokenRail/scratch-vm into feature/194
2016-12-24 08:46:50 -05:00
Andrew Sliwinski
4709cae4b7
Basic integration (end-to-end) testing for default project
2016-12-23 10:39:19 -05:00
Andrew Sliwinski
48721dd336
If not hat fields are not found, check inputs before continuing. Resolves GH-360
2016-12-23 09:38:18 -05:00
Eric Rosenbaum
f0e01d3e87
fix name of sounds menu
2016-12-22 14:12:20 -05:00
Eric Rosenbaum
f90807e8a4
add get sound index by name
2016-12-21 16:42:19 -05:00
Eric Rosenbaum
f2793a1d59
Merge branch 'develop' of https://github.com/LLK/scratch-vm into sound
...
# Conflicts:
# package.json
# src/engine/runtime.js
# src/sprites/clone.js
2016-12-21 15:29:57 -05:00
TheBrokenRail
2ffb17458d
Update index.js
2016-12-11 12:45:35 -05:00
TheBrokenRail
838608af86
Update sprite.js
2016-12-11 12:42:39 -05:00
TheBrokenRail
04fc32b294
Update rendered-target.js
2016-12-11 12:40:06 -05:00
TheBrokenRail
b304cecefb
Add Testing Pt. 1
2016-12-11 12:33:02 -05:00
Ray Schamp
e9da046969
Report full sprite info in targetsUpdate
...
We need more than just the name for the initial render, so send everything consistent with sprite info reports.
2016-12-07 17:11:08 -05:00
TheBrokenRail
06e5124a3c
Update index.js
2016-12-04 08:42:28 -05:00
TheBrokenRail
a58bcb93e6
Update index.js
2016-12-04 08:39:22 -05:00
TheBrokenRail
c4750d64b6
Fix Drawable Properties Not Getting Updated
2016-12-03 16:50:06 -05:00
TheBrokenRail
7fe597c9f9
Now Actually loads Rendered Target Properties
2016-12-03 16:29:56 -05:00
TheBrokenRail
05a827c0ea
Update index.js
2016-12-02 16:30:34 -05:00
TheBrokenRail
f2a08b466d
Update Names
2016-12-02 16:03:52 -05:00
TheBrokenRail
34d2676db3
Update index.js
2016-12-02 15:57:56 -05:00
TheBrokenRail
424b41ac31
Pretty Print
2016-12-02 15:41:55 -05:00
TheBrokenRail
a520990a80
Update index.js
2016-12-02 15:37:35 -05:00
TheBrokenRail
0707c4bcc8
Update index.js
2016-12-02 15:35:35 -05:00
TheBrokenRail
dd86759915
Update rendered-target.js
2016-12-02 15:34:01 -05:00
Ray Schamp
adaf2df743
Emit sprite info report for all sprites
...
This allows costume data to reach listeners even when the sprite isn't the editing target.
Filter out non-editing target reports in the playground to match previous behavior.
2016-11-30 13:21:00 -05:00
Ray Schamp
ce17fdbd30
Include costume data in sprite info reports
...
Also emit the report on all costume changes
2016-11-30 13:19:49 -05:00
TheBrokenRail
72b44b3ec7
Update rendered-target.js
2016-11-29 18:57:35 -05:00
TheBrokenRail
74b8378a7c
Update sprite.js
2016-11-29 18:55:38 -05:00
TheBrokenRail
1980fbc98d
Update rendered-target.js
2016-11-29 18:53:38 -05:00
TheBrokenRail
f4959305ab
Update index.js
2016-11-29 18:14:12 -05:00
TheBrokenRail
1777ab6a21
Update index.js
2016-11-29 18:09:28 -05:00
TheBrokenRail
51d829786c
Update index.js
2016-11-29 18:07:50 -05:00
TheBrokenRail
16449ae73d
Add Loading And Exporting
2016-11-29 17:50:31 -05:00
TheBrokenRail
0f4e80cbfc
Add Export To Sprite
2016-11-29 17:23:28 -05:00
TheBrokenRail
cac52020a4
Add Export To Rendered Target
2016-11-29 17:18:20 -05:00
Ray Schamp
d00cdd6b2c
Account for done threads on threadCount update
...
Also rename inactiveThreads -> doneThreads, since this describes them better. They are the threads that have completed in the step.
2016-11-28 10:49:05 -05:00
Ray Schamp
0003b294cb
Lint
2016-11-24 10:36:30 -05:00
Ray Schamp
55ac7e269c
Add PROJECT_RUN_START/STOP events
...
These events signal when any threads are running or when all threads have stopped running. This maps to whether the green flag or the stop button should be illuminated in the GUI.
2016-11-23 15:47:49 -05:00
Ray Schamp
2ff719f2ba
Fix consistency of existing emits
2016-11-23 15:43:05 -05:00
Tim Mickel
a767c5ec79
Keep min and max scale in relative bounds as in Scratch 2.0
2016-11-14 12:20:29 -05:00
Tim Mickel
4deee071b2
Don't copy threads in step; stable restartThread ( #331 )
2016-11-10 15:05:49 -05:00
Ray Schamp
2c3e4536eb
Merge pull request #316 from tmickel/feature/remove-empty-project
...
Remove empty project
2016-11-10 12:56:31 -05:00
Tim Mickel
b99f089ae7
Fix #327 , "switch costume to [next/previous]" ( #330 )
2016-11-09 11:22:17 -05:00
Tim Mickel
f235cb47e6
Merge remote-tracking branch 'LLK/develop' into feature/remove-empty-project
...
# Conflicts:
# src/index.js
2016-10-31 10:39:36 -04:00
Eric Rosenbaum
6dadaba117
onStopAll function for stop button
2016-10-27 16:28:39 -04:00
Eric Rosenbaum
1e5555e96d
add volume and tempo blocks
2016-10-27 11:31:22 -04:00
Tim Mickel
0ede7e6ca1
Rename and delete sprites ( #319 )
...
* Add function to rename sprites
* Add delete sprite function
* Add `isSprite` helper and duplicate check for rename
2016-10-26 13:27:24 -04:00
Tim Mickel
56ef01745f
Implement sprite info emitting and posting ( #320 )
2016-10-26 13:27:12 -04:00
Tim Mickel
1dc4aaa2d7
Remove rAF usage and inline into _step ( #318 )
2016-10-26 11:32:15 -04:00
Tim Mickel
2f0ce7137c
Rename Clone -> RenderedTarget ( #317 )
2016-10-26 11:19:43 -04:00
Tim Mickel
6e9b3f262c
Divide rotation center by bitmap resolution ( #309 )
2016-10-26 10:38:24 -04:00
Tim Mickel
d75f1c5965
Remove empty project
2016-10-26 10:30:16 -04:00
Tim Mickel
cf20ca1add
Fix #313 (block specs in shadow) ( #315 )
2016-10-26 10:26:56 -04:00
Tim Mickel
28a0831e8d
Fix 1-1 in daysSince2000
2016-10-26 10:26:03 -04:00
Tim Mickel
5103cfb853
Address #299 and #300 ( #314 )
...
* Place clones behind sprite
* Disallow stage from cloning itself
2016-10-26 10:06:58 -04:00
Liam
f75577bcbe
Implement '(attribute) of' sensing block ( #311 )
...
* Implement '(attribute) of' sensing block
* Remove unused util parameter
2016-10-24 20:37:27 -04:00
Eric Rosenbaum
90867cd14e
convert string to number for sound index
2016-10-24 17:00:51 -04: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
Ray Schamp
659014b45f
Fix typo
2016-10-24 14:07:38 -04:00
Ray Schamp
d2a0e6fa2d
Disable no-useless-call in case of behavior change
2016-10-24 13:01:57 -04:00
Ray Schamp
22bf947ddb
Revert no-lonely-if
2016-10-24 13:01:41 -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
Ray Schamp
04d7f4f019
Use consistent function declaration style
2016-10-24 11:49:34 -04:00
Andrew Sliwinski
2de58050dd
Conform JSdoc for keyboard module to format used elsewhere
2016-10-24 11:40:07 -04:00
Ray Schamp
9f0c4eb098
Update to eslint-config-scratch 2.0
...
We are on a fast release cycle here.
2016-10-24 11:39:39 -04:00
Ray Schamp
63cfa4229a
Fix space-infix-ops
...
http://eslint.org/docs/rules/space-infix-ops
2016-10-24 11:19:07 -04:00
Ray Schamp
7712b2902f
Fix quote-props
2016-10-24 11:02:19 -04:00
Ray Schamp
14a2dbc50f
Revert no-lonely-if
2016-10-24 10:28:31 -04:00
Ray Schamp
73edb65c4d
Replace console with minilog
2016-10-23 22:20:30 -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
84bd42d734
Functions to add Sprite2/costumes/backdrops ( #291 )
...
* Functions to add Sprite2/costumes/backdrops
* Have sb2import return the top-level target
2016-10-20 11:44:01 -04:00
Tim Mickel
3d57c2e74c
Drop single-stepping and pause modes ( #294 )
2016-10-20 11:42:16 -04:00
Tim Mickel
9af9a87cb6
Pass rotation center and bitmap resolution to renderer ( #288 )
2016-10-19 17:01:48 -04:00
Eric Rosenbaum
0858a22ffb
adding theremin block and set instrument
2016-10-19 15:44:30 -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
Tim Mickel
060d1ab2a5
Updated blocks for new renderer features ( #257 )
...
* Add "touching" block, layers blocks
* Keep in fence, if on edge bounce, fix to touching edge
* Fix degtoRad in "if on edge, bounce"
* Fixes from review
2016-10-17 23:17:55 -04:00
Eric Rosenbaum
6d9f889aa7
fixed sound loading
2016-10-17 17:16:55 -04:00
Eric Rosenbaum
ba84b6e34b
move audioengine to its own module
2016-10-17 17:16:13 -04:00
Eric Rosenbaum
7bd0142deb
Merge branch 'develop' of https://github.com/LLK/scratch-vm into sound
...
# Conflicts:
# playground/index.html
2016-10-17 17:13:43 -04:00
Tim Mickel
352c6516d3
Fix parent setting in sb2 importer ( #283 )
2016-10-17 16:44:33 -04:00
Cosmic Web Services
454eb904a3
Add days since 2000 block ( #272 )
...
* Add days since 2000 block
* Empty line addition
* Add semicolin
* Empty line addition
* Tabed
* Remove extra line
* Make it exactly like scratch 2 was
* Fixed spacing
2016-10-17 13:57:25 -04:00
Ray Schamp
2904152318
Merge pull request #282 from rschamp/feature/vm.clear
...
Add VM.clear method
2016-10-17 13:56:37 -04:00
Ray Schamp
5615583fb2
Lint
2016-10-17 13:54:27 -04:00
Ray Schamp
bd95c1461d
Add VM.clear method
...
Use it before loading projects so targets don't accumulate when multiple projects are loaded on the same instance.
Move check to see if the clone is the original clone onto the block implementation so all clones can be removed.
Fixes #274
2016-10-17 13:43:38 -04:00
Andrew Sliwinski
ace9a96fc2
Fix degToRad function definition. Resolves GH-229
2016-10-17 11:52:02 -04:00
Tim Mickel
3bfd755e60
Complete implementation of stop block ( #271 )
...
* "Other scripts in stage" sb2
* Complete implementation of "stop" block
2016-10-13 23:00:46 -04:00
Tim Mickel
c45b420115
Fix check for existing hat threads ( #269 )
2016-10-13 22:14:19 -04:00
Tim Mickel
1e86d48a31
Clicking blocks in the toolbox ( #267 )
2016-10-13 17:15:49 -04:00
Tim Mickel
8c654bbe60
Procedure blocks ( #264 )
2016-10-13 13:11:26 -04:00
Eric Rosenbaum
31d680a229
lint
2016-10-13 11:54:00 -04:00
Eric Rosenbaum
d808a83f79
lint
2016-10-13 11:48:31 -04:00
Eric Rosenbaum
e084a76485
lint
2016-10-13 11:35:52 -04:00
dekrain
91037a261e
Fix relative localization for assets
2016-10-13 16:19:42 +02:00
Eric Rosenbaum
80764f053d
lint
2016-10-12 17:22:50 -04:00
dekrain
49d6bd3b67
Fix new project creation ( #256 )
...
* Fix new project creation
* Fix new project creation
* const -> var
2016-10-12 13:56:31 -04:00
Eric Rosenbaum
7b179546ed
new setup for use with scratch-gui
2016-10-12 13:17:51 -04:00
Tim Mickel
a7522c7734
Fix data_listcontents block name ( #254 )
2016-10-11 17:12:19 -04:00
Eric Rosenbaum
0024b209bd
Merge remote-tracking branch 'LLK/develop' into develop
2016-10-11 13:47:24 -04:00
Eric Rosenbaum
ed650ba487
Merge remote-tracking branch 'LLK/develop' into develop
2016-10-05 17:16:13 -04:00
Liam
30535d8e6e
Implement "distance to" block ( #239 )
...
* Implement "distance-to" block
* distance-to in stage should always be 10000
2016-10-04 21:26:59 -04:00
TheBrokenRail
9b07889b3f
Fix Stage PNG ( #241 )
...
* Fix Stage PNG
* Add New Stage PNG
* Remove Old Stage PNG
* Delete backdrop1.png
* Rename New Stage PNG
* Delete stage.png
* Fix Stage Resolution
2016-10-04 20:38:11 -04:00
Liam
5871672551
Implement "go to" block ( #238 )
...
* Implement "go to" block
* Add a missing semicolon
My text editor doesn't automatically insert them and I'm not used to using
semicolons so much. :(
* Implement go-to-random
* Clean up the go-to-random code a bit
* Add rounding to _random_ picks
2016-10-04 18:19:52 -04:00
Liam
886bcbe3c1
Implement the point-towards block ( #235 )
...
* Implement the point-towards block
* Pointing towards a nonexistent sprite should do nothing, not throw an error
2016-10-04 15:20:53 -04:00
Eric Rosenbaum
0db0783fe8
working on sound font player
2016-10-04 14:19:04 -04:00
Tim Mickel
0a66c62f6a
Mutations in block representation; an unfeatured procedure call ( #212 )
...
* Add scratch3_procedures and no-op for defnoreturn
* Add mutation adapter to parse mutations in CREATE/CHANGE events
* Add mutation-to-XML
* Update spec map for Blockly procedure names
* Placeholder for procedure special cases
* Basic stepping to procedures
* Remove extra case
* Validation for changeBlock
2016-10-03 17:43:24 -04:00
Tim Mickel
5728d648b1
Ensure clone.effects is defined on each instance ( #225 )
...
* Ensure clone.effects is defined on each instance
* Add regression test for GH-224
2016-10-03 10:16:43 -04:00
Eric Rosenbaum
e1df4b3aaf
fixed dictionary of loaded sounds
2016-10-01 17:27:28 -04:00
Tim Mickel
2226fda19e
Implement rotation style ( #223 )
2016-09-28 17:09:04 -04:00
Tim Mickel
d10ba11c8f
Round costume values ( #221 )
2016-09-28 16:43:12 -04:00
Tim Mickel
a585a08a93
Remove extra calls to updateAllDrawableProperties
( #222 )
2016-09-28 16:43:04 -04:00
Eric Rosenbaum
6988cfc0d3
starting to load sounds from project files
2016-09-28 16:42:25 -04:00
Eric Rosenbaum
7c91565408
Merge branch 'develop' of https://github.com/LLK/scratch-vm into develop
2016-09-27 18:12:20 -04:00
Eric Rosenbaum
39c8e76bdf
adding sound blocks
2016-09-27 17:09:53 -04:00
Tim Mickel
2357d63243
Drop useRound
option from Cast.toListIndex
( #213 )
...
* Drop `useRound` option from `Cast.toListIndex`
* Param fix
2016-09-26 12:01:21 -04:00
Tim Mickel
2d736f2b87
"Wait until" implementation ( #210 )
2016-09-22 17:00:38 -04:00
Tim Mickel
a118d50056
Variables and lists ( #187 )
...
* Import lists and variables from SB2
* Switch to Variable and List objects
* Add Clone.lookupOrCreateVariable, Clone.getVariable, Clone.setVariable
* Add (get, set, change) variable blocks.
* Copy variables and lists on clone instantiation
* Move variable options closer to blocks
* Add list primitives
* Move variable and lists storage to `Target` instead of `Clone`
* Move _computeIndex to a Cast function
* Rename `getList` -> `getListAsString`
* Renames renames
* Remove extra check in Cast.isNaN
2016-09-21 16:38:33 -04:00