-
-
Notifications
You must be signed in to change notification settings - Fork 30
Adapt Stats to use engine RenderingStatistics and remove inaccurate hooks #345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8e290a4
b792255
b4fea4a
275bb2d
a389f4d
e38902b
15cb661
958d788
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,7 +75,7 @@ | |
| }, | ||
| "pnpm": { | ||
| "overrides": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "dependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,6 @@ | |
| "types/**/*" | ||
| ], | ||
| "peerDependencies": { | ||
| "@galacean/engine": ">=1.6.0-0" | ||
| "@galacean/engine": ">=2.0.0-0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,22 +1,23 @@ | ||||||||||||||||||||||||||||
| import { Engine } from "@galacean/engine"; | ||||||||||||||||||||||||||||
| import { Core } from "./Core"; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| let tpl = ` | ||||||||||||||||||||||||||||
| <dl> | ||||||||||||||||||||||||||||
| <dt>FPS</dt> | ||||||||||||||||||||||||||||
| <dd>0</dd> | ||||||||||||||||||||||||||||
| <dt>Memory <span class="unit">(MB)</span></dt> | ||||||||||||||||||||||||||||
| <dt>JS Memory <span class="unit">(MB)</span></dt> | ||||||||||||||||||||||||||||
| <dd>0</dd> | ||||||||||||||||||||||||||||
| <dt>DrawCall</dt> | ||||||||||||||||||||||||||||
| <dt>Total Graphics Memory <span class="unit">(MB)</span></dt> | ||||||||||||||||||||||||||||
| <dd>0</dd> | ||||||||||||||||||||||||||||
| <dt>Triangles</dt> | ||||||||||||||||||||||||||||
| <dt>Texture Memory <span class="unit">(MB)</span></dt> | ||||||||||||||||||||||||||||
| <dd>0</dd> | ||||||||||||||||||||||||||||
| <dt>Textures</dt> | ||||||||||||||||||||||||||||
| <dt>Buffer Memory <span class="unit">(MB)</span></dt> | ||||||||||||||||||||||||||||
| <dd>0</dd> | ||||||||||||||||||||||||||||
| <dt>Shaders</dt> | ||||||||||||||||||||||||||||
| <dt>DrawCall</dt> | ||||||||||||||||||||||||||||
| <dd>0</dd> | ||||||||||||||||||||||||||||
| <dt>Network Size <span class="unit">(MB)</span></dt> | ||||||||||||||||||||||||||||
| <dt>Triangles</dt> | ||||||||||||||||||||||||||||
| <dd>0</dd> | ||||||||||||||||||||||||||||
| <dt>WebGL</dt> | ||||||||||||||||||||||||||||
| <dt>WebGL</dt> | ||||||||||||||||||||||||||||
| <dd></dd> | ||||||||||||||||||||||||||||
| </dl> | ||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||
|
|
@@ -53,6 +54,7 @@ let css = ` | |||||||||||||||||||||||||||
| font-size: ${20 / 7.5}vh; | ||||||||||||||||||||||||||||
| padding: ${10 / 7.5}vh 0 ${10 / 7.5}vh; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| export default class Monitor { | ||||||||||||||||||||||||||||
|
|
@@ -61,10 +63,10 @@ export default class Monitor { | |||||||||||||||||||||||||||
| private container: HTMLElement; | ||||||||||||||||||||||||||||
| private readonly items: string[]; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| constructor(gl: WebGLRenderingContext | WebGL2RenderingContext) { | ||||||||||||||||||||||||||||
| this.core = new Core(gl); | ||||||||||||||||||||||||||||
| constructor(engine: Engine) { | ||||||||||||||||||||||||||||
| this.core = new Core(engine); | ||||||||||||||||||||||||||||
| this.items = []; | ||||||||||||||||||||||||||||
| this.items = ["fps", "memory", "drawCall", "triangles", "textures", "shaders", "size", "webglContext"]; | ||||||||||||||||||||||||||||
| this.items = ["fps", "memory", "totalGraphicsMemory", "textureMemory", "bufferMemory", "drawCall", "triangles", "webglContext"]; | ||||||||||||||||||||||||||||
|
Comment on lines
68
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix prettier failure in Line 69 is flagged by 💡 Proposed fix- this.items = [];
- this.items = ["fps", "memory", "totalGraphicsMemory", "textureMemory", "bufferMemory", "drawCall", "triangles", "webglContext"];
+ this.items = [
+ "fps",
+ "memory",
+ "totalGraphicsMemory",
+ "textureMemory",
+ "bufferMemory",
+ "drawCall",
+ "triangles",
+ "webglContext"
+ ];📝 Committable suggestion
Suggested change
🧰 Tools🪛 ESLint[error] 69-69: Replace (prettier/prettier) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| this.createContainer(); | ||||||||||||||||||||||||||||
| this.update = this.update.bind(this); | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.