# CCMotionStreak Class Reference

Inherits from | CCNode : CCResponder : NSObject
Conforms to | CCBlendProtocol CCShaderProtocol CCTextureProtocol
Declared in | CCMotionStreak.h

## Overview

CCMotionStreak creates a motion trail special effect.

### Notes

- Segments controls how smooth the shape of the trail appears.
- Fast mode enables faster point addition and the cost of lower point precision.

## Tasks

### Accessing Motion Streak Attributes

- `fastMode` property

### Creating a CCMotionStreak Object

- `+ streakWithFade:minSeg:width:color:textureFilename:`
- `+ streakWithFade:minSeg:width:color:texture:`

### Initializing a CCMotionStreak Object

- `– initWithFade:minSeg:width:color:textureFilename:`
- `– initWithFade:minSeg:width:color:texture:`
- `– reset`

## Properties

### fastMode

Fast mode toggle.

`@property (nonatomic, readwrite, assign, getter=isFastMode) BOOL fastMode`

#### Declared In

`CCMotionStreak.h`

## Class Methods

### streakWithFade:minSeg:width:color:texture:

Creates and returns a motion streak object from the specified fade time, segments, stroke, color and texture values.

`+ (id)streakWithFade:(float)fade minSeg:(float)minSeg width:(float)stroke color:(CCColor *)color texture:(CCTexture *)texture`

#### Parameters

fade

  Fade time.

minSeg

  Minimum segments.

stroke

  Stroke width.

color

  Color.

texture

  Texture.

#### Return Value

The CCMotionStreak object.

#### Declared In

`CCMotionStreak.h`

### streakWithFade:minSeg:width:color:textureFilename:

Creates and returns a motion streak object from the specified fade time, segments, stroke, color and texture file path values.

`+ (id)streakWithFade:(float)fade minSeg:(float)minSeg width:(float)stroke color:(CCColor *)color textureFilename:(NSString *)path`

#### Parameters

fade

  Fade time.

minSeg

  Minimum segments.

stroke

  Stroke width.

color

  Color.

path

  Texture file path.

#### Return Value

The CCMotionStreak object.

#### Declared In

`CCMotionStreak.h`

## Instance Methods

### initWithFade:minSeg:width:color:texture:

Initializes and returns a motion streak object from the specified fade time, segments, stroke, color and texture values.

`- (id)initWithFade:(float)fade minSeg:(float)minSeg width:(float)stroke color:(CCColor *)color texture:(CCTexture *)texture`

#### Parameters

fade

  Fade time.

minSeg

  Minimum segments.

stroke

  Stroke width.

color

  Color.

texture

  Texture.

#### Return Value

An initialized CCMotionStreak object.

#### Declared In

`CCMotionStreak.h`

### initWithFade:minSeg:width:color:textureFilename:

Initializes and returns a motion streak object from the specified fade time, segments, stroke, color and texture file path values.

`- (id)initWithFade:(float)fade minSeg:(float)minSeg width:(float)stroke color:(CCColor *)color textureFilename:(NSString *)path`

#### Parameters

fade

  Fade time.

minSeg

  Minimum segments.

stroke

  Stroke width.

color

  Color.

path

  Texture file path.

#### Return Value

An initialized CCMotionStreak object.

#### Declared In

`CCMotionStreak.h`

### reset

Remove all living segments.

`- (void)reset`

#### Declared In

`CCMotionStreak.h`