@oasis-engine/mars

my awesome project

Usage no npm install needed!

<script type="module">
  import oasisEngineMars from 'https://cdn.skypack.dev/@oasis-engine/mars';
</script>

README

Oasis Mars

npm-size npm-download

This is a mars runtime created by oasis engine.

Badges

TNPM version TNPM downloads


Usage

import { MarsComponent, MarsResource } from "@oasis-engine/mars";

const renderer = entity.addComponent(MarsComponent);
const marsJson = 'https://gw.alipayobjects.com/os/gltf-asset/o3-e/RVITQTIWPTYE/-2123982445-2341f.json';
MarsResource.loadSceneAsync(marsJson, {}, engine.resourceManager).then((resource) => {
  renderer.resource = resource;
  renderer.play();
});

Install

tnpm i @oasis-engine/mars --save

Dev

1、Clone this repository and install the dependencies:

tnpm i

2、Run the example:

tnpm run example

License

MIT