1681-engine / index / solidSilhouette
Function: solidSilhouette() ​
ts
function solidSilhouette(texture, color?): Texture<TextureSource<any>> | null;Defined in: src/core/silhouette.ts:24
texture's frame with every opaque pixel painted color (default white), alpha kept; made once per frame and colour and cached. Only for textures that are never repainted (atlas frames, snapshots): copy a live one first (TextureRegistry.snapshotInto) and paint the copy with fillSolid. Null when the frame cannot be read (no drawable source, an empty or rotated frame, a cross-origin image).
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
texture | Texture | undefined |
color | number | 0xffffff |
Returns ​
Texture<TextureSource<any>> | null