
Security News
AI Agent Submits PR to Matplotlib, Publishes Angry Blog Post After Rejection
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.
gl-triangle-strip-indexer
Advanced tools
Creates typed arrays capable of being passed to WebGL element arrays for triangle strip meshes.
var createIndices = require('gl-triangle-strip-indexer')
var createBuffer = require('gl-buffer')
var createVAO = require('gl-vao')
var indexData = createIndices(256, 256)
var vertexData = createSomeContiguousSurface(256, 256)
// to use element indexes >= 65535, use "OES_element_index_uint."
gl.getExtension('OES_element_index_uint')
var indexBuffer = createBuffer(gl, ndarray(indexData), gl.ELEMENT_ARRAY_BUFFER);
var vao = createVAO(gl, [{
buffer: createBuffer(gl, vertexData, gl.ARRAY_BUFFER, gl.STATIC_DRAW),
type: gl.FLOAT,
size: 3
}], indexBuffer, gl.UNSIGNED_INT)
vao.bind()
vao.draw(gl.TRIANGLE_STRIP, indexBuffer.length)
createIndices(width, height[, out]) -> outReturns a typed array containing indexes representing a triangle strip. Each alternating column will introduce one degenerate triangle, and produces the following pattern:
*--*--*
| /|\ |
|/ | \|
*--*--*
| /|\ |
|/ | \|
*--*--*
The size of the returned array will be height + (height - 1) * (2 * (width - 1)). The array
can be passed in as the optional out parameter, in which case a subarray will be returned.
If out is not provided, createIndices will instantiate one of the correct datatype and size.
MIT
FAQs
create element indices for triangle strip meshes
We found that gl-triangle-strip-indexer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.

Security News
HashiCorp disclosed a high-severity RCE in next-mdx-remote affecting versions 4.3.0 to 5.x when compiling untrusted MDX on the server.

Security News
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.