Skip to content

Instantly share code, notes, and snippets.

@cazala
Created May 16, 2018 22:11
Show Gist options
  • Save cazala/c4c1f3e947a0f6a9aa69150a216e0496 to your computer and use it in GitHub Desktop.
Save cazala/c4c1f3e947a0f6a9aa69150a216e0496 to your computer and use it in GitHub Desktop.
import { createElement, ScriptableScene, ISimplifiedNode } from 'metaverse-api'
import { Sea } from './components/Sea'
let cachedScene: ISimplifiedNode | null = null
export function render(sea: any) {
cachedScene = Sea({sea})
}
export default class RemoteScene extends ScriptableScene {
async render() {
return (
<scene position={{ x: 0.5, y: 0.5, z: 0.5 }} scale={0.9}>
{cachedScene}
</scene>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment