Commit graph

1664 commits

Author SHA1 Message Date
Karishma Chadha
4cca426f96 Adding test coverage for new updateAssetName function. 2018-02-09 17:29:41 -05:00
Paul Kaplan
8d42db7df8
Merge pull request #925 from LukeSchlangen/fix/rounding-numbers
round numbers but break tests
2018-02-08 08:59:54 -05:00
Luke Schlangen
45cf1f685d add passing unit test 2018-02-07 17:49:18 -06:00
Eric Rosenbaum
c32086f56a Unit test for loudness with caching 2018-02-06 12:26:20 -05:00
Eric Rosenbaum
33966ba582 Check for runtime.currentStepTime is null 2018-02-06 12:25:44 -05:00
Eric Rosenbaum
0a239005a9 Rename and initialize vars 2018-02-06 11:06:48 -05:00
Karishma Chadha
3dbcf13c87 Fixing renameSprite tests. 2018-02-05 17:26:13 -05:00
Karishma Chadha
f5813b1845 Update sprite names, plus some code cleanup. 2018-02-05 16:54:58 -05:00
Karishma Chadha
7faeed7128 Update blocks after sound/costume rename. 2018-02-05 14:35:52 -05:00
kchadha
ef60b2a771
Merge pull request #928 from LLK/revert-917-push-reported
Revert "Push reported"
2018-02-02 13:49:36 -05:00
kchadha
107adad647
Revert "Push reported" 2018-02-02 12:42:09 -05:00
Eric Rosenbaum
c661ac7cce Only measure loudness once per step 2018-02-01 19:53:41 -05:00
Eric Rosenbaum
0e4e6be9e7
Merge pull request #926 from ericrosenbaum/bugfix/reduce-pitch-effect-range
Clamp pitch effect range to -360 to 360
2018-02-01 14:27:32 -05:00
picklesrus
57d3e564e2 Add two menu types to the internal-extension test. 2018-01-31 17:20:19 -08:00
Eric Rosenbaum
f78ddb2072 Change pitch effect range to -360 to 360 2018-01-31 16:44:54 -05:00
Paul Kaplan
32e240f18a
Merge pull request #916 from LLK/greenkeeper/scratch-storage-0.4.0
Update scratch-storage to the latest version 🚀
2018-01-31 09:30:09 -05:00
Luke Schlangen
f8dced53dc round numbers but break tests 2018-01-31 08:23:08 -06:00
Chris Willis-Ford
372c50ef69
Merge pull request #921 from cwillisf/use-render-umd
Playground: load renderer as UMD
2018-01-30 12:20:17 -08:00
Christopher Willis-Ford
3717394f00 Playground: load renderer as UMD
The recent changes to the renderer's build output packaging broke this
repository's playground / benchmark suite. These changes aren't the only
way to fix the issue, but this is consistent with the way that the
storage module was already being loaded.
2018-01-29 14:04:19 -08:00
kchadha
490248f652
Merge pull request #914 from kchadha/bugfix-909
Keep block xml up-to-date after renaming a variable.
2018-01-29 09:30:10 -05:00
Chris Willis-Ford
188aa990f2
Merge pull request #917 from mzgoddard/push-reported
Push reported
2018-01-26 15:48:05 -08:00
picklesrus
b6bb92d8f6 Adding support for dynamic menus in extensions. 2018-01-26 14:36:36 -08:00
Karishma Chadha
0b2eaa9e19 Moving block updating code into blocks instead of runtime. 2018-01-26 16:58:45 -05:00
Florrie
be83c0ee74 Mouse wheel IO system
Towards fixing #865. This adds an IO class for detecting the mouse wheel
being scrolled. Basic tests are included; they mock the runtime to see
what blocks are activated by scrolling.
2018-01-26 17:13:01 -04:00
Florrie
b201ce948d Merge branch 'develop' of https://github.com/LLK/scratch-vm into scroll-detection 2018-01-26 16:32:16 -04:00
Eric Rosenbaum
229cd7a50c
Merge pull request #911 from ericrosenbaum/bugfix/music-ext-safari-onended
Keep playing notes and drums forever on Safari
2018-01-26 13:00:56 -05:00
Michael "Z" Goddard
10acf3c4f5
Add BlocksExecuteCache
Add a Blocks cache available only to execute. This cache lets execute
get a blocks inputs, fields, opcode, and mutation in one request and an
object execute can further modify to store derivative values it use
this and every later execute iteration to perform its duties quicker.
2018-01-24 17:00:42 -05:00
Michael "Z" Goddard
41d6a8f925
Check if a thread's target is null in sequencer
Before calling execute, if a thread's target is null, retire that
thread.

This saves repeatedly checking if the thread's target is null in
recursive calls where even if scratch-gui or blocks, or some other
related library set the target to null, that will not happen during
block execution. It will happen at some time outside of the sequencer
letting the sequencer check once instead of execute checking at every
recursive level.
2018-01-24 17:00:37 -05:00
Michael "Z" Goddard
4286e3e982
Add Thread.blockContainer
Store the thread's blocks at blockContainer letting execute quickly
determine the block source. Monitor threads are a monitor thread. They
do not become a target thread suddenly.
2018-01-24 17:00:35 -05:00
Michael "Z" Goddard
ab8d8e5f34
Add optional recursiveCall argument to execute
When execute calls itself to step into the next stack level, pass
RECURSIVE to the recursiveCall level. This argument provides
opportunity to recursed calls in execute to reduce the time needed for
some checks.

