Skip to content

Commit 7f39264

Browse files
committed
docs(plugins): add migration note for capability-based device profiles
1 parent e42bb56 commit 7f39264

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

plugins/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,22 @@ export const defaultProfilePlugin = {
225225
};
226226
```
227227

228+
## Migration note: Device profiles
229+
230+
- Legacy DEVICE_PROFILES (desktop-fast, desktop-normal, phone-normal, phone-slow) remain available for backward compatibility.
231+
- New QUALITY_TIERS (low, medium, high, ultra) are computed at runtime based on device capabilities and a short micro-benchmark. The default profile plugin writes a structured object to `RESOURCES.DEVICE_PROFILE` with:
232+
- `label`: e.g., "auto-high"
233+
- `qualityTier`: one of QUALITY_TIERS
234+
- `score`: number (0..100)
235+
- `caps`: capability signals (cores, memoryGB, webgl2, wasmSIMD, screenLongSide, camera)
236+
- `capture`: sizing hints (sourceWidth, sourceHeight, displayWidth, displayHeight, fpsHint)
237+
- `processing`: budget hints (budgetMsPerFrame, complexity)
238+
- Overriding:
239+
- To force a legacy profile, call `defaultProfilePlugin.setProfile("<legacy-label>", context)`.
240+
- To apply custom app-specific sizing, set your own object to `RESOURCES.DEVICE_PROFILE` after enabling the profile plugin.
241+
- Compatibility:
242+
- The new profile object still includes top-level `label`, `sourceWidth`, `sourceHeight`, `displayWidth`, `displayHeight` to minimize changes in existing examples.
243+
228244
## See Also
229245

230246
- ECS Architecture Documentation (docs/ECS_ARCHITECTURE.md)

0 commit comments

Comments
 (0)