Hello,
You can use the addSpriteSheet()
method.
You can run it on the client side (you decide when)
Example (in src/modules/main/client/index.ts
)
import { RpgClient, RpgClientEngine, RpgModule } from '@rpgjs/client'
@RpgModule<RpgClient>({
engine: {
onStart(engine: RpgClientEngine) {
engine.addSpriteSheet('<url>', 'my-id')
}
}
})
export default class RpgClientModuleEngine {}
<url>
can be a URL to a local folder, or an HTTP request