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

Card fails to display simple floorplan model #183

Open nmehlei opened 2 months ago

nmehlei commented 2 months ago

Checklist:

Release with the issue: v.1.5.3

Browser and Operating System:

Mac OS X Sonoma 14.5 with Chrome v 125.0 as well as Fire HD 10 (2021)

Description of problem:

I've created a basic 3D floorplan with Sweet Home 3D (single room) and tried to show it with the floor3d-card. The default model is shown correctly (screenshot on the right), but my own is failing to be displayed, with a non-helpful error message in the JS console (see attached screenshot). As it looks like, it fails to load the model for some reason.

I tried exporting both with the native obj exporter from Sweet Home 3D as well as the ExportToHASS plugin, exact same behavior.

Screenshot 2024-06-11 at 00 01 53 Screenshot 2024-06-11 at 00 02 17

I've attached the model that I used below.

Additional information: example_model.zip

adizanni commented 2 months ago

Hello @nmehlei, there is a common problem appearing since I have introduced the sample model. When you add the card from the card library, the card is created with some entities based on the sample model. If you change the model pointing to your obj file you have to remove all references (entities and object groups) to the sample model, otherwise you will have a reference error that is not well managed by the card code.