# Function: spriteOptions()

> **spriteOptions**(`o?`): [`FullSpriteDrawOptions`](../type-aliases/FullSpriteDrawOptions.md)

Defined in: [draw.ts:56](https://github.com/debuffjp/debuff/blob/487a371b887e2dbf1b4e95719a9b0b5ed1a5efa1/packages/spryte/src/draw.ts#L56)

Options for `draw.sprite` with every field present, `undefined` where `o` leaves one out (the default). Build each options
object with it and they all share one shape, which keeps `draw.sprite` fast: V8 caches property lookups for up
to four object shapes, and a game passing `{ rotation }` here, `{ tint }` there and `{}` elsewhere goes past
that. Eight shapes made `draw.sprite` about twice as slow as the same eight built here (200k calls, Node 22).
A game that only ever passes one or two shapes doesn't need it: there it costs a little.
Make them once and change fields in place; creating one per call allocates.

```ts
const ship = spriteOptions({ rotation: 0 });
ship.rotation = angle;
draw.sprite(img, x, y, ship);
```

## Parameters

### o?

[`SpriteDrawOptions`](../interfaces/SpriteDrawOptions.md) = `{}`

## Returns

[`FullSpriteDrawOptions`](../type-aliases/FullSpriteDrawOptions.md)
