@rive-app/webgl 2.27.3 → 2.27.5

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/rive.wasm CHANGED
Binary file
@@ -280,8 +280,12 @@ export interface CanvasRenderFactory {
280
280
  makeRenderPath(): CanvasRenderPath;
281
281
  }
282
282
 
283
+ export class AudioInternal {
284
+ unref(): void;
285
+ }
283
286
  export class Audio {
284
287
  unref(): void;
288
+ get nativeAudio(): AudioInternal;
285
289
  }
286
290
  export interface AudioCallback {
287
291
  (audio: Audio): void;
@@ -289,8 +293,12 @@ export interface AudioCallback {
289
293
  export interface DecodeAudio {
290
294
  (bytes: Uint8Array, callback: AudioCallback): void;
291
295
  }
296
+ export class ImageInternal {
297
+ unref(): void;
298
+ }
292
299
  export class Image {
293
300
  unref(): void;
301
+ get nativeImage(): ImageInternal;
294
302
  }
295
303
  export interface ImageCallback {
296
304
  (image: Image): void;
@@ -298,8 +306,12 @@ export interface ImageCallback {
298
306
  export interface DecodeImage {
299
307
  (bytes: Uint8Array, callback: ImageCallback): void;
300
308
  }
309
+ export class FontInternal {
310
+ unref(): void;
311
+ }
301
312
  export class Font {
302
313
  unref(): void;
314
+ get nativeFont(): FontInternal;
303
315
  }
304
316
  export interface FontCallback {
305
317
  (font: Font): void;
@@ -917,6 +929,9 @@ export declare class ViewModelInstanceList extends ViewModelInstanceValue {
917
929
  removeInstanceAt(index: number): void;
918
930
  instanceAt(index: number): ViewModelInstance;
919
931
  }
932
+ export declare class ViewModelInstanceAssetImage extends ViewModelInstanceValue {
933
+ value(image: ImageInternal):void;
934
+ }
920
935
 
921
936
  export declare class ViewModelInstance {
922
937
  get propertyCount(): number;
@@ -928,6 +943,7 @@ export declare class ViewModelInstance {
928
943
  trigger(path: string): ViewModelInstanceTrigger;
929
944
  list(path: string): ViewModelInstanceList;
930
945
  viewModel(path: string): ViewModelInstance;
946
+ image(path: string): ViewModelInstanceAssetImage;
931
947
  replaceViewModel(path: string, value: ViewModelInstance): boolean;
932
948
  incrementReferenceCount(): void;
933
949
  decrementReferenceCount(): void;
@@ -1118,6 +1134,27 @@ export declare class FileAsset {
1118
1134
  cdnUuid: string;
1119
1135
 
1120
1136
  decode(bytes: Uint8Array): void;
1137
+ get nativeAsset(): FileAssetInternal;
1138
+ }
1139
+
1140
+ /**
1141
+ * Rive class representing a FileAsset with relevant metadata fields to describe
1142
+ * an asset associated wtih the Rive File
1143
+ */
1144
+ export declare class FileAssetInternal {
1145
+ name: string;
1146
+ fileExtension: string;
1147
+ uniqueFilename: string;
1148
+ isAudio: boolean;
1149
+ isImage: boolean;
1150
+ isFont: boolean;
1151
+ cdnUuid: string;
1152
+
1153
+ decode(bytes: Uint8Array): void;
1154
+ }
1155
+
1156
+ export declare class AudioAssetInternal extends FileAssetInternal {
1157
+ setAudioSource(audio: AudioInternal): void;
1121
1158
  }
1122
1159
 
1123
1160
  /**
@@ -1128,6 +1165,10 @@ export declare class AudioAsset extends FileAsset {
1128
1165
  setAudioSource(audio: Audio): void;
1129
1166
  }
1130
1167
 
1168
+
1169
+ export declare class ImageAssetInternal extends FileAssetInternal {
1170
+ setRenderImage(image: ImageInternal): void;
1171
+ }
1131
1172
  /**
1132
1173
  * Rive class extending the FileAsset that exposes a `setRenderImage()` API with a
1133
1174
  * decoded Image (via the `decodeImage()` API) to set a new Image on the Rive FileAsset
@@ -1136,6 +1177,9 @@ export declare class ImageAsset extends FileAsset {
1136
1177
  setRenderImage(image: Image): void;
1137
1178
  }
1138
1179
 
1180
+ export declare class FontAssetInternal extends FileAssetInternal {
1181
+ setFont(font: FontInternal): void;
1182
+ }
1139
1183
  /**
1140
1184
  * Rive class extending the FileAsset that exposes a `setFont()` API with a
1141
1185
  * decoded Font (via the `decodeFont()` API) to set a new Font on the Rive FileAsset
Binary file