Skip to content

@emile/engine


@emile/engine / rendering/sprite-creators/cursorSpriteCreator / CursorSpriteCreatorOptions

Interface: CursorSpriteCreatorOptions

Defined in: src/rendering/sprite-creators/cursorSpriteCreator.ts:10

The options for the cursor sprite creator.

Properties

height?

optional height: number

Defined in: src/rendering/sprite-creators/cursorSpriteCreator.ts:46

The height of the rendered cursor.

In world units.

Default

ts
0.5

offset?

optional offset: Vec2

Defined in: src/rendering/sprite-creators/cursorSpriteCreator.ts:55

The offset of the cursor sprite from the mouse position.

In world units.

Default

ts
new Vec2(0, 0)

pixelated?

optional pixelated: boolean

Defined in: src/rendering/sprite-creators/cursorSpriteCreator.ts:28

Whether to use pixelated rendering for the cursor.

Default

ts
false

smoothing?

optional smoothing: number

Defined in: src/rendering/sprite-creators/cursorSpriteCreator.ts:65

The smoothing (1 - lerp rate) of the cursor's position to the mouse position.

0 = no smoothing 1 = full smoothing

Default

ts
0

src

src: string

Defined in: src/rendering/sprite-creators/cursorSpriteCreator.ts:14

The path to the cursor image.


width?

optional width: number

Defined in: src/rendering/sprite-creators/cursorSpriteCreator.ts:37

The width of the rendered cursor.

In world units.

Default

ts
0.5

zIndex?

optional zIndex: number

Defined in: src/rendering/sprite-creators/cursorSpriteCreator.ts:21

The z-index of the cursor sprite.

Default

ts
9999