Commit graph

5155 commits

Author SHA1 Message Date
Simon Hausmann
06c15df76a Apply the loading spinner from the plotter example to the printer demo 2021-08-12 10:11:40 +02:00
Simon Hausmann
a0a3e6e8ab Apply the loading spinner from the plotter example to the memory game 2021-08-12 10:04:55 +02:00
Simon Hausmann
7fef85b59e Apply the loading spinner from the plotter example to the imagefilter 2021-08-12 10:03:19 +02:00
Simon Hausmann
9779408e35 Apply the loading spinner from the plotter example to the gallery 2021-08-12 10:00:44 +02:00
Simon Hausmann
3456842c8a Simplify spinner stopping a little bit
Calling the async function returns a promise, which we can just hook into via finally().

That's less lines of code
2021-08-12 09:58:28 +02:00
Simon Hausmann
9546f8caa7 Shrink the spinner CSS a little bit
... by disabling vscode's beautify formatter.
2021-08-12 09:58:28 +02:00
Simon Hausmann
b2fb339df9 Add a simple loading spinner animation for the plotter wasm demo 2021-08-12 09:58:28 +02:00
Olivier Goffart
bdeb64c518 Fix documentation preview and hightlighting of .60 code with nightly rustdoc
rustdoc changed the html generated. The code used to be in a `<code>`, now it is
in a `<pre>`
So this should wotk with both stable rust and nightly rust
2021-08-11 18:24:44 +02:00
Simon Hausmann
e24ff2bff4 Add the plotter wasm build to the example README 2021-08-11 17:23:39 +02:00
Simon Hausmann
481c977b68 Simplify the image filter example
Use a callback to produce the filtered image, instead of back and forth of
properties.
2021-08-11 17:21:30 +02:00
Simon Hausmann
92655486da Simplify plotter example
Use a callback that produces the plot from a pitch as the image source.
2021-08-11 17:13:21 +02:00
Simon Hausmann
8903adb584 Add a WASM build of the plotters example
... which uses an intermediate drawing backend to skip the text on the axis, as
that requires TrueType fonts form the filesystem.
2021-08-11 16:19:10 +02:00
Olivier Goffart
0ebd92c253 ImageFilter demo: "Blur" is the default filter, so it should show that by default 2021-08-11 16:05:06 +02:00
Olivier Goffart
0b5e87b66b TextInput: Properly align the cursor and selection rect with different vertical alignment 2021-08-11 16:02:25 +02:00
Simon Hausmann
ba58bd86e5 Another small gammar edit 2021-08-11 15:49:42 +02:00
Simon Hausmann
3474204a2b Minor grammar polish
(and teaching cSpell that microcontroller is a word :)
2021-08-11 15:46:20 +02:00
Olivier Goffart
b62d600a3a Make the imagefilter demo self-contained 2021-08-11 15:44:36 +02:00
Olivier Goffart
862cfe1e16
Update README.md
Update the "current status" section
2021-08-11 15:35:21 +02:00
Simon Hausmann
962b6b2205 internal cleanup: remove stray getrandom dependency 2021-08-11 15:32:05 +02:00
Simon Hausmann
39640ca6aa Remove table of contents from top-level README.md
GitHub has its own table of contents dropdown now, which is nice and makes this one redundant.
2021-08-11 15:19:58 +02:00
Simon Hausmann
e5c2a4f996 Avoid hardcoding the rgb crate version for rustdoc builds 2021-08-11 08:46:55 +02:00
Simon Hausmann
79cb3ac27a CI: Add build test coverage for non-default workspace members 2021-08-11 08:27:18 +02:00
Simon Hausmann
89717d7aa3 Speed up the image filter wasm demo
Skip all the decoders/encoders we don't need
2021-08-11 08:24:51 +02:00
Simon Hausmann
8879af374a Add the plotter example to the README
The screenshot link is broken right now, but that's due to the website.

