Skip to content

Commit

Permalink
feat: decode uri query params
Browse files Browse the repository at this point in the history
  • Loading branch information
Prozi committed Sep 26, 2024
1 parent b3f7901 commit ab43577
Show file tree
Hide file tree
Showing 7 changed files with 307 additions and 295 deletions.
1 change: 1 addition & 0 deletions dist/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const sprite_prefab_1 = require('./sprite.prefab');
const takeUntil_1 = require('rxjs/internal/operators/takeUntil');
async function start() {
const queryParams = scene_1.Scene.getQueryParams();
globalThis.queryParams = queryParams;
// create main Scene
const scene = new scene_1.Scene({
visible: true,
Expand Down
4 changes: 2 additions & 2 deletions dist/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Scene extends scene_ssr_1.SceneSSR {
// eslint-disable-next-line
(queryParams, [_wholeMatch, paramName, paramValue]) =>
Object.assign(Object.assign({}, queryParams), {
[paramName]: paramValue
[decodeURIComponent(paramName)]: decodeURIComponent(paramValue)
}),
{}
);
Expand Down Expand Up @@ -194,7 +194,7 @@ class Scene extends scene_ssr_1.SceneSSR {
* add body font family to set font of pixi-stats
*/
showFPS(style = 'position: fixed; top: 0; right: 0; z-index: 1000;') {
const stats = new pixi_stats_1.Stats(document, this.pixi.renderer);
const stats = new pixi_stats_1.Stats(this.pixi.renderer);
const canvas = stats.domElement;
canvas.setAttribute('style', style);
}
Expand Down
Loading

0 comments on commit ab43577

Please sign in to comment.