Skip to content

Commit

Permalink
docs(tools/mesh/translateUV): add info on the range of the offset
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed Aug 13, 2023
1 parent e88b078 commit 835d52b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tools/mesh/translateUV.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { BufferAttribute, BufferGeometry, Vector2 } from 'three'

/**
* @param offset Vector2 with the 2 values representing X and Y axis. Both axis are expected to be
* floats between 0 and 1
*/
export const translateUV = (offset: Vector2, geometry: BufferGeometry) => {
const uv = geometry.getAttribute('uv') as BufferAttribute

Expand Down

0 comments on commit 835d52b

Please sign in to comment.