Skip to content

Commit

Permalink
add culling for not visible objects
Browse files Browse the repository at this point in the history
  • Loading branch information
brauliorivas committed Jul 23, 2024
1 parent 8c11d91 commit 08d65c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions js/draw/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ const createApp = async () => {
};

export const createContainer = (app) => {
const container = new Container({
isRenderGroup: true,
});
const container = new Container();
pixi.container = container;

const culler = new Culler();
Expand Down
1 change: 1 addition & 0 deletions js/draw/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function bezierCurve({
curve.moveTo(fromX, fromY);
curve.bezierCurveTo(cpFromX, cpFromY, cpToX, cpToY, toX, toY);
curve.stroke({ width: 2, color });
curve.cullable = true;
return curve;
}

Expand Down
2 changes: 1 addition & 1 deletion js/types/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class EDMObject {
box.interactiveChildren = false;
addBox(box);
box.position.set(this.x, this.y);
box.cullable = true;
const nextY = addTitleToBox(this.constructor.name, box);

box.cursor = "pointer";
box.eventMode = "static";

box.on("pointerdown", dragStart, box);

addHoverModal(box, this.objectModalLines());
Expand Down

0 comments on commit 08d65c4

Please sign in to comment.