vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
454 stars 72 forks source link

[HELP] Can not add lights to a scene #161

Closed 11bitbadger closed 1 year ago

11bitbadger commented 1 year ago

A SceneBuilder has a method AddLight, which takes a LightBuilder but I can not create a LightBuilder. I assume if I wanted to add a Directional light I should be using LightBuilder.Directional() but there is no public constructor.

How do I add a new light to a scene?

vpenades commented 1 year ago

You're right; the current API allows importing a lights from an existing glTF but it doesn't allow creating lights from scratch.

I'll add public APIs for it, stay tuned.