Skip to content

VisualModifierHost

Defined in: renderer/src/VisualModifiers.ts:73

Transient render-only contributions for one visual component.

The host stores offsets and factors, never the component’s base values. DisplaySystem combines the current world transform with these values every render, so gameplay and physics remain authoritative while modifiers are active.

new VisualModifierHost(appearanceChanged?): VisualModifierHost

Defined in: renderer/src/VisualModifiers.ts:84

() => void

VisualModifierHost

get hasTransformModifiers(): boolean

Defined in: renderer/src/VisualModifiers.ts:117

Whether at least one transform contribution is active.

boolean


get opacityFactor(): number

Defined in: renderer/src/VisualModifiers.ts:102

Combined multiplicative opacity factor.

number


get positionOffset(): Vec2

Defined in: renderer/src/VisualModifiers.ts:87

Combined additive position offset.

Vec2


get rotationOffset(): number

Defined in: renderer/src/VisualModifiers.ts:92

Combined additive rotation offset in radians.

number


get scaleFactor(): Vec2

Defined in: renderer/src/VisualModifiers.ts:97

Combined multiplicative scale factor.

Vec2


get size(): number

Defined in: renderer/src/VisualModifiers.ts:112

Number of active contributions across every visual property.

number


get visible(): boolean

Defined in: renderer/src/VisualModifiers.ts:107

Whether every active visibility contribution permits drawing.

boolean

_destroy(): void

Defined in: renderer/src/VisualModifiers.ts:222

Internal

Invalidates every outstanding handle during component teardown.

void


addOpacity(factor?): VisualOpacityModifierHandle

Defined in: renderer/src/VisualModifiers.ts:169

Add one independently removable opacity factor.

number = 1

VisualOpacityModifierHandle


addTransform(options?): VisualTransformModifierHandle

Defined in: renderer/src/VisualModifiers.ts:122

Add one independently removable transform contribution.

VisualTransformModifierOptions = {}

VisualTransformModifierHandle


addVisibility(visible?): VisualVisibilityModifierHandle

Defined in: renderer/src/VisualModifiers.ts:197

Add one independently removable visibility condition.

boolean = true

VisualVisibilityModifierHandle