mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
wip: lights
This commit is contained in:
parent
da2a4607c3
commit
6b3443d761
@ -18,7 +18,7 @@ export default defineComponent({
|
|||||||
const watchProps = ['width', 'height']
|
const watchProps = ['width', 'height']
|
||||||
watchProps.forEach(p => {
|
watchProps.forEach(p => {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
watch(() => this[p], () => { light[p] = this[p] })
|
watch(() => this[p], (value) => { light[p] = value })
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.helper) {
|
if (this.helper) {
|
||||||
|
@ -17,7 +17,7 @@ export default defineComponent({
|
|||||||
const watchProps = ['angle', 'decay', 'distance', 'penumbra']
|
const watchProps = ['angle', 'decay', 'distance', 'penumbra']
|
||||||
watchProps.forEach(p => {
|
watchProps.forEach(p => {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
watch(() => this[p], () => { light[p] = this[p] })
|
watch(() => this[p], (value) => { light[p] = value })
|
||||||
})
|
})
|
||||||
|
|
||||||
this.initLight(light)
|
this.initLight(light)
|
||||||
|
Loading…
Reference in New Issue
Block a user