Skip to content

Editor: Fix ListboxItem text content.#33648

Open
Mugen87 wants to merge 1 commit into
mrdoob:devfrom
Mugen87:dev2
Open

Editor: Fix ListboxItem text content.#33648
Mugen87 wants to merge 1 commit into
mrdoob:devfrom
Mugen87:dev2

Conversation

@Mugen87
Copy link
Copy Markdown
Collaborator

@Mugen87 Mugen87 commented May 25, 2026

Related issue: #32729

Description

The resource panel in the editor does not properly list textures because the listbox shows the type property of its items which has a different semantics in three.js classes though. Object3D, BufferGeometry or Material hold the object type but Texture.type describes the texture's data type so it holds values like THREE.UnsignedByteType. Hence, the texture panel lists now meaningless numbers:

image

With this PR, UIListbox uses item.constructor.name which works for all objects.

FYI: Using item.constructor.name would break if the editor uses the minified builds or is bundled but I'm not aware of another solution at the moment.

Alternatively, we just remove the texture resource tab. You can't assign textures anyway so it's a plain list at the moment with no further functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant