There is need for class / utils for handling 2d/3d paths (lists of points)
It wish it could be geom with .positions but then it needs .primitive id to distinguish paths/holes like we did with houdini branches. Or it could be just path: array of arrays type (definitely not array of typedarrays too much PITA) but then i need path.* nodes e.g. path.Subdivide path.Resample and most path.CenterAndNormalize.
Some more questions from @dmnsgn:
- first, what is the primitive definition ie. "what is a path": is it an array of point in cartesian coordinates?
- Are we interested in defining points for curves too (associating bezier control points for instance) and so that suggest the same citi data structures (keeping holes or informations about point in separate arrays)
- is there both 2d path and 3d path? Is that something we could again define with .primitive id.
- do we lean towards a data structure optimised for webgl/webgpu and just build conversion helpers when we need to convert path to svg?
- are we re-inventing a non-typescript @thing/geom and should it be in pex-geom
@vorg answers:
to keep it simple
- Path is list of points so technically a PolyLine. Shape would be an array of Paths (array of arrays of points)
- That would be Curve or Shape2d or SVG. Too complicated. Nobody will generate bezier curves or hard corners in code -> Out of scope
- Happy to assume it's always 3d and z can be just = 0
- Nope. PITA. Kills DX, unproductive, it's not a rendering primitive (that would be geometry with typed array attributes)
- TODO: worth checking
Tasks
There is need for class / utils for handling 2d/3d paths (lists of points)
It wish it could be geom with .positions but then it needs .primitive id to distinguish paths/holes like we did with houdini branches. Or it could be just path: array of arrays type (definitely not array of typedarrays too much PITA) but then i need path.* nodes e.g. path.Subdivide path.Resample and most path.CenterAndNormalize.
Some more questions from @dmnsgn:
@vorg answers:
to keep it simple
Tasks