getting data from api, displaying projects as cubes
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user