Commit Graph

383 Commits

Author SHA1 Message Date
Max Cahill
eef0d8d126
Merge pull request #15 from pakeke-constructor/patch-1
Fixed `start` state inclusion in state_machine
2021-01-25 10:41:37 +11:00
pakeke-constructor
f4a924aced
Fixed start state inclusion in state_machine 2021-01-25 12:22:37 +13:00
Max Cahill
7185a91fc5 [dev] note about oklab colour space 2021-01-15 16:22:01 +11:00
Max Cahill
d5938f098e Happy new year! 2021-01-08 17:06:44 +11:00
Max Cahill
9bb2f0367d [modified] readme 2021-01-05 15:20:55 +11:00
Max Cahill
70d6a99891 [modified] state machine api; no longer gets the machine on all callbacks.
benefit is being able to use a plain old class with `:update(dt)` as a state, and therefore nest state machines directly without a wrapper.
2020-12-01 15:33:22 +11:00
Max Cahill
f3038d5bc0
Merge pull request #13 from speakk/patch-1
Mention varargs being passed into state callbacks
2020-12-01 09:15:33 +11:00
speak
af60cf26cf
Mention varargs being passed into state callbacks 2020-11-30 23:04:19 +02:00
Max Cahill
8be736d992 [added] stringx.apply_template for "$template_var" containing strings 2020-11-19 17:18:38 +11:00
Max Cahill
01ffdc09cd [added] stringx.trim 2020-11-12 16:36:06 +11:00
Max Cahill
baa71bdf4e [added] stringx.deindent (and alias dedent) 2020-11-12 14:32:56 +11:00
Max Cahill
5335b6fbdd Merge remote-tracking branch 'origin/feature/functional-refactor' into master 2020-11-12 14:32:34 +11:00
Max Cahill
b45f606cdf [fixed] regressions in functional.lua 2020-11-12 13:50:30 +11:00
Max Cahill
a810bf4ce5 [modified] unnecessary use of cached table length for many functions 2020-11-11 13:38:52 +11:00
Max Cahill
715765003d [modified] moderate functional refactor (BREAKING)
- modified functional.reduce signature; takes seed value before function now as this results in much more readable calling code
- added filter_inplace and aliased remap as map_inplace to make semantics more clear
- rewrote many functions to use numeric for as a tiny speed boost at the cost of library code readability
[modified] sequence to be compatible
2020-11-10 20:51:43 +11:00
Max Cahill
1eaf77ad7a [fixed] assert was not exported upon :export() 2020-11-10 20:48:40 +11:00
Max Cahill
cd1f9f097a [added] mathx.length, mathx.distance for "inline" geometry stuff 2020-09-02 13:34:10 +10:00
Max Cahill
699affd1ad [added] set:size and set:get(index) 2020-08-29 21:12:56 +10:00
Max Cahill
5f124be2f0 [added] tablex.trim to trim a table to a certain length 2020-08-24 20:54:43 +10:00
Max Cahill
028b21ef9a [added] set:to_table which returns the ordered contents unchanged and intentionally disables the set object itself 2020-08-24 20:54:24 +10:00
Max Cahill
e957a4502f [added] colour.distance_rgb and distance_packed_rgb 2020-08-18 19:54:24 +10:00
Max Cahill
324a5b4783 [dev] 2020-08-12 20:27:28 +10:00
Max Cahill
616b31b35f [fixed] missing exports for some aliases, simplified export 2020-08-09 19:49:24 +10:00
Max Cahill
b4e2cff498 [added] mathx.bilerp which does a bilinear interpolation from 4 samples 2020-07-27 21:47:06 +10:00
Max Cahill
84197b5216 [added] proper tracebacks to errors in async tasks with xpcall (only works for functions with :call, not coroutines with :add) 2020-07-24 09:15:28 +10:00
Max Cahill
8c5fa157c7 [dev] note about strings with spaces being a potential problem with pretty printer; they arent re-parse friendly at the moment 2020-07-22 20:51:54 +10:00
Max Cahill
a18691f229 [modified] async stall resume behaviour implemented in terms of a tail call 2020-07-17 22:47:42 +10:00
Max Cahill
9e8793668f [modified] async task error format easier to read - still need to move to embedded xpcall+stacktrace for more than 1 line of context though! 2020-07-15 14:16:55 +10:00
Max Cahill
5230e8f9d6 [fixed] mathx.wrap over-complicated impl, mathx.round (thanks @MikuAuahDark/@sharpobject) 2020-07-09 15:32:42 +10:00
Max Cahill
7d3b568ac5 [added] correct sequence support for collapse (and flatten) 2020-07-02 17:05:26 +10:00
Max Cahill
18d02434a0 [added] tablex.flatten as an alias for collapse 2020-07-02 17:04:47 +10:00
Max Cahill
d22cf7a66c [modified] readme tweaks 2020-06-29 14:21:25 +10:00
Max Cahill
e87055bc79 [modified] readme, clarifying installation and versioning 2020-06-29 14:16:58 +10:00
Max Cahill
04563ed4b7 [modified] stringx.pretty handles embedded tables better (still likely needs a wrap width instead of an element count per line) 2020-06-19 15:17:24 +10:00
Max Cahill
ab93bcef6b [modified] per-section clarifications in readme 2020-06-15 22:28:53 +10:00
Max Cahill
4d042c58dd [added] spacing on readme module sections 2020-06-15 22:23:22 +10:00
Max Cahill
b63cb34f41 Merge remote-tracking branch 'origin/master' 2020-06-15 21:11:23 +10:00
Max Cahill
ba221060c5 [modified] colour fairly extensively; renamed functions to same snake_case convention as other modules
[added] colour.hsl_to_rgb
2020-06-15 21:11:05 +10:00
Max Cahill
e9313f61e0 [added] reset state upon re-entering state machine as_state 2020-06-11 15:35:57 +10:00
Max Cahill
77fa7b4288 Merge remote-tracking branch 'origin/master' 2020-06-02 15:17:56 +10:00
Max Cahill
a85eec80e2 [added] "canonical" identity function 2020-06-02 15:17:50 +10:00
Max Cahill
eba27da544 [added] note to async about external xpcall being needed for better stack traces 2020-06-02 15:17:36 +10:00
Max Cahill
01713f766f [modified] minor semantics of state machines, added machinery to allow them to be nested more easily, added notes 2020-06-02 15:02:20 +10:00
Max Cahill
11483c52ad [fixed] sequence regressions 2020-06-02 15:01:21 +10:00
Max Cahill
00ac480ed9 [modified] renamed stable_sort.lua to sort.lua; swapped alias order 2020-06-02 15:00:46 +10:00
Max Cahill
608fa1bca3 Merge remote-tracking branch 'origin/master' 2020-05-29 16:20:34 +10:00
Max Cahill
591ba1d7a9 [added] assert methods return first argument so they can be used inline 2020-05-29 16:20:26 +10:00
Max Cahill
a260451d7f Merge remote-tracking branch 'origin/master' 2020-05-27 13:03:46 +10:00
Max Cahill
95a9552cde [added] wip multi-line support to stringx.pretty 2020-05-27 13:03:40 +10:00
Max Cahill
348653a6dd [modified] moved away from assert for consistency in super_call 2020-05-22 16:29:01 +10:00