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

remove animate test

This commit is contained in:
Kevin Levron 2020-09-14 17:07:25 +02:00
parent b7ae3b84d1
commit b177aa4341

View File

@ -1,5 +1,5 @@
<template>
<Renderer ref="renderer" :animate="anim">
<Renderer ref="renderer">
<PerspectiveCamera :position="{ z: 100 }"></PerspectiveCamera>
<PhongMaterial name="mat1" color="#ff0000"></PhongMaterial>
@ -21,8 +21,6 @@ import {
LambertMaterial, PhongMaterial,
} from '../index.js';
import { useAnimate } from '../core/Renderer.vue';
export default {
components: {
Renderer, PerspectiveCamera, Scene,
@ -30,30 +28,5 @@ export default {
Box, Sphere,
LambertMaterial, PhongMaterial,
},
data() {
return {
anim: null,
};
},
mounted() {
console.log('Test mounted');
// useAnimate(() => {
// this.$refs.box.mesh.rotation.x += 0.01;
// });
// useAnimate(this.animate);
},
beforeUnmount() {
console.log('Test beforeUnmount');
},
methods: {
animate() {
this.$refs.box.mesh.rotation.x += 0.01;
// if (this.$refs.box) {
// this.$refs.box.mesh.rotation.x += 0.01;
// this.$refs.box.mesh.rotation.y += 0.013;
// this.$refs.box.mesh.rotation.z += 0.007;
// }
},
},
};
</script>