Skip to content

Commit

Permalink
Update from slint-ui/slint
Browse files Browse the repository at this point in the history
Update tng docs from commit 89ed5a5d647360a3e4dacaa01048858cedfe0589 (refs/heads/docs-tng)
  • Loading branch information
slint-team[bot] committed Oct 23, 2024
1 parent f66ee6a commit 07888b3
Show file tree
Hide file tree
Showing 31 changed files with 286 additions and 214 deletions.
146 changes: 86 additions & 60 deletions snapshots/tng/elements/image/index.html

Large diffs are not rendered by default.

114 changes: 80 additions & 34 deletions snapshots/tng/elements/text/index.html

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed snapshots/tng/pagefind/fragment/en_c979ae8.pf_fragment
Binary file not shown.
Binary file removed snapshots/tng/pagefind/fragment/en_da75e9c.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed snapshots/tng/pagefind/fragment/en_f561d6c.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file removed snapshots/tng/pagefind/index/en_3a3789c.pf_index
Binary file not shown.
Binary file added snapshots/tng/pagefind/index/en_3d4f3a6.pf_index
Binary file not shown.
2 changes: 1 addition & 1 deletion snapshots/tng/pagefind/pagefind-entry.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.1.1","languages":{"en":{"hash":"en_a5747e5aea","wasm":"en","page_count":22}}}
{"version":"1.1.1","languages":{"en":{"hash":"en_1b4a8a116a","wasm":"en","page_count":22}}}
Binary file not shown.
Binary file removed snapshots/tng/pagefind/pagefind.en_a5747e5aea.pf_meta
Binary file not shown.
17 changes: 14 additions & 3 deletions snapshots/tng/tutorial/creating_the_tiles/index.html

Large diffs are not rendered by default.

18 changes: 7 additions & 11 deletions snapshots/tng/tutorial/from_one_to_multiple_tiles/index.html

Large diffs are not rendered by default.

120 changes: 49 additions & 71 deletions snapshots/tng/tutorial/game_logic/index.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions snapshots/tng/tutorial/getting_started/index.html

Large diffs are not rendered by default.

59 changes: 35 additions & 24 deletions snapshots/tng/tutorial/memory_tile/index.html

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions snapshots/tng/tutorial/polishing_the_tile/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion snapshots/tng/tutorial/running_in_a_browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<p>This is because wasm-pack requires Rust to generate a <code dir="auto">"cdylib"</code>.</p>
<p>You also need to change <code dir="auto">main.rs</code> by adding the <code dir="auto">wasm_bindgen(start)</code>
attribute to the <code dir="auto">main</code> function and export it with the <code dir="auto">pub</code> keyword:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="rust,noplayground"><code><div class="ec-line"><div class="code"><span style="--0:#f8f8f2;--1:#4c4f69">#[cfg_attr(target_arch = "wasm32",</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#f8f8f2;--1:#4c4f69"> </span></span><span style="--0:#f8f8f2;--1:#4c4f69">wasm_bindgen::prelude::wasm_bindgen(start))]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#f8f8f2;--1:#4c4f69">pub fn main() {</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#f8f8f2;--1:#4c4f69"> </span></span><span style="--0:#f8f8f2;--1:#4c4f69">//...</span></div></div><div class="ec-line"><div class="code"><span style="--0:#f8f8f2;--1:#4c4f69">}</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="#[cfg_attr(target_arch = &#x22;wasm32&#x22;, wasm_bindgen::prelude::wasm_bindgen(start))]pub fn main() { //...}"><div></div></button></div></figure></div>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="rust"><code><div class="ec-line"><div class="code"><span style="--0:#F8F8F2;--1:#865511;--1fs:italic">#</span><span style="--0:#F8F8F2;--1:#5D5F6E">[</span><span style="--0:#F8F8F2;--1:#865511;--1fs:italic">cfg_attr</span><span style="--0:#F8F8F2;--1:#5D5F6E">(</span><span style="--0:#F8F8F2;--1:#865511;--1fs:italic">target_arch </span><span style="--0:#FF79C6;--1:#116B70">=</span><span style="--0:#F8F8F2;--1:#865511;--1fs:italic"> </span><span style="--0:#F1FA8C;--1:#2C6E1E">"wasm32"</span><span style="--0:#F8F8F2;--1:#5D5F6E">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#F8F8F2;--1:#865511;--1fs:italic"> </span></span><span style="--0:#F8F8F2;--1:#865511;--1fs:italic">wasm_bindgen</span><span style="--0:#FF79C6;--1:#116B70">::</span><span style="--0:#F8F8F2;--1:#865511;--1fs:italic">prelude</span><span style="--0:#FF79C6;--1:#116B70">::</span><span style="--0:#F8F8F2;--1:#865511;--1fs:italic">wasm_bindgen</span><span style="--0:#F8F8F2;--1:#5D5F6E">(</span><span style="--0:#F8F8F2;--1:#865511;--1fs:italic">start</span><span style="--0:#F8F8F2;--1:#5D5F6E">))]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#FF79C6;--1:#7B34D9">pub</span><span style="--0:#F8F8F2;--1:#4C4F69"> </span><span style="--0:#FF79C6;--1:#7B34D9">fn</span><span style="--0:#F8F8F2;--1:#4C4F69"> </span><span style="--0:#50FA7B;--1:#1A57D1;--1fs:italic">main</span><span style="--0:#F8F8F2;--1:#5D5F6E">()</span><span style="--0:#F8F8F2;--1:#4C4F69"> </span><span style="--0:#F8F8F2;--1:#5D5F6E">{</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#96A1C2;--1:#5D5F69;--1fs:italic">//...</span></div></div><div class="ec-line"><div class="code"><span style="--0:#F8F8F2;--1:#5D5F6E">}</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="#[cfg_attr(target_arch = &#x22;wasm32&#x22;, wasm_bindgen::prelude::wasm_bindgen(start))]pub fn main() { //...}"><div></div></button></div></figure></div>
<p>Compile the program with <code dir="auto">wasm-pack build --release --target web</code>. This
creates a <code dir="auto">pkg</code> directory containing several files, including a <code dir="auto">.js</code> file
named after the program name that you need to import into an HTML file.</p>
Expand Down

0 comments on commit 07888b3

Please sign in to comment.