12345678910111213141516171819202122232425262728293031323334353637383940 |
- <template>
- <mesh
- name="Plane"
- :position="position"
- :rotation="{
- x:deg2rad(rotation.x),
- y:deg2rad(rotation.y),
- z:deg2rad(rotation.z)
- }"
- >
- <geometry type="PlaneBuffer" :args="[size.w, size.h]" />
- <material type="MeshBasic" :color="color" :options="opts" />
- </mesh>
- </template>
- <script>
- import mixins from 'components/mixins'
- import * as THREE from 'three'
- export default {
- name: 'Plan',
- mixins: [mixins],
- props: {
- size: Object,
- texture: String,
- position: Object,
- color: Number,
- rotation: Object
- },
- data: () => ({
- opts: {
- side: THREE.DoubleSide,
- wireframe: false,
- transparent: true,
- opacity: 0.1,
- renderOrder: 1
- }
- })
- }
- </script>
|