Created
May 16, 2018 22:11
-
-
Save cazala/c4c1f3e947a0f6a9aa69150a216e0496 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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