Skip to content

Add callbacks for JSONLoader.parse #10286

@zillemarco

Description

@zillemarco

I'm working on a project where I need to use JSONLoader.parse since the service I'm interfacing to sends me a JSON that contains the objects of the scene as well as other informations that ThreeJS doesn't need.

The problem is that since I'm not running an animation loop to update the scene (through requestAnimationFrame) the objects that are added to the scene that have a texture connected Always result black (until I force a redraw).

What I'd like is to add an additional parameter to the JSONLoader.parse method in order to add a callback for when a texture has been loaded. This obviously means that Loader.initMaterials has to be changed as well.

I'm planning to make the change by myself and then pull a request as soon as I have it working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions