Loading files
3e96b5605This file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/stack-chan-374381865.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
# Stack-chan simulator sample MOD
`stackchan-sample-mod.xsa` is a small prebuilt Moddable MOD archive for browser-simulator smoke testing.
It was built from `sample-mod/manifest.json`, whose `mod.js` exports Stack-chan-style hooks:
```js
export default {
onLaunch() {
trace('[sample-mod] onLaunch from browser simulator sample\n')
return true
},
async onRobotCreated(robot) {
trace('[sample-mod] onRobotCreated from browser simulator sample\n')
robot.setColor?.('primary', 0x30, 0xe0, 0xff)
robot.setColor?.('secondary', 0xff, 0x70, 0xd8)
await robot.showBalloon?.('sample .xsa OK', { timeout: 1500 })
},
}
```
To rebuild it:
```sh
cd web/simulator/samples
mcrun -d -m ./sample-mod/manifest.json
cp "$MODDABLE/build/bin/lin/mc/debug/sample-mod/mc.xsa" ./stackchan-sample-mod.xsa
```
The file is intended for exercising download/upload/persistence and launch-archive plumbing; it is not a production MOD example. After installing it and clicking **Restart simulator**, the face colors should change to cyan/pink and a `sample .xsa OK` balloon should appear.
3e96b5605This file is pinned to the selected release. Download the original to open it in your design tool.