Closed 190n closed 10 years ago
Hi @fogcityben,
Vizi.SpotLight
seems to be a wrapper for THREE.SpotLight
. From what I can see the object param is for the use case where you have already built a THREE.SpotLight
: https://github.com/tparisi/Vizi/blob/master/engine/src/lights/spotLight.js#L14-L19
Something like the following:
var parent = new Vizi.Object();
var spotLight = new THREE.SpotLight( 0xffffff );
var light = new Vizi.SpotLight({ object: spotLight });
parent.addComponent(light);
In this case calling position
on the object you pass in (or the object Vizi creates for you) is correct.
Thanks a lot, @Tobscher! I'm closing the issue now.
When I try to use a
Vizi.SpotLight
and pass in theobject
parameter, it seems to be looking for the object's position on the object itself, not itstransform
property.I'm using this code:
I get this error (in the Safari debugger):
Shouldn't it look for
position
on the object'stransform
property?