shapeField.analyticExtruded
A flat shape given depth: the 2D distance of a circle, polygon or star, extruded in z by params.halfDepth.
shapeField.analyticExtruded(
layout: {readonly $: {readonly params: ExtrudedAnalyticParamsView}},
sdf2d: AnalyticSdf2d,
): ShapeField3
Import sim from shaders/std and use sim.shapeFields.shapeField.analyticExtruded.
The shape's sub-props are read live from params.sa*.
Parameters
| Name | Type | Notes |
|---|---|---|
layout | {readonly $: {readonly params: ExtrudedAnalyticParamsView}} | |
sdf2d | AnalyticSdf2d |
Example
shapeField.analyticExtruded(simLayout, buildAnalyticSdfFn('hexagon'))
See also
shapeField.svgExtruded— An SVG outline given depth: the outline's distance texture, extruded in z byparams.halfDepth.shapeField.analytic3d— A true 3D solid (sphere, torus, knot…) from its baked distance function, rotated by the shape's live rotation so the swarm follows the surface as it turns.