PathCache
Defined in: render/RenderCache.ts:9
A cache for complex shape paths as Path2D objects. Building a Path2D for complex shapes (diamond, star, etc.) is expensive; caching them avoids recomputation each frame.
Constructors
Sección titulada «Constructors»Constructor
Sección titulada «Constructor»new PathCache():
PathCache
Returns
Sección titulada «Returns»PathCache
Accessors
Sección titulada «Accessors»Get Signature
Sección titulada «Get Signature»get size():
number
Defined in: render/RenderCache.ts:14
Get the number of cached paths.
Returns
Sección titulada «Returns»number
Methods
Sección titulada «Methods»clear()
Sección titulada «clear()»clear():
void
Defined in: render/RenderCache.ts:66
Clear the path cache.
Returns
Sección titulada «Returns»void
getPath()
Sección titulada «getPath()»getPath(
type,width,height):Path2D|null
Defined in: render/RenderCache.ts:22
Get (or build) a cached Path2D for a shape type at a given size. The key includes the size because the shape geometry depends on it.
Parameters
Sección titulada «Parameters»number
number
Returns
Sección titulada «Returns»Path2D | null