Abstract base for spline sources whose polyline lives in a GPU buffer,
surfaced through a GPUSplineData handle.
Base class — has no declarative element of its own; subclasses inherit its members.
Owns everything the renderer's zero-copy + readback machinery needs from
such a source: the gpuData handle storage, the CPU-side
mirror populated by GPU readback (updateFromReadback — until the
first readback pointAt is null and polyline is empty), the
version/data-change machinery, the cloner-facing materialization
(localMatrices via SplinePointsMaterializer + distribution),
and scene registration (the Material pattern).
Concrete subclasses supply WHERE the handle comes from:
- ComputeBufferSplineSource — a direct compute-node="#id" reference
to an external producer.
- CustomWGSLSplineSource — its OWN per-frame generation dispatch of an
author WGSL vertex function.
The renderer (SplineGPUBuffers) discriminates on THIS base for the
zero-copy binding + readback paths.
Abstract base class — not instantiated directly. Construct one of its concrete subclasses; this class contributes the members below to them.
Inherited from: SkenraAnimatable
— see those pages for inherited members.
| Property | Type | Default | Description | Declared by |
|---|---|---|---|---|
pointCountread-only |
number |
— | Cloner-facing point count. Tracks distribution; for a GPU source |
GPUPolylineSplineSource |
localMatricesread-only |
Float32Array<ArrayBufferLike> | null |
— | Per-vertex [ T·width | N·width | B·width | P ] frame matrices, or null until data is available. |
GPUPolylineSplineSource |
distributionanimatable |
SplineDistributionMode |
— | How clone points are placed along the spline — at the control points, at | GPUPolylineSplineSource |
distributionCount |
number |
— | The number of evenly spaced points to place when the distribution is | GPUPolylineSplineSource |
vertexCountread-only |
number |
— | Number of vertices in the linearized polyline. | GPUPolylineSplineSource |
isValidread-only |
boolean |
— | Whether the source initialized successfully and holds at least one vertex. | GPUPolylineSplineSource |
isClosedanimatable |
boolean |
false |
Whether the spline forms a closed loop (last vertex joins the first). | GPUPolylineSplineSource |
polylineread-only |
readonly Readonly<SplinePoint>[] |
[] |
Read-only view of the internal 3D polyline points. | GPUPolylineSplineSource |
sceneread-only |
any |
— | Gets the Scene this animatable belongs to, if any. | SkenraAnimatable |
animationsread-only |
SkenraAnimation[] |
— | Public getter for the animations affecting this target. | SkenraAnimatable |
| Method | Description | Declared by |
|---|---|---|
pointAt(t: number): SplinePoint | null |
Returns a point on the spline at normalized parameter t. | GPUPolylineSplineSource |
getBoundsInSpace(fullTransform: Float32Array): PolylineBounds | null |
Axis-aligned bounding box of the produced points, expressed in the given target space, or null if there is no data yet. |
GPUPolylineSplineSource |
animate(firstArg: TypedKeyframe<this>[] | TypedPropertyIndexedKeyframes<this> | Record<string, any> | globalThis.Keyframe[] | globalThis.PropertyIndexedKeyframes | null, secondArg?: number | KeyframeAnimationOptions | globalThis.KeyframeAnimationOptions): SkenraAnimation & Animation |
Creates a new SkenraAnimation for this target per Web Animations API. | SkenraAnimatable |
removeAnimation(animation: SkenraAnimation): boolean |
Removes a specific animation from this object. | SkenraAnimatable |
constrain(type: K, config: ConstraintConfigMap[K]): ConstraintReturnMap[K] |
Creates a constraint on this Animatable using a fluent API. | SkenraAnimatable |