Skip to content

Documentation / @ripl/3d / CylinderState

Interface: CylinderState ​

Defined in: 3d/src/elements/cylinder.ts:36

State interface for a cylinder, defining top/bottom radii, height, and segment count.

Extends ​

Properties ​

PropertyTypeDescriptionInherited fromDefined in
direction?DirectionDirectionality used when rendering text.Shape3DState.directioncore/src/context/types.ts:229
fill?stringFill style (CSS color, gradient, or pattern) used to paint filled regions.Shape3DState.fillcore/src/context/types.ts:225
filter?stringCSS filter string applied to subsequent drawing operations (e.g. blur(4px)).Shape3DState.filtercore/src/context/types.ts:227
font?stringCSS font shorthand used when rendering text.Shape3DState.fontcore/src/context/types.ts:231
fontKerning?FontKerningWhether font kerning is applied when rendering text.Shape3DState.fontKerningcore/src/context/types.ts:233
globalCompositeOperation?unknownCompositing operation controlling how new drawing is blended with existing content.Shape3DState.globalCompositeOperationcore/src/context/types.ts:237
heightnumberThe height of the cylinder along the Y axis, in world units.-3d/src/elements/cylinder.ts:42
lineCap?LineCapCap style drawn at the endpoints of stroked lines.Shape3DState.lineCapcore/src/context/types.ts:239
lineDash?number[]Dash pattern as alternating stroke and gap lengths; empty for a solid line.Shape3DState.lineDashcore/src/context/types.ts:241
lineDashOffset?numberDistance into the line dash pattern at which dashing begins.Shape3DState.lineDashOffsetcore/src/context/types.ts:243
lineJoin?LineJoinJoin style drawn where two stroked segments meet.Shape3DState.lineJoincore/src/context/types.ts:245
lineWidth?numberWidth, in pixels, of stroked lines.Shape3DState.lineWidthcore/src/context/types.ts:247
material?MaterialHow the surface responds to light. When omitted, the element shades from its fill alone.Shape3DState.material3d/src/core/shape.ts:228
miterLimit?numberMiter length limit ratio applied to miter line joins.Shape3DState.miterLimitcore/src/context/types.ts:249
opacity?numberGlobal alpha applied to everything drawn, from 0 to 1.Shape3DState.opacitycore/src/context/types.ts:235
radiusBottomnumberThe radius of the bottom cap, in world units. A value of 0 produces a cone-like point.-3d/src/elements/cylinder.ts:40
radiusTopnumberThe radius of the top cap, in world units. A value of 0 produces a cone-like point.-3d/src/elements/cylinder.ts:38
rotation?RotationRotation applied to the element's transform, as radians or a deg/rad string.Shape3DState.rotationcore/src/context/types.ts:275
rotationXnumberThe rotation around the X axis, in radians.Shape3DState.rotationX3d/src/core/shape.ts:216
rotationYnumberThe rotation around the Y axis, in radians.Shape3DState.rotationY3d/src/core/shape.ts:218
rotationZnumberThe rotation around the Z axis, in radians.Shape3DState.rotationZ3d/src/core/shape.ts:220
scaleXnumberThe scale along the X axis.Shape3DState.scaleX3d/src/core/shape.ts:222
scaleYnumberThe scale along the Y axis.Shape3DState.scaleY3d/src/core/shape.ts:224
scaleZnumberThe scale along the Z axis.Shape3DState.scaleZ3d/src/core/shape.ts:226
segmentsnumberThe number of segments around the circumference. Defaults to 16.-3d/src/elements/cylinder.ts:44
shadowBlur?numberGaussian blur radius applied to drawn shadows.Shape3DState.shadowBlurcore/src/context/types.ts:251
shadowColor?stringColor of drawn shadows.Shape3DState.shadowColorcore/src/context/types.ts:253
shadowOffsetX?numberHorizontal offset, in pixels, of drawn shadows.Shape3DState.shadowOffsetXcore/src/context/types.ts:255
shadowOffsetY?numberVertical offset, in pixels, of drawn shadows.Shape3DState.shadowOffsetYcore/src/context/types.ts:257
stroke?stringStroke style (CSS color, gradient, or pattern) used to paint outlines.Shape3DState.strokecore/src/context/types.ts:259
textAlign?TextAlignmentHorizontal alignment of text relative to the drawing position.Shape3DState.textAligncore/src/context/types.ts:261
textBaseline?TextBaselineVertical baseline used when positioning text.Shape3DState.textBaselinecore/src/context/types.ts:263
transformOriginX?TransformOriginHorizontal origin about which rotation and scaling are applied.Shape3DState.transformOriginXcore/src/context/types.ts:277
transformOriginY?TransformOriginVertical origin about which rotation and scaling are applied.Shape3DState.transformOriginYcore/src/context/types.ts:279
transformScaleX?numberHorizontal scale factor applied to the element's transform.Shape3DState.transformScaleXcore/src/context/types.ts:271
transformScaleY?numberVertical scale factor applied to the element's transform.Shape3DState.transformScaleYcore/src/context/types.ts:273
translateX?numberHorizontal translation, in pixels, applied to the element's transform.Shape3DState.translateXcore/src/context/types.ts:267
translateY?numberVertical translation, in pixels, applied to the element's transform.Shape3DState.translateYcore/src/context/types.ts:269
xnumberThe X position of the shape's origin in world space.Shape3DState.x3d/src/core/shape.ts:210
ynumberThe Y position of the shape's origin in world space.Shape3DState.y3d/src/core/shape.ts:212
znumberThe Z position of the shape's origin in world space.Shape3DState.z3d/src/core/shape.ts:214
zIndex?numberStacking order used to sort elements during rendering; higher values draw on top.Shape3DState.zIndexcore/src/context/types.ts:265