Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Prozi/pixi-stats
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.1.1
Choose a base ref
...
head repository: Prozi/pixi-stats
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 7 commits
  • 44 files changed
  • 1 contributor

Commits on Feb 11, 2025

  1. feat: usable without pixi

    Prozi committed Feb 11, 2025
    Copy the full SHA
    a7476f3 View commit details
  2. feat: update package.json

    Prozi authored Feb 11, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    23b6fdf View commit details
  3. Copy the full SHA
    94f7304 View commit details
  4. feat: add badges

    Prozi committed Feb 11, 2025
    Copy the full SHA
    e9eb72b View commit details
  5. feat: better example for css

    Prozi committed Feb 11, 2025
    Copy the full SHA
    3fa272f View commit details
  6. Copy the full SHA
    752e6af View commit details
  7. feat: improve logs

    Prozi committed Feb 11, 2025
    Copy the full SHA
    ebe42ae View commit details
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2009-2021 pixi-stats authors
Copyright (c) 2009-2025 pixi-stats authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
51 changes: 36 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# pixi-stats

[<img src="https://img.shields.io/npm/v/pixi-stats?style=for-the-badge&color=success" alt="npm version" />](https://www.npmjs.com/package/pixi-stats?activeTab=versions)
[<img src="https://img.shields.io/npm/dw/pixi-stats.svg?style=for-the-badge&color=success" alt="npm downloads per week" />](https://www.npmjs.com/package/pixi-stats)

#### JavaScript Performance Monitor

This class provides an info box that will help you monitor your code performance.
This library provides an info box that will help you monitor your code performance.

- **FPS** Frames rendered in the last second. The higher the number the better.
- **MS** Milliseconds needed to render a frame. The lower the number the better.
@@ -18,31 +21,49 @@ This class provides an info box that will help you monitor your code performance
![mb.png](https://raw.githubusercontent.com/mrdoob/stats.js/master/files/mb.png)
![custom.png](https://raw.githubusercontent.com/mrdoob/stats.js/master/files/custom.png)

### Installation
### Live demo

```bash
npm install pixi-stats --save
```
https://prozi.github.io/oneforall/demo/?fps

### Usage
### Usage (pixi.js)

```typescript
```ts
import { Application } from 'pixi.js';
import { Stats } from 'pixi-stats';

const app = new Application();
const stats = new Stats(app.renderer);
const { renderer } = new Application();
const stats = new Stats(renderer);
```

### Usage (three.js)

```ts
import { Renderer } from 'three';
import { Stats } from 'pixi-stats';

const renderer = new Renderer();
const stats = new Stats(renderer);
```

### Installation

```bash
npm install pixi-stats --save
```

### Set CSS

```css
div#stats {
#stats {
position: fixed;
top: 0;
right: 0;
z-index: 500;
width: max(200px, 10vw, 10vh);
height: max(100px, 6vh, 6vw);
opacity: 0.8;
left: 0;
z-index: 1000;
}

#stats canvas {
width: max(100px, 10vw, 10vh);
height: max(60px, 6vh, 6vw);
user-select: none;
}
```
2 changes: 1 addition & 1 deletion dist/hooks/GLHook.d.ts.map

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

22 changes: 10 additions & 12 deletions dist/hooks/GLHook.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/hooks/GLHook.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/hooks/TextureHook.d.ts.map

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

26 changes: 12 additions & 14 deletions dist/hooks/TextureHook.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/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/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './stats-constants';
export * from './stats-panel';
export * from './stats-adapter';
export * from './stats';
export * from './stats-gl';
//# sourceMappingURL=index.d.ts.map
2 changes: 1 addition & 1 deletion dist/index.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/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/index.js.map

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

15 changes: 15 additions & 0 deletions dist/model.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export type Stub = Record<string, any>;
export type Renderer = Stub;
export type Texture = Stub;
export type IStats = Stub;
export interface PIXIGlTexture {
gl: WebGLRenderingContext;
texture: Texture;
}
export type PIXIGlTextureArray = PIXIGlTexture[];
export type PIXIGlTextureRecord = Record<string, PIXIGlTexture>;
export interface PIXIRendererGlTexture {
managedTextures?: PIXIGlTextureArray;
_glTextures?: PIXIGlTextureRecord;
}
//# sourceMappingURL=model.d.ts.map
1 change: 1 addition & 0 deletions dist/model.d.ts.map

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

3 changes: 3 additions & 0 deletions dist/model.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/model.js.map

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

7 changes: 7 additions & 0 deletions dist/pixi-hooks.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import BaseHooks from './hooks/BaseHooks';
import { Renderer } from './model';
export declare class PIXIHooks extends BaseHooks {
get hooked(): boolean;
constructor(renderer: Renderer);
}
//# sourceMappingURL=pixi-hooks.d.ts.map
1 change: 1 addition & 0 deletions dist/pixi-hooks.d.ts.map

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

47 changes: 47 additions & 0 deletions dist/pixi-hooks.js

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

Loading