This commit is contained in:
jerrywwl
2019-04-08 16:17:42 +08:00
3 changed files with 9 additions and 1 deletions
@@ -53,6 +53,13 @@ export class DirectionalLightComponent extends LightComponent {
if (this._light) { this._light.illuminance = this._illuminance; }
}
public onLoad () {
if (!this._enabled) {
if (!this.node.scene) { return; }
this._getRenderScene().mainLight.enabled = false;
}
}
protected _createLight (scene?: RenderScene) {
if (!this.node.scene) { return; }
if (!scene) { scene = this._getRenderScene(); }
+1 -1
View File
@@ -176,7 +176,7 @@ export class Root {
}
for (const view of this._views) {
if (view.isEnable && view.window === this._mainWindow) {
if (view.isEnable && view.window === this._curWindow) {
this._pipeline!.render(view);
}
}
+1
View File
@@ -240,6 +240,7 @@ export class Camera {
set enabled (val) {
this._enabled = val;
this._view.enable(val);
}
get enabled () {