fix default material fallback

This commit is contained in:
Yun Hsiao Wu
2019-01-25 16:44:54 +08:00
parent 393dfa91f6
commit 1064544829
+2 -2
View File
@@ -233,10 +233,10 @@ export class ModelComponent extends RenderableComponent {
if (this._model == null) {
return;
}
this._onRebuildPSO(idx, material);
this._onRebuildPSO(idx, material || this._getBuiltinMaterial());
}
protected _onRebuildPSO (idx, material) {
protected _onRebuildPSO (idx: number, material: Material) {
if (this._model) {
this._model.setSubModelMaterial(idx, material);
}