Skip to content

Documentation / @ripl/3d / texturePatternRepetition

Function: texturePatternRepetition() ​

texturePatternRepetition(wrapS, wrapT): TexturePatternRepetition

Defined in: 3d/src/core/texture-pattern.ts:53

Maps a texture's wrap modes onto the createPattern repetition that reproduces them.

'mirror' has no repetition of its own and is carried by the tile instead, so it resolves the same way 'repeat' does.

Parameters ​

ParameterTypeDescription
wrapSTextureWrapHow horizontal coordinates outside the unit range are resolved.
wrapTTextureWrapHow vertical coordinates outside the unit range are resolved.

Returns ​

TexturePatternRepetition

The repetition mode to create the pattern with.