Installation
Using a CDN
The easiest way to get started is by using a CDN like UNPKG:
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three/build/three.module.js",
"@miris-inc/three": "https://unpkg.com/@miris-inc/three"
}
}
</script>
<script type="module">
import { PerspectiveCamera, Scene, WebGLRenderer } from "@miris-inc/three";
import { MirisStream } from "@miris-inc/three";
// Your code goes here
</script>
You’re now ready to create a scene and begin streaming.
Using a package manager
For more advanced setups, you may wish to use a package manager such as npm or bun.
First, install the @miris-inc/three package with your preferred package manager:
- npm
- pnpm
- yarn
- bun
npm install @miris-inc/three
pnpm add @miris-inc/three
yarn add @miris-inc/three
bun add @miris-inc/three
Then, simply import MirisStream from the package:
import { PerspectiveCamera, Scene, WebGLRenderer } from "@miris-inc/three";
import { MirisStream } from "@miris-inc/three";
// Your code goes here
Now you’re now ready to create a scene and begin streaming.