Hopefully in the future we can add a wasm version.
2021-08-10 22:45:32 +02:00
Olivier Goffart
61de3c93ed Mention the normalization change in the changelog 2021-08-10 22:43:19 +02:00
Simon Hausmann
ea663955bd Fix links to rgb crate in the sixtyfps.io hosted online docs
Use the external docs rustdoc feature to link to the rgb docs on docs.rs.
2021-08-10 22:30:37 +02:00
Olivier Goffart
3b6b4442dd Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-08-10 22:21:01 +02:00
Olivier Goffart
0dbb2a7758 Fix nodejs CI
replaceAll was added in node 15, but the CI still runs node 12
2021-08-10 22:21:01 +02:00
Olivier Goffart
4e254445d9 Fix interpreter test 2021-08-10 22:21:01 +02:00
Olivier Goffart
532827b646 Fix the C++ interpreter API compatibility after the change from _ to -
Property name with _ should still be supported by set_property/get_property
2021-08-10 22:21:01 +02:00
Olivier Goffart
ffccef4e0c Examples: replace all _ by - in identifiers 2021-08-10 22:21:01 +02:00
Olivier Goffart
8b2d1f1d8f Docs: replace underscores by dashes 2021-08-10 22:21:01 +02:00
Olivier Goffart
6cb1095e53 Styles: replace all _ by - 2021-08-10 22:21:01 +02:00
Olivier Goffart
7304907b11 Use dashes in builtins.60 2021-08-10 22:21:01 +02:00
Olivier Goffart
c25538c982 Normalize identifiers to - instead of _
As a result
 - The error messages will now show the error with `-` instead of `_`
 - The LSP will auto-complete with -
 - The interpreter's list of properties will list the property with '-'
   (but we made the change so that set_property, get_property, and so on
   work also if passed a '-')
2021-08-10 22:21:01 +02:00
Olivier Goffart
9c95da8a7c
Disable spellcheck CI 2021-08-10 19:19:17 +02:00
Simon Hausmann
0be0e07116 Fix build
Amends commit 0852a7661b
2021-08-10 17:30:30 +02:00
Simon Hausmann
7c38042dde Add the imagefilter to the examples README 2021-08-10 17:24:05 +02:00
Simon Hausmann
efb207b299 imagefilter example: use a blur filter as default
It's visually clearer what's filtered and what's not
2021-08-10 17:12:23 +02:00
Simon Hausmann
e23dcc336f Fix doc build
Amends commit 0852a7661b
2021-08-10 16:53:37 +02:00
Simon Hausmann
0852a7661b Fix mutable slice API
* Change SharedVector::as_mut_slice() to SharedVector::make_mut_slice()
* SharedPixelBuffer::as_mut_slice and SharedPixelBuffer::make_mut_slice()
* SharedPixelBuffer::as_bytes_mut() to SharedPixelBuffer::make_mut_bytes()

This is consistent with Rc::make_mut() and is supposed to emphasize
that, unlike the usual as_* operations, it is not a free operation but
may involve work (detaching the data by cloning it).

Amends commit 7384ebdc32
2021-08-10 16:37:34 +02:00
Simon Hausmann
cb03f1fe8f Prospective fix for updater test
Add the font-size property also to the SpinBox in the fluent style, as the old printer demo expects the style to provide it.

Another way would be to run the test with the ugly style, but
that's just hiding the fact that there's an API difference.
2021-08-10 16:18:19 +02:00
Simon Hausmann
df238d738d Fix build of the old printer demo
It uses a font-size on the Button, which is present in the other styles.
2021-08-10 16:06:35 +02:00
Simon Hausmann
01c3347d19 Make fluent the new default style
It's not ugly :-)
2021-08-10 15:56:38 +02:00
Simon Hausmann
1fca971fa8 Rename RGB(A)8Pixel to Rgb(a)8Pixel
That's consistent casing with RgbaColor.
2021-08-10 15:56:01 +02:00
Simon Hausmann
4e9b2725a7 doc fix: Remove mention of SharedVector in SharedPixelBuffer
It's an implementation detail
2021-08-10 15:56:01 +02:00
Simon Hausmann
a0f06e35d7 Fix rustdoc link
Co-authored-by: Olivier Goffart <ogoffart@sixtyfps.io>
2021-08-10 15:56:01 +02:00
Simon Hausmann
7a7550381d Minor cleanup
Remove unnecessary getrandom dependency from the wasm build of
the imagefilter example.
2021-08-10 15:56:01 +02:00
Simon Hausmann
0215cc8505 Fix up the imagefilter UI a little
Add labels for the filtered image, too, and use a horizontal
layout.
2021-08-10 15:56:01 +02:00
Simon Hausmann
5e5c7cf05b Prospective fix for including the imagefilter and plotter in the CI builds better
Clear their artifacts from the cache and include the imagefilter in the wasm demos.
2021-08-10 15:56:01 +02:00