Commit graph

2567 commits

Author SHA1 Message Date
Jordan Eldredge
2d7db715c2 Start typechecking more runtime objects 2019-11-30 13:42:53 -08:00
Jordan Eldredge
7652381d46 Improive typing in modern 2019-11-30 13:42:53 -08:00
Jordan Eldredge
5f870c870b Expose children via js_getChildren 2019-11-30 13:42:53 -08:00
Jordan Eldredge
1546a9b057 Don't spread attributes into components
Eventually we want `.attributes` to be private and require going through methodso on the maki object to access.
2019-11-30 13:42:53 -08:00
Jordan Eldredge
eb619e3a5b Rename components to clarify that nodes are actually maki objects 2019-11-30 13:42:53 -08:00
Jordan Eldredge
cf2c88b1c0 Add parent references to XML tree 2019-11-30 13:42:53 -08:00
Jordan Eldredge
2e230ac3e0 Remove console.log 2019-11-30 13:42:53 -08:00
Jordan Eldredge
c90c2a573a Trigger js_update on self 2019-11-30 13:42:53 -08:00
Jordan Eldredge
29e4d5040f Avoid rerender cascade
Previously a `js_trigger` event in MMD3's resting state would take about
40ms to render. Now it takes about 4ms.
2019-11-30 13:42:53 -08:00
Jordan Eldredge
7666047927 Return a string so other methods don't crash 2019-11-30 13:42:53 -08:00
Jordan Eldredge
60d4f686c9 Add font support (#902) 2019-11-30 13:42:53 -08:00
jberg
baa83eed61 Fix image lookups for animated layers (#928) 2019-11-30 13:42:53 -08:00
jberg
59281e056f Move all image lookups to XML tree and support directly specifying image file (#886)
* handle image lookup in initialize for zip files

* remove unused params

* get image paths from node separately

* do image lookups in initialize

* fix lint errors

* handle case insensitivity and small tweaks

* handle nodes without name before we call toLowerCase

* fix isString

* move image lookups to xml tree

* update function comment

* spell out lowercase

* add additional comment about why we return node itself

* remove extra variable

* rename imagePaths to imageAttributes

* early returns

* move all resolved images to js_assets attribute instead of overwriting attr

* missed on previous renaming path->attribute

* fix lint errors

* need node back after rebase

* dont need children param anymore
2019-11-30 13:42:53 -08:00
jberg
8e51d92222 Fix store namespacing in tests (#927) 2019-11-30 13:42:53 -08:00
jberg
a1e0b78444 Implement goToTarget animations and setTargetX/Y/W/H/Alpha (#923)
* Implement goToTarget animations and setTargetX/Y/W/H/Alpha

* add defaults to simplify logic
2019-11-30 13:42:53 -08:00
Jordan Eldredge
0f25e490e3 Remove empty dir 2019-11-30 13:42:53 -08:00
Jordan Eldredge
b829e67b02 Clean up types a bit 2019-11-30 13:42:53 -08:00
Jordan Eldredge
ca3d68024f Namespace modern app state 2019-11-30 13:42:53 -08:00
Jordan Eldredge
19c2fed35b Derive pos inside parseComand 2019-11-30 13:42:53 -08:00
Jordan Eldredge
d7aefd1110 Add disabled regression test for https://github.com/captbaritone/webamp/issues/898 2019-11-30 13:42:53 -08:00
Jordan Eldredge
a536114903 Improve error reporting in function extraction script 2019-11-30 13:42:53 -08:00
Jordan Eldredge
a89db34ccb Throw usefull error instead of just logging it 2019-11-30 13:42:53 -08:00
Jordan Eldredge
cb4ab12128 Improve error message for missing opcode 2019-11-30 13:42:53 -08:00
Jordan Eldredge
999b7d6fa1 Check both types of call opcodes 2019-11-30 13:42:53 -08:00
Jordan Eldredge
af879b31c7 Try adding a progress dashboard (#925)
* First stab at dashboard

Show the % of classes that are complete

Use a table for the dashboard

Enable dashboard via `modern/ready`

* Add a box splitting out methods that are actually used
2019-11-30 13:42:53 -08:00
Jordan Eldredge
f947198bd5 Fix summing count objects 2019-11-30 13:42:53 -08:00
Jordan Eldredge
b1b04af75a Add data from analyzing more skins 2019-11-30 13:42:53 -08:00
Jordan Eldredge
f9a645c60f Start analyzing more .wal files 2019-11-30 13:42:53 -08:00
Jordan Eldredge
f4eb9942e9 Fix script to extract maki methods from a directory of .wal files 2019-11-30 13:42:53 -08:00
Jordan Eldredge
cea13afcfa Enable overlays in devserver mode 2019-11-30 13:42:53 -08:00
jberg
b690c0b39e Need to prefix performance with window (#922) 2019-11-30 13:42:53 -08:00
jberg
96f1b108e1 Add more string functions (#911)
* Add more string functions

* add doc strings from std.mi

* fix strleft
2019-11-30 13:42:53 -08:00
jberg
3743868cc6 Implement timer (#909)
* Implement timer

* change isRunning in objects to match Winamp behavior, std.mi is wrong

* need to set start time for timer

* add comment to updated objects array
2019-11-30 13:42:53 -08:00
Jordan Eldredge
3df76aef6d Prefer Date.getFullYear() (#920)
MDN says `.getYear` is deprecated.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getYear
2019-11-30 13:42:53 -08:00
Jordan Eldredge
6221af557d Appease linter 2019-11-30 13:42:53 -08:00
jberg
6ae9ff9dee Add more datetime functions (#916)
* Implement more datetime functions

* split out function

* add getdateyear and getdatedst

* add function comments from MAKI

* remove year/dst functions from test
2019-11-30 13:42:53 -08:00
jberg
2dc08be1e1 Trigger hookables (#917) 2019-11-30 13:42:53 -08:00
Jordan Eldredge
4a49bcfd03 Fix snapshots to work with new version of rc-slider 2019-11-30 13:42:53 -08:00
jberg
d574b92f68 Add more modern skins (#918) 2019-11-30 13:42:53 -08:00
jberg
27f93e7770 Add getVUMeter functions (#912) 2019-11-30 13:42:53 -08:00
jberg
2201108438 Add more system time and number functions (#913)
* Add more system time and number functions

* rename 2->Two
2019-11-30 13:42:53 -08:00
jberg
230f639e41 Fix layout overflow (#914)
* Fix layout overflow

* overflow if width or height are present
2019-11-30 13:42:53 -08:00
jberg
390b10abd9 Implement mouse position (#908)
* Implement mouse position

* move getMousePosition to utils
2019-11-30 13:42:53 -08:00
Jordan Eldredge
de164c0846 Overflow hidden for layout 2019-11-30 13:42:53 -08:00
Jordan Eldredge
10c6dfed85 Upgrade rc-slider and lift React.StrictMode
rc-slider was preventing us from enabling this more broadly. With https://github.com/react-component/slider/pull/591 merged and released, we can make more of the app strict
2019-11-30 13:42:53 -08:00
Jordan Eldredge
ffc2423629 Refactor portals to use hooks rather than deprecated lifecycle methods 2019-11-30 13:42:53 -08:00
jberg
753bce2d93 Trigger update on resize (#906) 2019-11-30 13:42:53 -08:00
jberg
72d9e07d68 Implement float <-> string conversion (#907) 2019-11-30 13:42:53 -08:00
jberg
c4adc4f2b7 Render animated layers, still needs image loading changes (#900)
* Render animated layers, still needs image loading changes

* convert params from strings once initially, add return types

* rename params->style

* fix gotoframe

* split out defaults/type conversion into own functions, review tweaks

* fix more null checks

* abstract out backgroundPosition and width/height calculation

* use raf for animation loop, split out into functions

* fix lint errors, specify window as global
2019-11-30 13:42:53 -08:00
jberg
803b89d9e0 fix ghost logic, add defaults and type conversion (#904) 2019-11-30 13:42:53 -08:00