You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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?
Path is just a construct. For me the most flexible is still using buckets of data. We could use type properties to identify objects other than 3D geometries:
// Simplicial complex (default type){
positions: newFloat32Array([x,y,z,x,y,z, ...]),normals?: newFloat32Array([x,y,z,x,y,z, ...]),uvs?: newFloat32Array([u,v,u,v, ...]),cells: newUint32Array([a,b,c,a,b,c, ...])// + any other attribute}// Path{type: PexGeomEnumTypes.Path,positions: newFloat32Array([x,y,z,x,y,z, ...]),normals?: newFloat32Array([x,y,z,x,y,z, ...]),tangents?: newFloat32Array([x,y,z,x,y,z, ...]),binormals?: newFloat32Array([x,y,z,x,y,z, ...]),// + any other attribute}// Shape (similar to earcut(vertices[, holes, dimensions = 2]) ){type: PexGeomEnumTypes.Shape,positions: newFloat32Array([x,y,z,x,y,z, ...]),holes: [5,8],// + any other attribute}// Bezier curve (for the sake of example){type: PexGeomEnumTypes.BezierCurve,positions: newFloat32Array([cp1x,cp1y,cp2x,cp2y,x,y,cp1x,cp1y,cp2x,cp2y,x,y]),holes: [5,8],// + any other attribute}// Hierarchy{
type: "hierarchy,
positions: newFloat32Array([x,y,z,x,y,z, ...]),nodes: [0,5],weight: [10,7.5]}{type: "node",id: 0,parent: undefined}{type: "node",id: 5,parent: 0,children: [6,7]}
that allows for
variable number of attributes
assuming attributes have meaning on their own (positions means 3D positions in space, not vertices for 3D rendering)
the possibility of adding new features via attributes
identifying the data types easily to transform them
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
The text was updated successfully, but these errors were encountered: