Skip to content

Commit

Permalink
feat: 3.0 - zero dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Prozi committed Sep 26, 2024
1 parent d374c09 commit 693c798
Show file tree
Hide file tree
Showing 29 changed files with 580 additions and 165 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { Application } from 'pixi.js';
import { Stats } from 'pixi-stats';

const app = new Application();
const stats = new Stats(document, app.renderer);
const stats = new Stats(app.renderer);
```

```css
Expand Down
18 changes: 18 additions & 0 deletions dist/hooks/BaseHooks.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import GLHook from './GLHook';
import TextureHook from './TextureHook';
export default class BaseHooks {
protected _drawCalls: number;
protected _maxDeltaDrawCalls: number;
protected glhook?: GLHook;
protected texturehook?: TextureHook;
constructor();
attach(gl: any): void;
get drawCalls(): number;
get maxDeltaDrawCalls(): number;
get deltaDrawCalls(): number;
get maxTextureCount(): number;
get texturesCount(): number;
reset(): void;
release(): void;
}
//# sourceMappingURL=BaseHooks.d.ts.map
1 change: 1 addition & 0 deletions dist/hooks/BaseHooks.d.ts.map

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

63 changes: 63 additions & 0 deletions dist/hooks/BaseHooks.js

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

1 change: 1 addition & 0 deletions dist/hooks/BaseHooks.js.map

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

11 changes: 11 additions & 0 deletions dist/hooks/GLHook.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default class GLHook {
drawPasses: number;
isInit: boolean;
private realGLDrawElements;
private gl;
constructor(_gl?: any);
private fakeGLdrawElements;
reset(): void;
release(): void;
}
//# sourceMappingURL=GLHook.d.ts.map
1 change: 1 addition & 0 deletions dist/hooks/GLHook.d.ts.map

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

38 changes: 38 additions & 0 deletions dist/hooks/GLHook.js

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

1 change: 1 addition & 0 deletions dist/hooks/GLHook.js.map

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

16 changes: 16 additions & 0 deletions dist/hooks/TextureHook.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default class TextureHook {
createdTextures: Array<any>;
maxTexturesCount: number;
isInit: boolean;
private realGLCreateTexture;
private realGLDeleteTexture;
private gl;
constructor(_gl?: any);
get currentTextureCount(): number;
registerTexture(texture: any): void;
private fakeGLCreateTexture;
private fakeGLDeleteTexture;
reset(): void;
release(): void;
}
//# sourceMappingURL=TextureHook.d.ts.map
1 change: 1 addition & 0 deletions dist/hooks/TextureHook.d.ts.map

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

59 changes: 59 additions & 0 deletions dist/hooks/TextureHook.js

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

1 change: 1 addition & 0 deletions dist/hooks/TextureHook.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 dist/stats-gl.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Texture, WebGLRenderer } from 'pixi.js';
import BaseHooks from '@pietal.dev/gstats/dist/BaseHooks';
import BaseHooks from './hooks/BaseHooks';
import { Panel } from './stats-panel';
import { Stats } from './stats';
export type PIXIGlTextureSystem = {
Expand Down
2 changes: 1 addition & 1 deletion dist/stats-gl.d.ts.map

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

2 changes: 1 addition & 1 deletion dist/stats-gl.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/stats-gl.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 dist/stats.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export declare class Stats {
fpsPanel: Panel;
msPanel: Panel;
memPanel?: Panel;
constructor(document: Document, renderer: WebGLRenderer);
constructor(renderer: WebGLRenderer, containerElement?: HTMLElement);
addPanel(panel: Panel): Panel;
showPanel(id: number): void;
begin(): void;
Expand Down
Loading

0 comments on commit 693c798

Please sign in to comment.