Skip to content

Commit

Permalink
skipping invisible objects
Browse files Browse the repository at this point in the history
  • Loading branch information
kleber-swf committed Sep 1, 2021
1 parent ae808db commit f084281
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions TODO.todo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ BASIC:
Selection:
[x] natural parent selection
[x] global scale
[ ] skip invisible objects
[x] skip invisible objects

Translation:
[x] translation
Expand Down Expand Up @@ -46,7 +46,6 @@ BASIC:

General Features:
[x] editor layout
[ ] hide panels
[ ] undo / redo
[ ] hide gizmos
[ ] toggle enabled
Expand Down Expand Up @@ -103,6 +102,7 @@ ADVANCED:
[ ] help: keyboard shorcuts
[ ] toolbar: tool selector
[ ] status bar
[ ] hide panels

Plugins Support:
[ ] add plugin
Expand Down
2 changes: 1 addition & 1 deletion src/scene/scene-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class SceneEditor extends Phaser.Group {
private getObjectsUnderPoint(x: number, y: number, children: PIXI.DisplayObject[], objects: PIXI.DisplayObject[]) {
for (let i = children.length - 1; i >= 0; i--) {
const child = children[i];
if (child.__skip || !('getBounds' in child)) continue;
if (!child.visible || child.__skip || !('getBounds' in child)) continue;
const bounds: PIXI.Rectangle = child.getBounds();
if ('children' in child) this.getObjectsUnderPoint(x, y, child.children, objects);
if (bounds.contains(x, y)) objects.push(child);
Expand Down

0 comments on commit f084281

Please sign in to comment.