@micheeeeel/yinyangapp 2.0.4 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/bundle.js +1 -1
- package/dist/types/adapters/yasuniCauseAdapter.d.ts +12 -0
- package/dist/types/animations/AnimationsMngr.d.ts +49 -2
- package/dist/types/animations/fastHomingStop.d.ts +57 -0
- package/dist/types/animations/fastHomingStop.test.d.ts +1 -0
- package/dist/types/api-film.d.ts +7 -0
- package/dist/types/api-random.d.ts +32 -0
- package/dist/types/api-random.test.d.ts +1 -0
- package/dist/types/api.d.ts +3 -0
- package/dist/types/components/controller/YinYangController.d.ts +24 -1
- package/dist/types/components/controller/odd/ChildrenOrbitManager.d.ts +51 -3
- package/dist/types/components/controls/VizControlsPanel.d.ts +2 -0
- package/dist/types/components/view/YinYangDrawer.d.ts +33 -0
- package/dist/types/config/animationConfig.d.ts +7 -0
- package/dist/types/interfaces/IYinYangController.d.ts +13 -1
- package/dist/types/utils/InactivityTracker.d.ts +25 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,8 @@ import {
|
|
|
35
35
|
createYinYangSvgs, // idem, en lot
|
|
36
36
|
mountYinYang, // diagramme vivant dans un conteneur de l'hôte → { controller, destroy }
|
|
37
37
|
mapCauseToInternalModel,
|
|
38
|
+
createRandomCause, // Cause aléatoire (2–7 composantes, ODD distincts) — graine optionnelle
|
|
39
|
+
getYasuniCause, // le Yasuní complet (7 composantes, 20 ODD) au format Cause
|
|
38
40
|
type Cause, type YinYangSvgConfig, type YinYangMountConfig,
|
|
39
41
|
} from "@micheeeeel/yinyangapp";
|
|
40
42
|
```
|
|
@@ -104,6 +106,22 @@ const film = await createYinYangFilmSvgAsync({ data, size: 100, transitionFrames
|
|
|
104
106
|
- Survol / sélection : remplacer le film par `mountYinYang` (diagramme vivant),
|
|
105
107
|
puis revenir au film.
|
|
106
108
|
|
|
109
|
+
### Données : Yasuní complet ou Cause aléatoire
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import { createRandomCause, getYasuniCause } from "@micheeeeel/yinyangapp";
|
|
113
|
+
|
|
114
|
+
const yasuni = getYasuniCause(); // identique à la page standalone
|
|
115
|
+
const pin = createRandomCause({ seed: mission.id, id: mission.id }); // stable par graine
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`createRandomCause` tire 2 à 7 composantes (orientations alternées), 1 à 3 ODD
|
|
119
|
+
par composante — **distincts dans toute la Cause**, donc couleurs officielles
|
|
120
|
+
jamais répétées — et 1 à 4 facettes par ODD (score ∈ [0.15, 0.85], poids 1–3).
|
|
121
|
+
Toutes les plages sont surchargeables (`components`, `oddsPerComponent`,
|
|
122
|
+
`cuttingsPerOdd`, `score`, `weight`). Même `seed` ⇒ même Cause ; sans graine,
|
|
123
|
+
`Math.random`. Ne touche pas au DOM (utilisable en SSR).
|
|
124
|
+
|
|
107
125
|
Guide d'intégration détaillé (React + Mapbox, cache, survol) : [docs/integration-yvy-frontend.md](docs/integration-yvy-frontend.md).
|
|
108
126
|
|
|
109
127
|
## Développement
|