adizanni / floor3d-card

Your Home Digital Twin: aka floor3d-card. Visualize Home Assistant state and perform actions using objects in a 3D home model based on Three.js.
https://github.com/adizanni/floor3d-card
MIT License
448 stars 65 forks source link

Walls gets black when I turn on a light #149

Closed lexcao1729 closed 1 year ago

lexcao1729 commented 1 year ago

Everything gets black when turn on a light. Is this because there are too much entities of light? There are 25 entities. Most of them is like this: - entity: light.tz3210_s1x7gcq0_ts0502b_light_4 type3d: light object_id: Ceiling_lampcorridor2_2 light: lumens: ‘300' shadow: 'no' distance: ‘300' decay: '2'

截屏2023-02-19 20 29 26

Light on.

截屏2023-02-19 20 29 46

Light off.

adizanni commented 1 year ago

Black walls are a sign of the WebGL lacking memory resource to complete the rendering. There is a limitation of the number of lights only if you are using the shadow :"yes" globally and for each of the lights. It does not seem to be the case for you (shadow: "no" at least for the light in the example). Try to remove some of the light entities and check at which point it starts popping black walls. Also please open the web developer console on the browser and tell me if you see any error message.

lexcao1729 commented 1 year ago

Remove light entities doesn't help. But I change the lumens and distance of lights to same value, and the problem is solved. It seem there shouldn't be too much different values in lumens and distance.