If you are looking for HOWTOs, tutorials, or general Micrio help, please check out our searchable Knowledge Base at:
For the npm package @micrio/client, see https://www.npmjs.com/package/@micrio/client
Make sure you have Node and pnpm installed.
Make sure you are in this directory. From there, run:
# This will install all necessary dependencies: Svelte and TypeScript
$ pnpm iTo run the dev env:
$ pnpm run devThis will start a webserver on http://localhost:2000/ which will auto reload to any changes made in the ./src dir.
The core rendering engine is written in TypeScript and lives in ./src/engine. This handles all WebGL rendering, camera transforms, and canvas management.
If you make changes to the engine, the dev server (pnpm run dev) will automatically pick them up via hot reload.
To build the production client viewer JS:
$ pnpm run buildThis will bundle all compiled resources and create the final JS lib and TS declaration files in ./public/dist:
micrio.min.jsmicrio.min.d.ts
If you want to test out the compiled version, check out ./index.html and set the JS include to the compiled JS rather than the development version.
(For admins only)
You need to have wrangler installed globally, and have a CLOUDFLARE_API_TOKEN with write access to the bucket set in .env.
Secondly, you need to have write access to the npm repository of @micrio/client.
To publish to both the hosted JS and NPM, and do an automatic version increase, do:
$ pnpm run publish -- --npmAfter this, if everything goes well, the current working version will be automatically increased.
Before you do your next commit, create a new release based on the current state at https://github.com/Q42/Micrio.Client/releases/new :
- Create a new tag with the version just published (ie
v5.1.1) - Auto-generate the release notes
- Publish the release
- Then commit the newly updated version changes
If you only want to update the hosted version, omit the -- --npm argument. This can be useful for testing, and having to add the argument is a safeguard for accidentally publishing a new version on NPM.
If you have any questions, do check out https://doc.micr.io/ for all (technical) documentation.
If you have a reproducable issue, please submit a ticket at https://support.micr.io/ .
For any other questions, contact us at support@micr.io.
Good luck!
