File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 11import type { BaseOptions } from "../option"
22
33import { validateAttribute } from "../attribute"
4+ import { handleWarning } from "../utility/handle-warning"
45
56/**
67 * Configuration options for disabling a vertex attribute
@@ -39,8 +40,18 @@ export function disableAttribute(
3940 // Validate attribute location using shared helper
4041 const location = validateAttribute ( context , program , options )
4142
42- // If attribute is valid, disable it
4343 if ( location !== - 1 ) {
44+ // If attribute is valid, disable it
4445 context . disableVertexAttribArray ( location )
46+ } else if ( options . strict ) {
47+ // If strict mode is enabled and attribute is missing → delegate to handle warning
48+ handleWarning ( {
49+ subject : "attribute" ,
50+ context : {
51+ action : "disable" ,
52+ result : `Attribute "${ options . name } " not found in program`
53+ } ,
54+ strict : true
55+ } )
4556 }
46- }
57+ }
You can’t perform that action at this time.
0 commit comments