donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.3k stars 145 forks source link

feat(functions): Add conversions to LINES or TRIANGLES #1316

Closed donmccurdy closed 3 months ago

donmccurdy commented 3 months ago

Converts primitives from LINE_STRIP or LINE_LOOP to LINES, or from TRIANGLE_STRIP or TRIANGLE_FAN to TRIANGLES. Examples:

import { convertPrimitiveToLines, convertPrimitiveToTriangles } from '@gltf-transform/functions';

// input: LINE_STRIP or LINE_LOOP
convertPrimitiveToLines(prim);

// input: TRIANGLE_STRIP or TRIANGLE_FAN
convertPrimitiveToTriangles(prim);

Related:

Remaining

donmccurdy commented 3 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @donmccurdy and the rest of your teammates on Graphite Graphite