Skip to content

Commit

Permalink
Merge pull request #938 from VisActor/fix/3d-bounds
Browse files Browse the repository at this point in the history
fix: fix issue with 3d draw dirtybounds
  • Loading branch information
neuqzxy authored Jan 24, 2024
2 parents b802c35 + 95ba7a8 commit a6eda54
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-core",
"comment": "fix: fix issue with 3d draw dirtybounds",
"type": "none"
}
],
"packageName": "@visactor/vrender-core"
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ export class DefaultDrawContribution implements IDrawContribution {

// 如果存在3d视角,那么不使用dirtyBounds
if (stage.camera) {
this.dirtyBounds.clear();
this.backupDirtyBounds.clear();
this.dirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);
this.backupDirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);
}

this.clearScreen(renderService, context, drawContext);
Expand Down Expand Up @@ -276,8 +276,8 @@ export class DefaultDrawContribution implements IDrawContribution {
// 渲染
const incrementalContext = incrementalLayer.layer.getNativeHandler().getContext();
const idc = incrementalLayer.drawContribution || container.get(IncrementalDrawContribution);
idc.dirtyBounds.clear();
idc.backupDirtyBounds.clear();
idc.dirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);
idc.backupDirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);
(idc as any).draw(this.currentRenderService, {
...drawContext,
drawContribution: idc,
Expand Down

0 comments on commit a6eda54

Please sign in to comment.