Default PointLight for Scene

Kevin Rushforth kevin.rushforth at oracle.com
Tue May 23 19:50:04 UTC 2017


It might be convenient to have a boolean on the scene to indicate 
whether it should be retained, but we don't plan any improvements to 3D 
in JDK 10 (which would be the absolute earliest such a change could 
happen). It seems it would be just as easy for an application to add a 
white point light at the camera, and that wouldn't have to wait until 
new API was added.

-- Kevin


Nir Lisker wrote:
> Yes, I was referring to that line in the docs.
>
> Wouldn't it be better to allow users to retain the default light?
>
> On Tue, May 23, 2017 at 10:05 PM, Chien Yang <chien.yang at oracle.com> wrote:
>
>   
>> No, this light is created internally within JavaFX as a convenient light
>> source if the scene doesn't have one. User can't access to it reference.
>>
>> You can find this information in the Scene class documentation:
>>
>> Class Scene
>>
>> ...
>>
>> A default headlight will be added to a scene that contains one or more
>> Shape3D nodes, but no light nodes. This light source is a Color.WHITE
>> PointLight placed at the camera position.
>>
>>
>> - Chien
>>
>>
>>
>>
>> On 05/23/2017 09:11 AM, Nir Lisker wrote:
>>
>>     
>>> A Scene supplies a default PointLight if it contains a 3D object. However,
>>> adding a Light to any group in the scene removes the default light. Is it
>>> possible to retain the light, or get a reference to it from the scene?
>>>
>>>       
>>     


More information about the openjfx-dev mailing list