lars Posted October 30, 2019 Share Posted October 30, 2019 Hello Im trying to find a way to use revolt.fx outside the pixi.loader and some of the loadBundleFile loader. The default way: const rfxBundleSettings = 'assets/default-bundle.json'; const rfxSpritesheet = 'assets/revoltfx-spritesheet.json'; const additionalAssets = ['assets/rfx-examples.json']; //Load bundle files and the additional example spritesheet fx.loadBundleFiles(rfxBundleSettings, rfxSpritesheet, null, additionalAssets).then(function (data) { app.ticker.add(function () { //Update the RevoltFX instance fx.update(); }); }).catch(function (err) { console.log('Error', err); }); What I need is a way to load the image, which is referred to in the "revoltfx-spritesheet.json" file. I need to load that image seperately. Something like this: const fx = new revolt.FX(); //loaded via the script tag const rfxBundleSettings = 'assets/default-bundle.json'; const rfxSpritesheet = 'assets/revoltfx-spritesheet.json'; const additionalAssets = ['assets/rfx-examples.json']; const image-from-revoltfx-spritesheet = 'assets/revoltfx-spritesheet.png'; //Load bundle files and the additional example spritesheet fx.loadBundleFiles(rfxBundleSettings, rfxSpritesheet, null, additionalAssets).then(function (data) { app.ticker.add(function () { //Update the RevoltFX instance fx.update(); }); }).catch(function (err) { console.log('Error', err); }); and then use it in the fx.loadBundleFiles() as a parameter, or maybe another way. I´m using Pixi, but are using a costume assetManager loader. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.