Created
July 8, 2020 16:06
-
-
Save corbanbrook/aaa1ab354390d4710d05806619834cbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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