vue-threejs
vue-threejs copied to clipboard
Working with lights
Hi. Thank you for this awesome library. I have a question. How can I add additional lights? I want to implement three.js example
p.s. can i somehow get current scene?
@alphaCastor
How can I add additional lights?
You can pass :obj prop into components to override like
<light :obj="myLight1"></light>
<light :obj="myLight2"></light>
<light :obj="myLight3"></light>
can i somehow get current scene?
Also, :obj.sync, @update:obj would provide a way to get the obj, like
https://github.com/fritx/vue-threejs/blob/4a44809b006b4f2a2d228019f6264c9324461068/examples/Ocean.vue#L3
<scene :obj.sync="sceneObj"></scene><!-- watch: sceneObj -->
<scene @update:obj="handleSceneObj"></scene>
Cheers! 🍻