@casual-simulation/aux-common 3.0.18 → 3.0.20-alpha.2922092747

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.
@@ -8838,6 +8838,109 @@ interface RecordFileOptions {
8838
8838
  mimeType?: string;
8839
8839
  }
8840
8840
 
8841
+
8842
+ /**
8843
+ * Defines an interface that contains a bunch of options for starting an animation.
8844
+ */
8845
+ export interface StartFormAnimationOptions {
8846
+ /**
8847
+ * The Unix time in miliseconds that the animation should start at.
8848
+ */
8849
+ startTime?: number;
8850
+
8851
+ /**
8852
+ * The time within the animation clip that the animation should start at in miliseconds.
8853
+ */
8854
+ initialTime?: number;
8855
+
8856
+ /**
8857
+ * The rate at which the animation plays.
8858
+ * 1 means the animation plays normally.
8859
+ * 2 means the animation plays 2x as quickly.
8860
+ * 0 means that the animation is paused.
8861
+ */
8862
+ timeScale?: number;
8863
+
8864
+ /**
8865
+ * The options for looping the animation.
8866
+ * If omitted, then the animation will play once and finish.
8867
+ */
8868
+ loop?: {
8869
+ /**
8870
+ * The looping mode that should be used.
8871
+ */
8872
+ mode: 'repeat' | 'pingPong';
8873
+
8874
+ /**
8875
+ * The number of times that the animation should repeat for.
8876
+ */
8877
+ count: number;
8878
+ };
8879
+
8880
+ /**
8881
+ * Whether the final animation values should be preserved when the animation finishes.
8882
+ */
8883
+ clampWhenFinished?: boolean;
8884
+
8885
+ /**
8886
+ * The number of miliseconds that the animation should take to cross fade from the previous animation.
8887
+ * If null, then this animation takes over immediately. Additionally, if no previous animation was playing then this animation takes over immediately.
8888
+ */
8889
+ crossFadeDuration?: number;
8890
+
8891
+ /**
8892
+ * Whether to warp animation values during a cross fade.
8893
+ */
8894
+ crossFadeWarp?: boolean;
8895
+
8896
+ /**
8897
+ * The number of miliseconds that the animation should take to fade in.
8898
+ * If null, then the animation will not fade in.
8899
+ */
8900
+ fadeDuration?: number;
8901
+
8902
+ /**
8903
+ * The address that the animations should be loaded from.
8904
+ */
8905
+ animationAddress?: string;
8906
+ }
8907
+
8908
+ /**
8909
+ * Defines an interface that contains a bunch of options for stopping an animation.
8910
+ */
8911
+ export interface StopFormAnimationOptions {
8912
+ /**
8913
+ * The Unix time in miliseconds that the animation should be stopped at.
8914
+ */
8915
+ stopTime?: number;
8916
+
8917
+ /**
8918
+ * The number of miliseconds that the animation should take to fade out.
8919
+ * If null, then the animation will stop immediately.
8920
+ */
8921
+ fadeDuration?: number;
8922
+ }
8923
+
8924
+ /**
8925
+ * Defines an interface that contains animation information.
8926
+ */
8927
+ export interface FormAnimationData {
8928
+ /**
8929
+ * The name of the animation.
8930
+ */
8931
+ name: string;
8932
+
8933
+ /**
8934
+ * The index that the animation is at.
8935
+ */
8936
+ index: number;
8937
+
8938
+ /**
8939
+ * The duration of the animation in miliseconds.
8940
+ */
8941
+ duration: number;
8942
+ }
8943
+
8841
8944
  interface Os {
8842
8945
  /**
8843
8946
  * Sleeps for time in ms.
@@ -9961,6 +10064,44 @@ interface Os {
9961
10064
  */
9962
10065
  calculateRayFromCamera(portal: 'grid' | 'miniGrid' | 'map' | 'miniMap', viewportCoordinates: Vector2): Promise<RaycastRay>;
9963
10066
 
10067
+ /**
10068
+ * Requests that the given address be pre-cached so that it is available for use on a bot.
10069
+ * Returns a promise that resolves once the address has been cached.
10070
+ * @param address The address that should be cached.
10071
+ */
10072
+ bufferFormAddressGLTF(address: string): Promise<void>;
10073
+
10074
+ /**
10075
+ * Starts the given animation on the given bot.
10076
+ * Returns a promise that resolves once the animation has been started.
10077
+ * @param bot The Bot that the animation should be started on.
10078
+ * @param nameOrIndex The name or index of the animation that should be started.
10079
+ * @param options The options that should be used for the animation.
10080
+ */
10081
+ startFormAnimation(bot: Bot, nameOrIndex: string | number, options?: StartFormAnimationOptions): Promise<void>;
10082
+ /**
10083
+ * Starts the given animation on the given bot(s).
10084
+ * Returns a promise that resolves once the animation(s) have been started.
10085
+ * @param botOrBots The bot or list of bots that the animation should be started on.
10086
+ * @param nameOrIndex The name of the animation.
10087
+ * @param options The options for the animation.
10088
+ */
10089
+ startFormAnimation(botOrBots: Bot | string | (Bot | string)[], nameOrIndex: string | number, options?: StartFormAnimationOptions): Promise<void>;
10090
+
10091
+ /**
10092
+ * Stops the animation on the given bot(s).
10093
+ * Returns a promise that resolves when the animations have been stopped.
10094
+ * @param botOrBots The bot or list of bots that the animation(s) should be stopped on.
10095
+ * @param options The options that should be used.
10096
+ */
10097
+ stopFormAnimation(botOrBots: Bot | string | (Bot | string)[], options?: StopFormAnimationOptions): Promise<void>;
10098
+
10099
+ /**
10100
+ * Gets the list of animations that are included in the given the form or bot.
10101
+ * @param botOrAddress The bot, bot ID, or address that the animations should be retrieved from.
10102
+ */
10103
+ listFormAnimations(botOrAddress: Bot | string): Promise<FormAnimationData[]>;
10104
+
9964
10105
  /**
9965
10106
  * Specifies that the given prefix should be interpreted as code.
9966
10107
  * @param prefix The prefix that code tags should start with.