Configuration Rules
Set up performance budgets and custom rules with 3Lens.
Loading example...
Define performance thresholds, create custom validation rules, and get automatic warnings when budgets are exceeded.
Features Demonstrated
- Performance Budgets: Set FPS, memory, draw call limits
- Custom Rules: Create application-specific rules
- Violation Alerts: Get warnings when rules are broken
- Rule Composition: Combine multiple conditions
Example Rules
typescript
const probe = createProbe({
rules: [
{
name: 'max-triangles',
check: (stats) => stats.triangles < 1000000,
message: 'Triangle count exceeds 1M budget'
},
{
name: 'min-fps',
check: (stats) => stats.fps > 30,
severity: 'error',
message: 'FPS dropped below 30'
}
]
});1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Related Examples
- Performance Debugging - Monitoring
- Cost Analysis - Rendering cost breakdown