Skip to content

Class: SpriteFrame ​

Typed wrapper for a loaded texture. texture is unknown to stay backend-agnostic — cast to your backend's type when you need its API (e.g. as Pixi.Texture). getSize() returns the cropped frame size for atlas frames, not the source image.

Extends ​

Constructors ​

Constructor ​

ts
new SpriteFrame(assetId, loader?): SpriteFrame;

Parameters ​

ParameterType
assetIdstring
loader?IAssetLoader

Returns ​

SpriteFrame

Inherited from ​

AssetHandle.constructor

Properties ​

PropertyModifierTypeInherited from
assetIdreadonlystringAssetHandle.assetId

Accessors ​

texture ​

Get Signature ​

ts
get texture(): unknown;
Returns ​

unknown

Methods ​

GetDefaultAssetLoader() ​

ts
static GetDefaultAssetLoader(): IAssetLoader | null;

Returns ​

IAssetLoader | null

Inherited from ​

AssetHandle.GetDefaultAssetLoader


getSize() ​

ts
getSize(): 
  | {
  height: number;
  width: number;
}
  | null;

Returns ​

| { height: number; width: number; } | null


isLoaded() ​

ts
isLoaded(): boolean;

Returns ​

boolean

Inherited from ​

AssetHandle.isLoaded


SetDefaultAssetLoader() ​

ts
static SetDefaultAssetLoader(loader): void;

Parameters ​

ParameterType
loaderIAssetLoader | null

Returns ​

void

Inherited from ​

AssetHandle.SetDefaultAssetLoader

© 2026 PlayAdGentic