Closed AllenWilliamson closed 5 years ago
@AllenWilliamson thanks for the note. can you make a test case illustrating what you're seeing?
http://jsfiddle.net/allenw/cwtea0v5/40/
I'm not able to recreate the blank render from my project, but shadows don't seem to be working well either way in the fiddle.
In my project where where the blank render occurs, I can see the first frame render with shadows but then quickly disappears to just show the map.
It would be great to get some official examples of using shadows in threebox.
after a bunch of debugging, realized that you needed to add sunlight via threebox.addAtCoordinate
, rather than threebox.world.add
: https://jsfiddle.net/np5tqa06/ I'm using THREE.SpotLight here, but DirectionalLight
should work with a bit more finessing.
Please do cut a ticket if you keep seeing the blank render and are able to reproduce -- it likely is related to the map not repainting after the three.js scene updating.
@peterqliu Do you have a working demo of a shadow using threebox? The fiddle linked to above produces this for me:
(Context: this question)
I'm also seeing the same results at @danvk when loading the fiddle. I'm currently trying to get shadows working but so far haven't had much luck.
@robhawkes @danvk Just FYI, I think I have resolved this quite old request in my Threebox fork creating a realistic sun light mode for a given date, time and lnglat combination. I'm about to update the fork with these samples... Static Dynamic
I'm trying to get shadows working using the latest threebox (with mapbox custom layers). When setting
castShadow
on aDirectionalLight
, threebox does not render anything.Is this a limitation of threebox or has anyone had any luck getting them to work?