Skip to main content

Class: P5AsciifyPluginRegistry

Defined in: plugins/PluginRegistry.ts:7

Registry that manages renderer plugins for p5.asciify.

Constructors​

Constructor​

new P5AsciifyPluginRegistry(): P5AsciifyPluginRegistry

Returns​

P5AsciifyPluginRegistry

Methods​

get()​

get(id): P5AsciifyRendererPlugin | undefined

Defined in: plugins/PluginRegistry.ts:68

Get a plugin by its ID

Parameters​

ParameterTypeDescription
idstringPlugin ID

Returns​

P5AsciifyRendererPlugin | undefined

The plugin instance or undefined if not found


getAll()​

getAll(): P5AsciifyRendererPlugin[]

Defined in: plugins/PluginRegistry.ts:93

Get all registered plugins

Returns​

P5AsciifyRendererPlugin[]

Array of plugin instances


getIds()​

getIds(): string[]

Defined in: plugins/PluginRegistry.ts:85

Get all registered plugin IDs

Returns​

string[]

Array of plugin IDs


has()​

has(id): boolean

Defined in: plugins/PluginRegistry.ts:59

Check if a plugin with the given ID is registered

Parameters​

ParameterTypeDescription
idstringPlugin ID to check

Returns​

boolean

True if the plugin exists, false otherwise


register()​

register(plugin): boolean

Defined in: plugins/PluginRegistry.ts:16

Registers a new renderer plugin.

Parameters​

ParameterTypeDescription
pluginP5AsciifyRendererPluginThe renderer plugin to register

Returns​

boolean

Throws​

If a plugin with the same ID is already registered or conflicts with built-in renderers


unregister()​

unregister(id): boolean

Defined in: plugins/PluginRegistry.ts:77

Unregister a plugin by its ID

Parameters​

ParameterTypeDescription
idstringPlugin ID to remove

Returns​

boolean

True if the plugin was removed, false if it wasn't found