Issue with DirLight


#1

Hi there!

I am experimenting with heaps and I am trying to run the examples here: https://github.com/Beeblerox/Simplest-Heaps-Examples

Everything runs fine but the samples using DirLight. For example, the line:

var light = new h3d.scene.DirLight(new h3d.Vector( 0.3, -0.4, -0.9), s3d);

fails with

Type not found: h3d.scene.DirLight

I don’t understand why…

Any help?

Ciao, Rocco.


#2

Hey,

I believe in a recent change in Heaps, rendering Classes have been split into two types: “fwd” (forward rendering) and “pbr” (physically based rendering) and the old Classes like DirLight have been put into the respective pbr/fwd subfolder.
I think “fwd” is the equivalent to the old default rendering. So instead of h3d.scene.DirLight it should now be:

var light = h3d.scene.fwd.DirLight(...

(note the added “.fwd” in there)

The examples haven’t been updated yet, that’s why they still point to the wrong folder.

Hope this helps :^) I ran into the same problem recently.


#3

Yes! Thanks! Now it works!

I was looking at the documentation here: https://heaps.io/documentation/lights.html but now I see that it is does not cover the latest heaps version. Do you know where can I find an updated documentation?

Thanks so much!

Ciao, Rocco.