@rive-app/webgl2 2.27.4 → 2.28.0

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.
@@ -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;
@@ -918,7 +930,7 @@ export declare class ViewModelInstanceList extends ViewModelInstanceValue {
918
930
  instanceAt(index: number): ViewModelInstance;
919
931
  }
920
932
  export declare class ViewModelInstanceAssetImage extends ViewModelInstanceValue {
921
- set value(image: Image);
933
+ value(image: ImageInternal):void;
922
934
  }
923
935
 
924
936
  export declare class ViewModelInstance {
@@ -1122,6 +1134,27 @@ export declare class FileAsset {
1122
1134
  cdnUuid: string;
1123
1135
 
1124
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;
1125
1158
  }
1126
1159
 
1127
1160
  /**
@@ -1132,6 +1165,10 @@ export declare class AudioAsset extends FileAsset {
1132
1165
  setAudioSource(audio: Audio): void;
1133
1166
  }
1134
1167
 
1168
+
1169
+ export declare class ImageAssetInternal extends FileAssetInternal {
1170
+ setRenderImage(image: ImageInternal): void;
1171
+ }
1135
1172
  /**
1136
1173
  * Rive class extending the FileAsset that exposes a `setRenderImage()` API with a
1137
1174
  * decoded Image (via the `decodeImage()` API) to set a new Image on the Rive FileAsset
@@ -1140,6 +1177,9 @@ export declare class ImageAsset extends FileAsset {
1140
1177
  setRenderImage(image: Image): void;
1141
1178
  }
1142
1179
 
1180
+ export declare class FontAssetInternal extends FileAssetInternal {
1181
+ setFont(font: FontInternal): void;
1182
+ }
1143
1183
  /**
1144
1184
  * Rive class extending the FileAsset that exposes a `setFont()` API with a
1145
1185
  * decoded Font (via the `decodeFont()` API) to set a new Font on the Rive FileAsset