Skip to content

Commit

Permalink
clean up image texture cache when destroying app
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslaneconkling committed Oct 21, 2020
1 parent 2b5b7ac commit 68ea6f6
Show file tree
Hide file tree
Showing 28 changed files with 127 additions and 96 deletions.
2 changes: 0 additions & 2 deletions dist/renderers/pixi/ImageLoader.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/renderers/pixi/ImageLoader.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/renderers/pixi/circle.js.map

This file was deleted.

13 changes: 7 additions & 6 deletions dist/renderers/pixi/edge.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/renderers/pixi/edge.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/renderers/pixi/edgeArrow.js.map

This file was deleted.

10 changes: 6 additions & 4 deletions dist/renderers/pixi/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import * as PIXI from 'pixi.js';
import { Node, Edge } from '../../';
import { NodeRenderer } from './node';
import { EdgeRenderer } from './edge';
import { ArrowRenderer } from './edgeArrow';
import { CircleRenderer } from './circle';
import { Drag } from './interaction/drag';
import { Decelerate } from './interaction/decelerate';
import { Zoom } from './interaction/zoom';
import { ArrowSprite } from './sprites/arrowSprite';
import { CircleSprite } from './sprites/circleSprite';
import { ImageSprite } from './sprites/ImageSprite';
export declare type Event = PIXI.InteractionEvent;
export declare type TextIcon = {
type: 'textIcon';
Expand Down Expand Up @@ -118,8 +119,9 @@ export declare class PIXIRenderer<N extends Node, E extends Edge> {
[edgeB: string]: Set<string>;
};
};
arrow: ArrowRenderer<N, E>;
circle: CircleRenderer<N, E>;
arrow: ArrowSprite<N, E>;
circle: CircleSprite<N, E>;
image: ImageSprite;
zoomInteraction: Zoom<N, E>;
dragInteraction: Drag<N, E>;
decelerateInteraction: Decelerate<N, E>;
Expand Down
11 changes: 7 additions & 4 deletions dist/renderers/pixi/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/renderers/pixi/index.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions dist/renderers/pixi/node.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/renderers/pixi/node.js.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions dist/renderers/pixi/sprites/ImageSprite.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as PIXI from 'pixi.js';
export declare class ImageSprite {
cache: {
[url: string]: PIXI.Texture;
};
createSprite(url: string): PIXI.Sprite;
delete(): void;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/renderers/pixi/sprites/ImageSprite.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as PIXI from 'pixi.js';
import { PIXIRenderer as Renderer } from './';
import { Node, Edge } from '../../';
export declare class ArrowRenderer<N extends Node, E extends Edge> {
import { PIXIRenderer as Renderer } from '../';
import { Node, Edge } from '../../../';
export declare class ArrowSprite<N extends Node, E extends Edge> {
static ARROW_HEIGHT: number;
static ARROW_WIDTH: number;
texture: PIXI.RenderTexture;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/renderers/pixi/sprites/arrowSprite.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as PIXI from 'pixi.js';
import { PIXIRenderer as Renderer } from '.';
import { Node, Edge } from '../../';
export declare class CircleRenderer<N extends Node, E extends Edge> {
import { PIXIRenderer as Renderer } from '../';
import { Node, Edge } from '../../../';
export declare class CircleSprite<N extends Node, E extends Edge> {
texture: PIXI.RenderTexture;
constructor(renderer: Renderer<N, E>);
create(): PIXI.Sprite;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/renderers/pixi/sprites/circleSprite.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/pixi-icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const force = Force.Layout()
const subGraph = SubGraph.Layout()
const renderer = Renderer({
container,
// debug: { stats, logPerformance: true }
debug: { stats, logPerformance: true }
})


Expand Down
11 changes: 0 additions & 11 deletions src/renderers/pixi/ImageLoader.ts

This file was deleted.

Loading

0 comments on commit 68ea6f6

Please sign in to comment.