Use BabylonJS like A-Frame through reactive Svelte Components.
<BabylonEngine>
<BabylonScene>
<BabylonCamera position={new BABYLON.Vector3(0, 5, -10)} target={BABYLON.Vector3.Zero()} />
<BabylonHemisphericLight direction={new BABYLON.Vector3(0, 1, 0)} intensity={0.7} />
<!-- Below is two-way binding between spherePosition and position -->
<BabylonSphere bind:position={spherePosition} options={{ diameter: 2, segments: 32 }} />
<BabylonGround options={{ width: 6, height: 6 }} />
</BabylonScene>
</BabylonEngine>
https://svelte.dev/repl/3119711d043c4a8ba34c2931098a1e9c?version=3.37.0
$ npm i
$ npm run dev
- http://localhost:3000/