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
* The temporal velocity value at the current time. For spatial properties, such as Position, it returns the tangent vector value. The result is the same dimension as the property.
224
+
*/
225
+
readonlyvelocity: PropertyValueType;
226
+
227
+
/**
228
+
* A 1D, positive speed value equal to the speed at which the property is changing at the default time. This element can be used only for spatial properties.
229
+
*/
230
+
readonlyspeed: PropertyValueType;
231
+
222
232
constructor(
223
233
readonlyvalue: PropertyValueType,
224
234
readonlyname: string="Property name"
225
-
){}
235
+
){
236
+
this.velocity=this.value;
237
+
this.speed=this.value;
238
+
}
226
239
227
240
/**
228
241
* The number of keyframes on the property
@@ -314,21 +327,14 @@ export class Property<PropertyValueType extends Value> {
314
327
): PropertyValueType{
315
328
returnthis.value;
316
329
}
317
-
/**
318
-
* The temporal velocity value at the current time. For spatial properties, such as Position, it returns the tangent vector value. The result is the same dimension as the property.
319
-
*/
320
-
readonlyvelocity: PropertyValueType=this.value;
330
+
321
331
/**
322
332
* @returns The temporal velocity value at the specified time. For spatial properties, such as Position, it returns the tangent vector value. The result is the same dimension as the property.
323
333
* @param time The composition time in seconds to get the velocity at
324
334
*/
325
335
velocityAtTime(time: number): PropertyValueType{
326
336
returnthis.velocity;
327
337
}
328
-
/**
329
-
* A 1D, positive speed value equal to the speed at which the property is changing at the default time. This element can be used only for spatial properties.
330
-
*/
331
-
readonlyspeed: PropertyValueType=this.value;
332
338
/**
333
339
* @returns A 1D, positive speed value equal to the speed at which the property is changing at the specified time. This element can be used only for spatial properties.
334
340
* @param time The composition time in seconds to get the speed at
0 commit comments