# Class: Patterns

## Patterns(targetmesh)

#### new Patterns(targetmesh)

##### Parameters:

Name | Type | Description
--- | --- | ---
`targetmesh` | object | The mesh to flatten.

##### Properties:

Name | Type | Description
--- | --- | ---
`children` | Array.Pattern | The array tht contain patterns.
`targetMesh` | object | The mesh to flatten.
`guid` | string | A global identifier.

Source:
  - papier-core.js, line 413

### Methods

#### addPattern(pattern)

simply add a new pattern

##### Parameters:

Name | Type | Description
--- | --- | ---
`pattern` | object | the pattern to add

Source:
  - papier-core.js, line 439

#### updateTargetMesh(targetmesh)

Update the targeted mesh. That is needed when user load a new mesh.

##### Parameters:

Name | Type | Description
--- | --- | ---
`targetmesh` | object | the new mesh to flatten.

Source:
  - papier-core.js, line 427