# WASM Playground We've created an isolated playground environment for rapid rendering testing. There are two types of playgrounds: - Shapes Playground - Text Editor Playground ## File Structure The playground files are located in: ``` frontend/resources/wasm-playground/ ├── clips.html ├── comparison.html ├── index.html ├── masks.html ├── paths.html ├── plus.html ├── rects.html ├── texts.html └── js/ ``` Each HTML file is a separate playground demo. The `js/` directory contains shared JavaScript modules and utilities. ## Shapes Playground - Run penpot locally - Go to http://localhost:3449/wasm-playground/ - The `index.html` page lists all available playgrounds for easy navigation. For the different kinds of shape playgrounds, you can set the amount of shapes you want to render each time by passing a query parameter. For example: http://localhost:3449/wasm-playground/texts.html?texts=300 This will render 300 text shapes. You can adjust the parameter for other playgrounds as well to control the number of shapes rendered. ![WASM Playground Renderer](images/wasm_playground_renderer.png) ### How to Add a New Playground Test 1. **Create a new HTML file** in `frontend/resources/wasm-playground/` (e.g., `mytest.html`). 2. Use one of the existing playground HTML files as a template (such as `clips.html` or `comparison.html`). 3. Import the necessary modules from `js/lib.js` or other shared scripts. 4. Add your test logic in a `