mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
remove animate test
This commit is contained in:
parent
b7ae3b84d1
commit
b177aa4341
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Renderer ref="renderer" :animate="anim">
|
<Renderer ref="renderer">
|
||||||
<PerspectiveCamera :position="{ z: 100 }"></PerspectiveCamera>
|
<PerspectiveCamera :position="{ z: 100 }"></PerspectiveCamera>
|
||||||
|
|
||||||
<PhongMaterial name="mat1" color="#ff0000"></PhongMaterial>
|
<PhongMaterial name="mat1" color="#ff0000"></PhongMaterial>
|
||||||
@ -21,8 +21,6 @@ import {
|
|||||||
LambertMaterial, PhongMaterial,
|
LambertMaterial, PhongMaterial,
|
||||||
} from '../index.js';
|
} from '../index.js';
|
||||||
|
|
||||||
import { useAnimate } from '../core/Renderer.vue';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Renderer, PerspectiveCamera, Scene,
|
Renderer, PerspectiveCamera, Scene,
|
||||||
@ -30,30 +28,5 @@ export default {
|
|||||||
Box, Sphere,
|
Box, Sphere,
|
||||||
LambertMaterial, PhongMaterial,
|
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>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user