未验证 提交 27f663e0 编写于 作者: J Jeffrey Lanters 提交者: GitHub

Made the onLoad param a callback generic

Turned the onLoad parameter of the ObjectLoader.load function a generic type of Object3D so users can define which kind of object they are loaded so it stays typed.
上级 53025930
......@@ -13,7 +13,7 @@ export class ObjectLoader {
load(
url: string,
onLoad?: (object: Object3D) => void,
onLoad?: <ObjectType extends Object3D>(object: ObjectType) => void,
onProgress?: (event: ProgressEvent) => void,
onError?: (event: Error | ErrorEvent) => void
): void;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册