From a2bd25ecb20a6496d937b34a88716d16958ff380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Bousqui=C3=A9?= Date: Fri, 18 Sep 2026 21:11:47 +0200 Subject: [PATCH] docs: examples README in English (user-facing) --- lib/examples/README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/examples/README.md b/lib/examples/README.md index 83bab84..4bc323d 100644 --- a/lib/examples/README.md +++ b/lib/examples/README.md @@ -1,21 +1,21 @@ -# Exemples +# Examples -Chaque fichier `.rs` de ce répertoire est un **exemple autonome** découvert automatiquement par Cargo -(`cargo build -p wsg-lib --examples`). Pour lancer un exemple : +Each `.rs` file in this directory is a **standalone example** auto-discovered by Cargo +(`cargo build -p wsg-lib --examples`). To run an example: ```bash -cargo run -p wsg-lib --example +cargo run -p wsg-lib --example ``` -| Exemple | Commande | Description | -|---------|----------|-------------| -| `simple` | `cargo run -p wsg-lib --example simple` | Quad plat unlit (workflow déclaratif minimal, `AppBuilder` + scène auto). | -| `cube` | `cargo run -p wsg-lib --example cube` | Cube texturé (damier procédural) éclairé par une lumière directionnelle + une point + une spot. | -| `manual` | `cargo run -p wsg-lib --example manual` | Workflow bas-niveau : `Context`, `Renderer`, `PipelineCache` et `Mesh` directement (pas de façade `App`). | -| `spot_test` | `cargo run -p wsg-lib --example spot_test` | Isolation de la lumière spot : seule une spot est allumée (ambiant quasi nul), cube qui tourne sur deux axes pour bien voir le faisceau orienté. | +| Example | Command | Description | +|---------|---------|-------------| +| `simple` | `cargo run -p wsg-lib --example simple` | Flat unlit quad (minimal declarative workflow, `AppBuilder` + auto scene). | +| `cube` | `cargo run -p wsg-lib --example cube` | Textured cube (procedural checker) lit by a directional + point + spot light. | +| `manual` | `cargo run -p wsg-lib --example manual` | Low-level workflow: `Context`, `Renderer`, `PipelineCache`, `Mesh` used directly (no `App` facade). | +| `spot_test` | `cargo run -p wsg-lib --example spot_test` | Spot-light isolation: only one spot is on (near-zero ambient), cube rotates on two axes so the oriented beam is clearly visible. | ## Conventions -- Les exemples sont **autonomes** : ils ne chargent aucun asset sur disque (textures procédurales, géométries codées). -- Ils utilisent le workflow déclaratif (`AppBuilder` + `Scene`) sauf `manual` qui contourne la façade `App`. -- Pour ajouter un nouvel exemple : créer un fichier `.rs` dans ce répertoire, le documenter ici, et le référencer dans le README racine si pertinent. +- Examples are **self-contained**: no assets loaded from disk (procedural textures, hardcoded geometry). +- They use the declarative workflow (`AppBuilder` + `Scene`) except `manual`, which bypasses the `App` facade. +- When adding a new example: create a `.rs` file in this directory, document it here, and reference it in the root README if appropriate.