@stinkycomputing/sesame-api-client 1.4.0-alpha.0 → 1.4.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -146,6 +146,35 @@ cl.add_transport_command('cam1', { type: 'play' });
146
146
  await client.execute(cl);
147
147
  ```
148
148
 
149
+ ### Animations
150
+
151
+ Use the `keyframe()` helper to build type-safe animation keyframes. The easing parameters are constrained to the `EaseKind` enum, so invalid values are caught at compile time:
152
+
153
+ ```typescript
154
+ import { CommandList, keyframe, EaseKind, sesame } from '@stinkycomputing/sesame-api-client';
155
+
156
+ const cl = new CommandList();
157
+
158
+ cl.animate_property(
159
+ { compositor: 'main', node: 'cam1-node' }, // property domain
160
+ 'cam1-node', // address
161
+ 'opacity', // property name
162
+ sesame.v1.compositor.AnimationChannelEvaluationMode.HOLD, // before
163
+ sesame.v1.compositor.AnimationChannelEvaluationMode.HOLD, // after
164
+ [
165
+ keyframe(0, { floatValue: 0.0 }),
166
+ keyframe(500000, { floatValue: 1.0 }, EaseKind.QUADRATIC_INOUT),
167
+ keyframe(1000000, { floatValue: 0.5 }, EaseKind.CUBIC_IN, EaseKind.CUBIC_OUT),
168
+ ]
169
+ );
170
+ ```
171
+
172
+ The `keyframe(timeUs, value, easingIn?, easingOut?)` parameters:
173
+ - **timeUs** — time in microseconds
174
+ - **value** — a `PropValue` (`floatValue`, `intValue`, `vec4Value`, `stringValue`, or `boolValue`)
175
+ - **easingIn** *(optional)* — easing curve entering this keyframe (`EaseKind`)
176
+ - **easingOut** *(optional)* — easing curve leaving this keyframe (`EaseKind`)
177
+
149
178
  ## Deployment Notes
150
179
 
151
180
  When using this package in a bundled application (e.g., with esbuild):