Commit graph

37 commits

Author SHA1 Message Date
Simon Hausmann
c771bcff45 Print a warning when trying to animate deprecated properties 2021-02-02 22:58:54 +01:00
Simon Hausmann
e61529976e Issue warnings when creating bindings against deprecated properties 2021-02-02 22:42:02 +01:00
Simon Hausmann
90cdfc9066 Fix memory node tutorial to run with older node versions
The node on my Ubuntu 20.04 installation doesn't have Array.prototype.flatMap.
2021-01-29 11:47:33 +01:00
Simon Hausmann
b98fa87e0e Simplify memory nodejs run
Don't use the "hidden" component to call `run`.
2021-01-29 11:16:44 +01:00
Olivier Goffart
9edf60a178 Fix wasm example using rand 2021-01-28 16:03:57 +01:00
Olivier Goffart
17eaffb6e1 Update rand dependency in the examples 2021-01-28 15:43:38 +01:00
Olivier Goffart
23a511b380 Replace img!"..." by @image-url("...") 2021-01-28 11:49:24 +01:00
Simon Hausmann
5f265ffc09 Split up ComponentWindow::run() into show(), hide() and sixtyfps::run_event_loop()
This allows creating multiple windows for example, and it will allow for
showing windows in those tests that require a mapped window.

As a bonus, the run() function on generated components is not consuming
anymore.
2021-01-19 09:50:22 +01:00
gondolyr
4c1d35967e Update memory example to use row and column props
Using row and column count properties improves the readability,
extensibility, and maintainability by removing the magic numbers for the
other calculated properties. Previously, it took me some time to
understand what these numbers represented and this change should remove
this difficulty.
2020-12-24 17:25:22 +01:00
Olivier Goffart
61399e566a Add a title to the Window
also add a color, but not yet implemented
2020-12-18 16:47:14 +01:00
Olivier Goffart
0d2d48be4f Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
Olivier Goffart
002cfa76af Use PRIVATE in target_link_libraries 2020-12-16 14:29:12 +01:00
Simon Hausmann
c2a0cd7000 Added a node version of the memory puzzle game
This also implements a basic single shot timer support, which has
one caveat: it leaks the closures right now.
2020-12-11 17:17:28 +01:00
Simon Hausmann
cfe7455305 Switch the memory example to the simpler .60 import mechanism 2020-12-10 15:10:30 +01:00
Simon Hausmann
d2ecd539bd Style edits
Use longer but perhaps more descriptive names for the first tile of the
pair.
2020-12-10 15:02:41 +01:00
Olivier Goffart
c53f69d332 memory game in C++ 2020-12-10 13:09:21 +01:00
Simon Hausmann
21c5ddaf61 Synchronize code with the tutorial 2020-12-10 09:37:33 +01:00
Simon Hausmann
0b84f2c40e Unify the tile arrays
There's no "restart" etc. so for now the code is much simpler by having just one array.
2020-12-10 08:56:15 +01:00
Simon Hausmann
a366744f28 Sync code with tutorial 2020-12-09 15:04:40 +01:00
Simon Hausmann
ce2cfa022d Flip the boolean expression for the base memory tile color
Subjectively it's easier to read :)
2020-12-09 14:01:56 +01:00
Simon Hausmann
2398d00e6f Apply the wasm init simplifcation from the tutorial
The await wrapper is not needed
2020-12-09 13:52:20 +01:00
Olivier Goffart
d3a79e49f6 memory: attempt to simplify the logic slightly 2020-12-09 13:35:57 +01:00
Olivier Goffart
060dd655a5 Memory game: add the logo on the hidden tile 2020-12-08 20:21:56 +01:00
Olivier Goffart
0a1c9aa206 Fix the aspect ratio of images by keeping them square 2020-12-08 16:40:17 +01:00
Olivier Goffart
132ed8155d Respect the aspect ratio in the memory game 2020-12-08 16:37:20 +01:00
Olivier Goffart
dbd27f150d Memory: color scheme and size 2020-12-08 14:57:10 +01:00
Simon Hausmann
f77bdffc38 Prospective fix for aspect ratio preservation for the icons 2020-12-08 14:25:53 +01:00
Simon Hausmann
82d6a679f5 Show a different color for solved tiles 2020-12-08 13:40:29 +01:00
Olivier Goffart
2e5007da32 memory: fix the file name in the index.html 2020-12-08 13:24:48 +01:00
Olivier Goffart
d8680c33d0 Port more wasm example to the simplified wasm 2020-12-08 13:01:02 +01:00
Simon Hausmann
199ae5f9d3 Simplify wasm startup
It is not necessary to call main because it's marked to be called on "startup".
2020-12-08 12:18:52 +01:00
Simon Hausmann
39b8691819 Switch to generating the SVG icons using rsvg-convert
The npm package is not maintained anymore and does not support newer
font-awesome versions with additional icons.
2020-12-08 12:03:51 +01:00
Olivier Goffart
91dcf00897 Memory: Ssmall design change
- Add some padding
 - Better colors
 - rounded corners
2020-12-08 11:59:47 +01:00
Simon Hausmann
9ac4cd851b Open the memory tile from the center 2020-12-08 11:35:08 +01:00
Simon Hausmann
e602bc603a A wasm port for the memory puzzle without npm and webpack 2020-12-08 11:15:54 +01:00
Simon Hausmann
d471ed566f Fix tile positioning inside the window
Don't start at (0, 0) - leave some space
2020-12-08 10:39:26 +01:00
Simon Hausmann
574d17e698 Initial version of a small memory game
This is intended to form the basis for a tutorial.
2020-12-08 09:58:53 +01:00