Skip to content

Commit

Permalink
fix display stuck bug on scene changing (cocos#5260)
Browse files Browse the repository at this point in the history
* add transformAffine()

* remove duplicate code

* fix display stuck bug on scene chaning
  • Loading branch information
jerrywwl authored Aug 27, 2019
1 parent 74ca58d commit 8d39b4b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions cocos/3d/framework/camera-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ export class CameraComponent extends Component {
name: this.node.name,
node: this.node,
projection: this._projection,
window: cc.director.root.tempWindow,
priority: this._priority,
});

Expand Down
1 change: 1 addition & 0 deletions cocos/3d/framework/editor-camera-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export class EditorCameraComponent extends CameraComponent {
name: 'Editor UICamera',
node: this._camera.node,
projection: this._projection,
window: cc.director.root.mainWindow,
priority: this._priority,
isUI: true,
flows: ['UIFlow'],
Expand Down
17 changes: 17 additions & 0 deletions cocos/core/root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,26 @@ export class Root {
* @zh
* 当前窗口
*/
public set curWindow (window: GFXWindow | null) {
this._curWindow = window;
}

public get curWindow (): GFXWindow | null {
return this._curWindow;
}

/**
* @zh
* 临时窗口(用于数据传输)
*/
public set tempWindow (window: GFXWindow | null) {
this._tempWindow = window;
}

public get tempWindow (): GFXWindow | null {
return this._tempWindow;
}

/**
* @zh
* 窗口列表
Expand Down Expand Up @@ -156,6 +172,7 @@ export class Root {
private _windows: GFXWindow[] = [];
private _mainWindow: GFXWindow | null = null;
private _curWindow: GFXWindow | null = null;
private _tempWindow: GFXWindow | null = null;
private _pipeline: RenderPipeline | null = null;
private _ui: UI | null = null;
private _scenes: RenderScene[] = [];
Expand Down

0 comments on commit 8d39b4b

Please sign in to comment.