1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-23 20:02:32 +08:00

update example app

This commit is contained in:
Kevin Levron 2021-05-02 20:56:34 +02:00
parent 3705f97c61
commit 785e09d447

View File

@ -12,13 +12,13 @@
<script lang="ts">
import { defineComponent } from 'vue'
import { Box, Camera, LambertMaterial, MeshInterface, PointLight, Renderer, RendererInterface, Scene } from './export'
import { Box, Camera, LambertMaterial, MeshPublicInterface, PointLight, Renderer, RendererPublicInterface, Scene } from './export'
export default defineComponent({
components: { Box, Camera, LambertMaterial, PointLight, Renderer, Scene },
mounted() {
const renderer = this.$refs.renderer as RendererInterface
const mesh = (this.$refs.box as MeshInterface).mesh
const renderer = this.$refs.renderer as RendererPublicInterface
const mesh = (this.$refs.box as MeshPublicInterface).mesh
if (renderer && mesh) {
renderer.onBeforeRender(() => {
mesh.rotation.x += 0.01