Cube.vue 529 B

123456789101112131415161718192021222324
  1. <template>
  2. <mesh name="Cube" :position="position">
  3. <geometry type="Box" :args="[size.x, size.y, size.z]" />
  4. <material type="MeshBasic" :color="color" :options="opts" />
  5. </mesh>
  6. </template>
  7. <script>
  8. import * as THREE from 'three'
  9. export default {
  10. name: 'Cube',
  11. // mixins: [Object3D],
  12. props: { size: Object, texture: String, position: Object, color: Number },
  13. data: () => ({
  14. opts: {
  15. side: THREE.DoubleSide,
  16. wireframe: false,
  17. transparent: false,
  18. opacity: 0.6
  19. }
  20. })
  21. }
  22. </script>