fixing missing values causes the playground to run out (#3338)

This commit is contained in:
JoneLau
2018-09-28 18:04:09 +08:00
committed by pandamicro
parent 20de39f85b
commit 7b5065b2f2
+5
View File
@@ -170,6 +170,11 @@ export default class ModelComponent extends RenderSystemActor {
static ShadowCastingMode = ModelShadowCastingMode;
constructor() {
super();
this._models = [];
}
onEnable() {
for (let i = 0; i < this._models.length; ++i) {
this.scene.addModel(this._models[i]);