Skip to main content

Read Only

Functions

newReadonlyColor

newReadonlyColor(r, g, b, a?, ro?, go?, bo?): Readonly<Color>

Helper function to create a read-only Color object. (Otherwise, you would have to manually specify both the type and the constructor.)

Note that read-only colors will be writable at run-time.

Parameters

NameType
rfloat
gfloat
bfloat
a?float
ro?int
go?int
bo?int

Returns

Readonly<Color>

Defined in

packages/isaacscript-common/src/functions/readOnly.ts:7


newReadonlyKColor

newReadonlyKColor(r, g, b, a): Readonly<KColor>

Helper function to create a read-only KColor object. (Otherwise, you would have to manually specify both the type and the constructor.)

Note that read-only colors will be writable at run-time.

Parameters

NameType
rfloat
gfloat
bfloat
afloat

Returns

Readonly<KColor>

Defined in

packages/isaacscript-common/src/functions/readOnly.ts:25


newReadonlyVector

newReadonlyVector(x, y): Readonly<Vector>

Helper function to create a read-only Vector object. (Otherwise, you would have to manually specify both the type and the constructor.)

Note that read-only vectors will be writable at run-time.

Parameters

NameType
xfloat
yfloat

Returns

Readonly<Vector>

Defined in

packages/isaacscript-common/src/functions/readOnly.ts:40