getting data from api, displaying projects as cubes

This commit is contained in:
2020-08-24 12:53:09 +02:00
parent 88a9a31768
commit 68529ed503
10 changed files with 233 additions and 20 deletions
+13 -4
View File
@@ -1,15 +1,24 @@
<template>
<mesh name="Cube" :position="position">
<geometry type="Box" :args="[size, size, size]" />
<material type="MeshBasic" :color="color" />
<geometry type="Box" :args="[size.x, size.y, size.z]" />
<material type="MeshBasic" :color="color" :options="opts" />
</mesh>
</template>
<script>
// import { Object3D } from '@'
import * as THREE from 'three'
export default {
name: 'Cube',
// mixins: [Object3D],
props: { size: Number, texture: String, position: Object, color: Number }
props: { size: Object, texture: String, position: Object, color: Number },
data: () => ({
opts: {
side: THREE.DoubleSide,
wireframe: false,
transparent: false,
opacity: 0.6
}
})
}
</script>