Skip to content

Commit

Permalink
feat: add textureProcessingLimit parameter to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterlucas committed Dec 18, 2024
1 parent e0cd04c commit 4af99df
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ const defaultPhysicalPixelRatio = 1;
const resolution = Number(urlParams.get('resolution')) || 720;
const enableInspector = urlParams.get('inspector') === 'true';
const forceWebGL2 = urlParams.get('webgl2') === 'true';
const textureProcessingLimit =
Number(urlParams.get('textureProcessingLimit')) || 0;

const physicalPixelRatio =
Number(urlParams.get('ppr')) || defaultPhysicalPixelRatio;
Expand All @@ -114,6 +116,7 @@ const defaultPhysicalPixelRatio = 1;
perfMultiplier,
enableInspector,
forceWebGL2,
textureProcessingLimit,
);
return;
}
Expand All @@ -136,6 +139,7 @@ async function runTest(
perfMultiplier: number,
enableInspector: boolean,
forceWebGL2: boolean,
textureProcessingLimit: number,
) {
const testModule = testModules[getTestPath(test)];
if (!testModule) {
Expand All @@ -157,6 +161,7 @@ async function runTest(
physicalPixelRatio,
enableInspector,
forceWebGL2,
textureProcessingLimit,
customSettings,
);

Expand Down Expand Up @@ -231,6 +236,7 @@ async function initRenderer(
physicalPixelRatio: number,
enableInspector: boolean,
forceWebGL2?: boolean,
textureProcessingLimit?: number,
customSettings?: Partial<RendererMainSettings>,
) {
let inspector: typeof Inspector | undefined;
Expand All @@ -250,6 +256,7 @@ async function initRenderer(
renderEngine:
renderMode === 'webgl' ? WebGlCoreRenderer : CanvasCoreRenderer,
fontEngines: [SdfTextRenderer, CanvasTextRenderer],
textureProcessingLimit: textureProcessingLimit,
...customSettings,
},
'app',
Expand Down

0 comments on commit 4af99df

Please sign in to comment.