A name that a sprite already owns cannot name a property, and a division by zero cannot answer (#63, #64)
game-maker / suite (push) Failing after 11m29s
game-maker / suite (push) Failing after 11m29s
#63: a shader Property node named "width" quietly took over the sprite row of the same name. isSpriteProp lives in PropertySchema now and is derived from FULL_SCHEMAS.sprite instead of being a second list that drifts. isValidPropertyName rejects those ten names, and the compiler reports it at the node as its own problem: "width" is a sprite property, told apart from "not a word" and from a duplicate. #64: Divide emitted (a / b) and handed NaN to the driver. It emits divide(a, b) now, with the guard in the prologue next to straight(), scalar and per channel: zero divided by zero is zero. That was already the house rule in the behavior and particle graphs - only the shader had never been told. Clamp comes along as a shader node for the same reason: the behavior catalog has had it all along.
This commit is contained in:
1 parent
150f2e0906
commit
c990dbcb26
6 files changed
+203
-6
No files matched your search
@@ -306,6 +306,17 @@ export function schemaFor(type: AssetType): PropertySchema {
|
||||
return FULL_SCHEMAS[type];
|
||||
}
|
||||
|
||||
const SPRITE_KEYS = new Set(FULL_SCHEMAS.sprite.map((d) => d.key));
|
||||
|
||||
/**
|
||||
* A row every sprite has already: the switch, the transform and the sprite's own. A shader
|
||||
* parameter under one of these names would be a second row on the same bag key, and its uniform
|
||||
* would read the sprite's value instead of the default the Property node declares (#63).
|
||||
*/
|
||||
export function isSpriteProp(key: string): boolean {
|
||||
return SPRITE_KEYS.has(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type schema, for behaviors followed by their declared variables, for sprites by the
|
||||
* parameters of the shader asset their bag names – which is why the project is needed.
|
||||
|
||||
Reference in new issue
Block a user