Skip to content

Examples ​

Everything below lives in the repository and runs from the workspace root — no publishing required while the compiler and several targets are still in-repo.

bash
git clone https://github.com/rasenjs/rasen.git
cd rasen
yarn install
yarn build          # the examples import the workspace packages

Runnable examples ​

ExampleCommandWhat it shows
webyarn examples:web:devDOM, Canvas 2D, JSX, transitions, lazy components, HMR
canvas-2dyarn workspace @rasenjs/examples-canvas-2d devthe shape gallery and animation basics
gfxyarn examples:webgl:devWebGL painting the canvas-2d API, batching, cameras
ssryarn examples:ssr:devrenderToString + hydrate, isomorphic routing
router-demo—the router on both targets
react-nativesee its READMEan RN app with no React
rn-dom-testsee its READMEthe Fabric document layer directly
gpuisee its READMEnative desktop window, Tailwind-style classes
lvglnative simulatorembedded target (LVGL + QuickJS)
marioyarn examples:mario:deva platformer: sprites, input, frame scheduling
racingyarn examples:racing:deva top-down racer, Kenney starter kit
fpsyarn examples:fps:deva first-person view with sprites and assets
craftyarn examples:craft:devvoxel-style world, WebGL
kenney-fps, kenney-racing—3D content in the GL target
nikke-vieweryarn examples:nikke-viewer:devSpine character viewer with routing and drawers
perry-nikke-vieweryarn examples:perry-nikke-viewer:buildthe same viewer compiled ahead-of-time with Perry
perry-spine, perry-reactive-test—the native AOT path

The canonical template — what a new app looks like — is templates/rasen-ts (SSR + hydration, isomorphic routing, signals, compiler).

Code walkthroughs ​

The Interactive Playground page renders the same snippet sources the repository ships (www/snippets/*), so the code you read there is exactly the code that is built and type-checked.

Released under the MIT License.