#why load()/loadAsync()/parse() are deleted?

1 messages · Page 1 of 1 (latest)

fervent tusk
fallow drum
#

Hi! These methods have not been deleted.

#

The load and parse methods are empty because “Loader” is a parent class. Subclasses like GLTFLoader or FBXLoader extend the parent class and implement those methods.

fervent tusk
# fallow drum Hi! These methods have not been deleted.

thank u. these methodsmethods haven't actually been deleted, I misunderstood.. But when I used three-0.155.0 and @types/three 0.155.1 in the typescript project. the loadasync/load/parse methods are commented out and cannot be used in type declaration file.

fallow drum
#

I expect @types/three defines those methods for individual loaders then, not the Loader base class. The return types are different for each loader.

agile ibex
#

Under the circumstances, then, what purpose does the Loader superclass serve? (typewise, at least)

fallow drum
#

Keep in mind the three.js authors do not maintain @types/three, it's a separate project.

#

But i think the goal of the @types/three maintainers is simply to have types that match up to the source code. Since loaders extend from this base class, it's there in the types.