1 | import { BaseTexture } from '../BaseTexture';
|
2 | import { Resource } from './Resource';
|
3 | import type { ISize } from '@pixi/math';
|
4 | import type { IAutoDetectOptions } from './autoDetectResource';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export declare abstract class AbstractMultiResource extends Resource {
|
12 |
|
13 | readonly length: number;
|
14 | |
15 |
|
16 |
|
17 |
|
18 | items: Array<BaseTexture>;
|
19 | |
20 |
|
21 |
|
22 |
|
23 | itemDirtyIds: Array<number>;
|
24 | |
25 |
|
26 |
|
27 |
|
28 | private _load;
|
29 |
|
30 | baseTexture: BaseTexture;
|
31 | |
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | constructor(length: number, options?: ISize);
|
38 | /**
|
39 | * Used from ArrayResource and CubeResource constructors.
|
40 | * @param resources - Can be resources, image elements, canvas, etc. ,
|
41 | * length should be same as constructor length
|
42 | * @param options - Detect options for resources
|
43 | */
|
44 | protected initFromArray(resources: Array<any>, options?: IAutoDetectOptions): void;
|
45 | /** Destroy this BaseImageResource. */
|
46 | dispose(): void;
|
47 | /**
|
48 | * Set a baseTexture by ID
|
49 | * @param baseTexture
|
50 | * @param index - Zero-based index of resource to set
|
51 | * @returns - Instance for chaining
|
52 | */
|
53 | abstract addBaseTextureAt(baseTexture: BaseTexture, index: number): this;
|
54 | /**
|
55 | * Set a resource by ID
|
56 | * @param resource
|
57 | * @param index - Zero-based index of resource to set
|
58 | * @returns - Instance for chaining
|
59 | */
|
60 | addResourceAt(resource: Resource, index: number): this;
|
61 | /**
|
62 | * Set the parent base texture.
|
63 | * @param baseTexture
|
64 | */
|
65 | bind(baseTexture: BaseTexture): void;
|
66 | /**
|
67 | * Unset the parent base texture.
|
68 | * @param baseTexture
|
69 | */
|
70 | unbind(baseTexture: BaseTexture): void;
|
71 | /**
|
72 | * Load all the resources simultaneously
|
73 | * @returns - When load is resolved
|
74 | */
|
75 | load(): Promise<this>;
|
76 | }
|