Commit Graph
421 Commits
Author SHA1 Message Date
Thomas Weber 1c79d335f2 Implement docsURI - VM part 2021-02-14 11:07:47 -06:00
Thomas Weber eb140a2493 Add Runtime.stageWidth, Runtime.stageHeight 2021-01-30 20:23:31 -06:00
Thomas Weber bffe350636 Experimental audio engine optimizations 2021-01-30 00:07:34 -06:00
Thomas Weber e4c61f4180 Add beforeStep and afterStep hooks 2021-01-03 00:54:35 -06:00
Thomas Weber 9078359afd Do not allow framerate to go over 1000
Values beyond this point
a) are unnecessary
b) don't actually work in any modern browser
c) trick the sequencer into thinking it has essentially 0 WORK_TIME
2020-11-26 21:36:24 -06:00
Thomas Weber 3ec9f75bea Include target in COMPILE_ERROR 2020-11-18 16:24:43 -06:00
Thomas Weber ed162660f0 Add COMPILE_ERROR event 2020-11-18 16:22:28 -06:00
Thomas Weber 09d705b82d Merge branch 'develop' of https://github.com/llk/scratch-vm into develop 2020-11-11 09:23:19 -06:00
Thomas Weber 9799d49cf8 Clarify what stop() does 2020-10-31 14:14:05 -05:00
Thomas Weber af63a68aab Explicitly emit MONITORS_UPDATE in Runtime.dispose 2020-10-31 14:12:46 -05:00
Thomas Weber a428ca93c5 Add Runtime/Virtualmachine.stop() 2020-10-31 13:29:18 -05:00
Thomas Weber 00b5b2cfce Fix some eslint errors 2020-10-28 19:46:37 -05:00
Thomas Weber eca4a4ab84 Add maxClones option 2020-10-24 17:40:46 -05:00
Thomas Weber a9b6a890eb Add setRuntimeOptions 2020-10-24 17:38:03 -05:00
Thomas Weber 7b2a7e15a7 Don't log the current time 2020-10-24 17:33:46 -05:00
Thomas Weber e6cbbd8ed2 Don't draw if document is hidden 2020-10-24 17:30:17 -05:00
DD Liu 04b6963788 Pass on event type from CDM 2020-10-15 19:56:24 -04:00
Thomas Weber 650eb92060 Precompile should not reset all caches 2020-10-14 10:29:26 -05:00
Thomas Weber 922df540d1 Add Runtime.precompile 2020-10-14 10:27:17 -05:00
Thomas Weber e42dd87253 Restore THREAD_STEP_INTERVAL and THREAD_STEP_INTERVAL_COMPATIBILITY
Some of the tests expect these to exist, so bring them back.
The runtime itself does not use these values.
2020-10-05 15:49:56 -05:00
Thomas Weber d002f1394b Replace "compatibility mode" with "framerate" (#23) 2020-10-05 15:12:36 -05:00
Thomas Weber 4816677b55 Fix some edge cases with stage caching 2020-09-26 17:49:53 -05:00
Thomas Weber 30886b3ba6 Cache stage target
This is a pretty minor optimization.
The stage target was almost always the first target in the list anyways.
2020-09-26 17:06:35 -05:00
Thomas Weber 8ffe35b05f Fix setCompilerOptions 2020-09-19 14:36:25 -05:00
Thomas Weber cae6f712c3 Fix test failures 2020-09-19 14:05:56 -05:00
Thomas Weber d889dea44d Stuck Checking -> Warp Timer & simplify compiler options 2020-09-19 13:45:05 -05:00
Thomas Weber ec895db09a Cleanup some older changes 2020-08-13 17:24:28 -05:00
Thomas Weber 20f1012961 Add stuck checking option 2020-08-13 17:17:35 -05:00
Thomas Weber a11554dd79 Add methods for disabling and enabling compiler 2020-07-25 17:29:15 -05:00
Thomas Weber 594ab8348c Add events for changing compatibility mode 2020-07-25 16:43:12 -05:00
Thomas Weber 7dba04525d Fix restarted threads not being compiled 2020-07-14 01:44:30 -05:00
Thomas Weber a5536bfa3c Move script cache to Blocks 2020-07-07 11:05:46 -05:00
Thomas Weber f0d76864a4 minor cleanup 2020-07-06 23:16:51 -05:00
Thomas Weber 1714ebf5f6 Merge remote-tracking branch 'upstream/develop' into develop 2020-06-26 00:45:18 -05:00
Thomas Weber 3a8f0a11f5 Implement ScriptCache 2020-06-25 21:40:57 -05:00
Thomas Weber 7a3e63d30d More blocks and fixes
- fix startHats executing compiled scripts

Now implemented in compiler:
- control_if_else
- control_create_clone_of
- control_delete_this_clone
- control_create_clone_of_menu
- motion_movesteps
- motion_turnright
- motion_turnleft
- motion_ifonedgebounce
- operator_not
- operator_round
- operator_add
- operator_subtract
- operator_multiply
- operator_divide
- operator_mathop (except tan)
- operator_random
- sensing_mousex
- sensing_mousey
- pen_penDown
- pen_penUp
- pen_setPenSizeTo
- pen_changePenSizeBy
- pen_changePenHueBy
2020-06-22 18:29:30 -05:00
Thomas Weber d782dca4b9 add control_wait, timers 2020-06-22 17:07:18 -05:00
Thomas Weber c10a631d2e get some more simple things to sortof work 2020-06-22 16:55:46 -05:00
Eric Rosenbaum 540d9c676c Merge pull request #2341 from apple502j/patch-9
Clear some stats when disposing runtime
2020-06-22 10:25:41 -04:00
Thomas Weber 5d0b150753 Add a lot of new opcodes to the compiler
- add operator_and
- add operator_or
- add motion_gotoxy
- add looks_seteffectto
- fix looks_changeeffectby
- add looks_hide
- add looks_show
- add looks_gotofrontback
- add looks_goforwardbackwardlayers
- add looks_setsizeto
- add data_hidevariable
- add data_showvariable
- add control_repeat_until
2020-06-12 17:02:01 -05:00
Thomas Weber 14f4305c85 You can get some very simple scripts to run now
- fix running scripts without a hat
- fix monitors
- compile-time types are here
- add option enableCompiler to _pushThread
- add text
- add control_if
- add data_setvariableto
- add data_changevariableby
- add operator_equals
2020-06-12 16:18:05 -05:00
Thomas Weber 92da52e4fc This is progress
- if compilation errors, fallback to interpreter
- retire compiled threads once done
- add control_repeat
- add math_whole_number
2020-06-09 20:00:17 -05:00
Thomas Weber 4a93dab4fa What if we compiled the blocks? 2020-06-08 17:59:23 -05:00
adroitwhiz 61a0739950 add comment on hideFromPalette 2020-06-02 16:29:49 -04:00
adroitwhiz d6e7ede03a Support extension block filtering per-target 2020-05-28 12:15:22 -04:00
apple502j 3e48cd7df6 Reset counter and timer too 2020-04-06 20:21:31 +09:00
Erik Mejer Hansen a6d8f6cbf2 Fix indents 2019-11-13 15:00:38 +01:00
Erik Mejer Hansen 700e163abe Fix handling of custom field types 2019-11-13 14:58:44 +01:00
Karishma Chadha 3859013606 Move inline image specific code into separate helper function. Remove unnecessary todo. 2019-10-17 15:29:04 -04:00
Karishma Chadha a9e081859e Remove todo comment about flip_rtl default based on discussion from PR. 2019-09-27 11:48:31 -05:00