fix(effects): снизить лаги сцены на Mac
Pixi режется по contentRect, пульт идёт в preview (12 FPS, 0.5 DPR), штампы тумана/огня/дождя прореживаются, draft темноты и маркера не чаще 20 Гц. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -49,3 +49,16 @@ void test('PxiEffectsOverlay: эффекты перекладываются пр
|
||||
assert.ok(src.includes('viewportSig'));
|
||||
assert.match(src, /\$\{contentSig\}@\$\{viewportSig\(viewport\)\}/);
|
||||
});
|
||||
|
||||
void test('PxiEffectsOverlay: canvas по contentRect + preview profile', () => {
|
||||
const src = fs.readFileSync(path.join(here, 'PxiEffectsOverlay.tsx'), 'utf8');
|
||||
const css = fs.readFileSync(path.join(here, 'PxiEffectsOverlay.module.css'), 'utf8');
|
||||
assert.ok(css.includes('.hostBound'));
|
||||
assert.ok(css.includes('.hostFill'));
|
||||
assert.match(src, /perfProfile\s*=\s*'live'/);
|
||||
assert.match(src, /resolution:\s*preview\s*\?\s*0\.5\s*:\s*dpr/);
|
||||
assert.match(src, /maxFPS\s*=\s*preview\s*\?\s*12\s*:\s*32/);
|
||||
assert.ok(src.includes('decimateFieldStampPoints'));
|
||||
assert.ok(src.includes('fieldStampPoints'));
|
||||
assert.match(src, /viewportRef\.current = \{ x: 0, y: 0, w: viewport\.w/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user