Skip to content

Instantly share code, notes, and snippets.

@corbanbrook
Created July 8, 2020 16:06
Show Gist options
  • Save corbanbrook/aaa1ab354390d4710d05806619834cbb to your computer and use it in GitHub Desktop.
Save corbanbrook/aaa1ab354390d4710d05806619834cbb to your computer and use it in GitHub Desktop.
const uvChopPlaneGeometry = new BufferGeometry()
uvChopPlaneGeometry.setIndex([
0,
4,
1,
4,
5,
1,
1,
5,
2,
5,
6,
2,
2,
6,
3,
6,
7,
3
])
uvChopPlaneGeometry.setAttribute(
'position',
new Float32BufferAttribute(
[
-0.5,
0.5,
0,
0,
0.5,
0,
0,
0.5,
0,
0.5,
0.5,
0,
-0.5,
-0.5,
0,
0,
-0.5,
0,
0,
-0.5,
0,
0.5,
-0.5,
0
],
3
)
)
uvChopPlaneGeometry.setAttribute(
'normal',
new Float32BufferAttribute(
[
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1
],
3
)
)
uvChopPlaneGeometry.setAttribute(
'uv',
new Float32BufferAttribute(
[0, 1, 1, 1, 0, 0.5, 1, 0.5, 0, 0.5, 1, 0.5, 0, 0, 1, 0],
2
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment