1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00
This commit is contained in:
Kevin Levron 2021-05-06 21:27:37 +02:00
parent 0c7627abb5
commit 7ebec83808

View File

@ -1,12 +1,12 @@
import { defineComponent, PropType } from 'vue' import { defineComponent, PropType } from 'vue'
import { DirectionalLight } from 'three' import { DirectionalLight } from 'three'
import { Vector2PropInterface } from '../core/Object3D' import { Vector3PropInterface } from '../core/Object3D'
import Light from './Light' import Light from './Light'
export default defineComponent({ export default defineComponent({
extends: Light, extends: Light,
props: { props: {
target: { type: Object as PropType<Vector2PropInterface>, default: () => ({ x: 0, y: 0, z: 0 }) }, target: { type: Object as PropType<Vector3PropInterface>, default: () => ({ x: 0, y: 0, z: 0 }) },
}, },
created() { created() {
this.initLight(new DirectionalLight(this.color, this.intensity)) this.initLight(new DirectionalLight(this.color, this.intensity))