- Reduce time for checking around setting
  thread.requestScriptGlowInFrame
- Call thread.pushReportedValue at end of execute when in a recursive
  call

A boolean check is faster than a type lookup, command blocks will only
be executed in non-recursive calls. This saves a minor amount of time
for any result reporting blocks like blocks that get variables or add
two inputs together.

If the block is not returning a promise and execute is a recursed call,
that implies that the block is neither a hat or that the thread is not
at the top. That reduces handleReport to pushReportedValue. Using the
recursiveCall argument the final block calling handleReport can
shortcut the extra work in handleReport and reduce it to immediately
calling pushReportedValue.
2018-01-24 17:00:24 -05:00
Michael "Z" Goddard
6b7582f1c7
Report block result to stackFrame.justReported
- Add stackFrame.justReported

Report the block result to a known key `justReported` instead of a
dynamic key on `reported`. Assuming blocks with a promised value are
relatively infrequent the most common recursive input flow immediately
reads the value "just" reported. In the assumed uncommon case of a
promised thread status, empty the already argValues assigned values
onto the currentStackFrame's reported member. In the next execute call
on this stackFrame, values assigned to reported are read back off onto
argValues, and execute will returned to the assumed common case. This
is a safe assumption since a thread in the promise state will not exit
that state until the next frame when javascript has a chance to call
the resolve handle, setting the thread's state back to another
executable state.

Using direct assignment to `justReported` saves building an object
dynamically. Instead of always building `reported` and `argValues` only
`argValues` is built until a promised state is reached. This also gives
a known time when `reported` is used, allowing cleanup of a
stackFrame's reported to only happen when it was used to persist
already reported values.
2018-01-24 17:00:12 -05:00
Andrew Sliwinski
2ea4c0a21a
Merge pull request #907 from LLK/greenkeeper/tap-11.0.1
chore(package): update tap to version 11.0.1
2018-01-24 09:20:47 -05:00
greenkeeper[bot]
1be4565c4b chore(package): update scratch-storage to version 0.4.0 2018-01-23 18:38:45 +00:00
Eric Rosenbaum
115184a2a3
Merge pull request #891 from ericrosenbaum/bugfix/audioplayer-clone-state
Audio effects state for clones
2018-01-23 11:55:39 -05:00
Eric Rosenbaum
275b0c7944 Get customState but don’t create it 2018-01-22 16:38:45 -05:00
Karishma Chadha
784341909b Update block xml for all blocks that use a variable that was just renamed. 2018-01-22 15:14:43 -05:00
Eric Rosenbaum
073ee84a91 Keep bufferSource refs so onended fires on safari 2018-01-22 11:57:06 -05:00
Eric Rosenbaum
ad4b31263c
Merge pull request #908 from ericrosenbaum/bugfix/load-music-ext-safari
Fix music extension asset loading on safari
2018-01-22 11:13:00 -05:00
Eric Rosenbaum
9eaf67b504 Fix eslint-disable-line 2018-01-22 10:27:16 -05:00
Eric Rosenbaum
4778ab8d4f Fix music extension asset loading on safari 2018-01-22 10:15:41 -05:00
Ray Schamp
cc1923f982
Merge pull request #901 from mzgoddard/benchmark-prototype
Benchmark prototype
2018-01-19 13:52:13 -05:00
Andrew Sliwinski
a9dd658445
Merge branch 'develop' into greenkeeper/tap-11.0.1 2018-01-19 08:45:58 -05:00
Paul Kaplan
90e9e1c0b0
Merge pull request #889 from paulkaplan/fix-mouse-positions
Fix mouse positions for different stage zoom levels
2018-01-17 13:49:23 -05:00
Michael "Z" Goddard
4d4966cba9
Save and compare results, show individual results in iframe 2018-01-17 12:25:07 -05:00
DD Liu
c2ff39ef06
Merge pull request #900 from paulkaplan/fix-text-encoder-require
Require TextEncoder correctly
2018-01-17 12:24:33 -05:00
Michael "Z" Goddard
775d38d8d5
Truncate benchmark selfTime and totalTime values 2018-01-17 12:16:08 -05:00
Michael "Z" Goddard
479f1ba163
Produce a benchmark share link storing the report in the url 2018-01-17 12:16:06 -05:00
Michael "Z" Goddard
c6f4d89371
Add benchmark suite, run and report on multiple benchmark projects 2018-01-17 12:10:27 -05:00
Michael "Z" Goddard
b02d7e8cd8
Read benchmark warm up time and recording time from uri 2018-01-17 11:59:58 -05:00
Paul Kaplan
d649b2555b Require TextEncoder correctly 2018-01-17 11:41:24 -05:00