vue-threejs-fiber
v0.0.6
Published
## Install
Downloads
9
Readme
vue-threejs-fiber
Install
yarn add vue-threejs-fiber
Usage
<script setup>
import { ref } from "vue"
import { Canvas, useFrame } from "vue-threejs-fiber"
const mesh = ref()
useFrame(() => {
if (mesh.value && mesh.value.rotation) {
mesh.value.rotation.x += 0.01
mesh.value.rotation.y += 0.01
}
});
</script>
<template>
<Canvas>
<ambientLight :intensity="1" />
<pointLight :position="[10, 10, 11]" />
<mesh ref="mesh">
<boxGeometry />
<meshStandardMaterial color="blue" />
</mesh>
</Canvas>
</template>