Skip to content

Commit 24407d2

Browse files
authored
Enable MiniStats in examples (#115)
* [FIX] Apply a constant screen size for hotspots * Remove comment * Enable MiniStats on a query parameter
1 parent dd92f6c commit 24407d2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/js/example-ui.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
import { Color, Quat, Vec3 } from 'playcanvas';
1+
import { Color, MiniStats, Quat, Vec3 } from 'playcanvas';
22

33
document.addEventListener('DOMContentLoaded', async () => {
44
const appElement = await document.querySelector('pc-app').ready();
55
const app = appElement.app;
66

7+
// Add MiniStats if query parameter is present
8+
if (new URLSearchParams(window.location.search).has('ministats')) {
9+
/* eslint-disable-next-line no-unused-vars */
10+
const stats = new MiniStats(app);
11+
}
12+
713
// Create container for buttons
814
const container = document.createElement('div');
915
Object.assign(container.style, {

0 commit comments

Comments
 (0)