# Sprite Map Options

> Learn all about sprite map options in Babylon.js.

Source: https://doc.babylonjs.com/features/featuresDeepDive/sprites/sprite_map_options

## Sprite Map Options
The options parameter object, when creating a sprite map, contains a number of properties.
```javascript
const spriteMap = new BABYLON.SpriteMap(name, atlasJSON, spriteTexture, options, scene);
```

Each option property helps the sprite map reserve the proper data buffers in memory and prepare the system for display.

* `stageSize`: A Vector2 of the number of "tiles" in the system - default : Vector2(1,1)
* `outputSize`: A Vector2 of size of the output plane in World Units - default : Vector2(1,1)
* `outputPosition`: A Vector3 of position of the output plane in World Units - default : Vector3.Zero
* `outputRotation`: A Vector3 of rotation of the output plane in World Units - default : Vector3.Zero
* `layerCount`: An integer for the number of "layers" in the system - default : 1
* `maxAnimationFrames`: The maximum number of frames in any animation on the sheet - default : 0
* `baseTile`: The frame ID of the initial tile to propagate into the system - default : 0
* `flipU`: A Boolean flag to trigger flipping the vertical results of the sprite after framing calculations - default : false
* `colorMultiply`: A Vector3 that will multiply the final color value of the map - default : Vector3(1,1,1)
* `frameRotationDirection`: SpriteMapFrameRotationDirection defines the rotation of the frames in the sprite map - default: `SpriteMapFrameRotationDirection.CW`

After initialization, you can change the rotation and position of the output plane by referencing the sprite map's position and rotation like a standard mesh. For any other option change (like stageSize or layerCount, etc.), it is recommended that you dispose of the map and re-initialize it with the correct options.

## Examples of Option Properties
base tile used to fill whole grid: [Playground: Base Tile Used To Fill Whole Grid](https://playground.babylonjs.com/#YCY2IL#16) - Simple example of a base tile used to fill a whole grid.
outputSize changes size and ratio of plane: [Playground: OutputSize Changes Size And Ratio Of Plane](https://playground.babylonjs.com/#YCY2IL#17) - Simple example showing outputSize changing the size and ratio of a plane.
two layers individual sprites in layer 1 on top of base tile in layer 0: [Playground: Two Layre Individual Sprites](https://playground.babylonjs.com/#YCY2IL#18) - Simple example of two layers individual sprites in layer 1 on top of base tile in layer 0.
color multiplied by red: [Playground: Color Multipled By Red](https://playground.babylonjs.com/#YCY2IL#19) - Simple example of color multiplied by red.
usage of `frameRotationDirection`: [Playground: Usage of frameRotationDirection](https://playground.babylonjs.com/#YCY2IL#2280) - Rotated sprites in the sprite atlas.
