data.forEach((item, i) => // θ = i * 90° (π/2 rad), φ = 0 for all cards const theta = (i * Math.PI) / 2; const phi = 0;
// 3️⃣ Add a perpetual warp animation (rotate around θ) warp( axis: 'θ', speed: 0.25, // radians per second easing: 'linear', );
// 4️⃣ Mount to the DOM app.mount('#root'); webe tori model 01-05
The GPU‑backed constraint solver is the single biggest win; without it, similar workloads would drop below 20 FPS on the same hardware. 8. Ecosystem & Community | Resource | Link (hypothetical) | What You’ll Find | |----------|--------------------|------------------| | Official Docs | https://docs.webe.io/tori/01-05 | Full API reference, tutorials, migration guides. | | WebE Marketplace | https://marketplace.webe.io/tori
import createTorusApp, Card, warp from '@webe/tori'; import './styles.css'; | | WebE Marketplace | https://marketplace
# 1️⃣ Install the core package (size ~ 62 KB gzipped) npm i @webe/tori@01.05.0
const card = new Card( theta, phi, width: 300, height: 200, content: ` <h2>$item.title</h2> <p>$item.subtitle</p> `, // Theme tokens can be overridden per component style: background: 'var(--color-surface)' , ); | Lazy‑load slices keep the DOM light; GPU‑solver
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>WebE Tori 01‑05 Demo</title> <link rel="stylesheet" href="styles.css"> </head> <body> <div id="root"></div> <script type="module" src="/src/index.ts"></script> </body> </html> A set of cards orbit a virtual torus, seamlessly wrapping when you resize the browser or rotate a mobile device. 5. Real‑World Use‑Cases | Domain | Example Project | How 01‑05 Helps | |--------|----------------|-----------------| | Financial Dashboards | QuantPulse – a live‑updating market‑data wall with 5 000+ tickers. | Lazy‑load slices keep the DOM light; GPU‑solver guarantees < 16 ms frame times even when each ticker animates a sparkline. | | E‑Commerce | ShopLoop – infinite‑loop product carousel that never “ends”. | Torus‑warp replaces the usual duplication trick, delivering a true infinite loop with a single set of nodes. | | AR/VR Interfaces | HoloNav – a mixed‑reality navigation UI that surrounds the user. | The parametric engine can output stereoscopic projection matrices , and the curvature token maps directly to headset FOV. | | Education & Simulations | MathLab – interactive visualisations of 3‑D manifolds. | The torus core is the geometry; students can drag points on the surface and watch the layout recompute instantly. | | Accessibility‑First Portals | InclusiveNews – a news portal where keyboard navigation wraps around sections. | A‑Tori gives screen readers a logical “next” and “previous” order that respects the torus topology. | 6. Migration Path from Earlier Versions | From → To | Breaking Changes | Migration Aids | |-----------|------------------|----------------| | 01‑03 → 01‑04 | warp() now requires an explicit axis argument; old signature deprecated. | npx webe-tori codemod warp-rename auto‑updates call‑sites. | | 01‑04 → 01‑05 | The theme.curvature token moved from global to layout scope; default changed from 0.6 to 0.8 . | tori‑config migrate --from 01.04 --to 01.05 writes a diff you can review. | | Any ≤01‑02 → 01‑05 | The PLE API ( addNode , removeNode ) is now component‑first ; you must wrap raw DOM nodes in ToriComponent . | The CLI prints a migration checklist and scaffolds wrapper classes. |
app.add(card); );