Search the Community

Showing results for tags 'loader'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 100 results

  1. const atlasData = { // some data... } this.load.atlas("one", "one.png", atlasData); this.load.atlas("two", "two.png", atlasData); gets this error: File.js:557 Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided. at Function.File.createObjectURL (File.js:557) at ImageFile.onProcess (ImageFile.js:142) at LoaderPlugin.nextFile (LoaderPlugin.js:827) at ImageFile.onLoad (File.js:328) deleting either line works perfectly fine
  2. kabuto178

    How to properly load scripts

    currently thats how I am trying to load the level1 state js file into my current state, however when I try to call game.state.start('level1'); it fails to find the mentioned state. I am doing something wrong but unable to find any documentation to address this exact issue. Or should I just stick to including the state files in the script tags of the game html page?
  3. I've read through just about all of this guide (https://github.com/kittykatattack/learningPixi). I think I have a grasp of how to switch stages/scenes. There's one part that doesn't make sense to me however. If I wanted to create a separate .js file for every class and every scene's code, what's the best practice for loading those files? I've seen examples where the index.html file just includes all of the scripts, but isn't that possibly a slow and/or bad experience? A previous flow I read about was loading the bare minimum (a background, logo, and loading graphic) and then loading all other images and javascript files. Is there a best practice to load these separate javascript files through the Pixi loader so the splash screen comes up instantly and show a loading bar while I pull in all these extra assets?
  4. charlie_says

    PIXI Loader handling failed loads

    This is more a question about how people try to do things rather than a problem with PIXI per se. What I've found is, if I force the loading to fail (by turning off WiFi or similar) PIXI behaves as expected, an error event is fired, and then the game will play but with missing assets. The question: How do people gracefully handle the failure? Do you force the loader to start over? Push the error items to an array and reload? (I think this one is good, but there's a possibility that you could get caught up endlessly in the game retrying); Ignore it? (hey it's the internet, things break from time to time!) Create an error screen, which has a link for the player to start over? (this is probably the best option.) Thanks!
  5. Howdy, Is there any way to customize how the blobs from textures in the GLTFLoader are treated? I'm running into an issue where the blobs are violating our content security policy because they are appended to our base url instead of the approved CDN the assets/textures are coming from. Let's say I'm pulling a GLTF asset via: let myAsset = assetsManager.addMeshTask("", "", "https://mycdn.com/static/gltf/", "my-asset.gltf"); So instead of: blob:https://myurl.me/24bde0c8-d576-4abb-a3f4-06a05b38b8f3 We get: https://mycdn.com/static/gltf/24bde0c8-d576-4abb-a3f4-06a05b38b8f3
  6. TheMaskedFox

    Manually loading bitmap fonts and images

    I'm looking at switching away from CreateJS, but I've got one snag I need to resolve before I can feel comfortable making the switch. I build my JS applications using Webpack, and one of the features I take advantage of is asset bundling. Webpack will bundle things like images or text files into JS files that can optionally be asynchronously fetched. Depending on my target platform, I can either release an all-in-one JS file, or I can release a main file with bundles that can be loaded asynchronously when needed (such as when loading the level they're used in). What this means is that my app already has data urls for images and raw text or parsed DOM data for things like XML files. I don't need PIXI to make requests for these, but I do need PIXI to use that data. This leaves me with two questions: CreateJS will let me create Image objects from data urls. Is PIXI able to accept data urls when creating Textures or when making fromImage calls? CreateJS exposes a BitmapFont object. I can pass a png and fnt pair and get back an assembled bitmap font. I don't see an equivalent in PIXI. It looks like the only way to load a font is using PIXIs loader, but that doesn't work for me because my font assets are already in the browser. I don't need PIXI to make an XHR request to fetch the files. I just need it to accept the data I've already loaded and create the font. Is there a way to do this? Thanks.
  7. charlie_says

    (pre)Load video issue

    I'm having some issues loading videos... I can get them load ok, but, as I've got a number of separate videos that I need to sequence together seamlessly (or as close as possible to) I'm preloading them, or trying to... ...but, despite the texture appearing to have loaded, there's a delay in starting playback. I've tried a number of things, but would welcome any ideas that anyone has to getting an accurate idea of how much is loaded? I did have an idea that I could load a video as a blob, but I couldn't find an example of loading an item as a blob and then converting it, any leads on that would be welcome.
  8. charlie_says

    PIXI sound & IE 11 Loader issue (Updated)

    Hi, I'm working on a game that may need to be playable on IE11 (ugh!) Having got my basic game now working, I've found that the sound is failing, with the error: Object doesn't support property or method 'addEventListener' It seems that pixi sound should work, but, it's not clear to me why this isn't happening for me... Any ideas?
  9. Hello everyone, First, this is my first message on this forum so I would like to say Hi to everybody and to thank you for the amazing answers I already found on it. I'm playing with PIXI v4 for a while now (some drawing + drag'n'drop tool) and find myself in trouble when I test my code on IE (not a big suprise I know...). Could someone tell me exactly what are the limitations of the PIXI Loader (the one extended from https://github.com/englercj/resource-loader) concerning IE11 ? because it doesn't seem to load resource as I'm getting empty textures on my canvas when I try to use a loaded resource. And if there are some big ilimitations, what you guys are doing as a workaround to support IE ? PS : I'm coding within an Angular (5) project, and can't find a way to debug Pixi's code on the console, hence my question on the forum Thank you in advance,, Guigzz
  10. Hello, I'd would like access to any mesh through my loader for change a texture map , but the log output 2 times the same model : https://bin.fuelphp.com/snippet/view/OJ Is it my script which run 2 times or what version I should use ?
  11. Here is a simple playground which loads a small box into the scene https://www.babylonjs-playground.com/#FL6G06 Uncomment line 4 to make the scene right handed and run. Notice the faces of the box have been flipped.
  12. Hello folks, i try load an .obj file and modify the material/texture scaling. Loading goes well, but not scaling of the textures When i try to access the material object i get a undefined error. meshes[0].material is undefined, in the screen shot you can see the property is there. I dont know what i do wrong // first param: ["myMesh1", "myMesh2"] // https://doc.babylonjs.com/how_to/load_from_any_file_type BABYLON.SceneLoader.ImportMesh("", "./assets/temp/house/", "restaurant.obj", game.scene, function (meshes, particleSystems, skeletons) { // do something with the meshes and skeletons // particleSystems are always null for glTF assets //console.log(meshes, particleSystems, skeletons); console.log(meshes[0]); });
  13. Hi there, I am looking into phaser framework for a game that I'm developing. I was wondering if it is possible in phaser to load custom assets (data file) that contains multiple png files and some custom information. Is is possible to open a custom file, read binary contents, and pass png data to create a phaser image/texture etc.? I love to hear if this is possible, thanks, Bram
  14. m9dfukc

    Progressive texture upload

    Hi, I am building a media installation (with Pixi.js v4) which requires to load my textures while the system is running (ideally with a constant 60fps). Therefore I am using createImageBitmap in a Webworker instance and then transfer the ImageBitmap via transferable object to the "main thread". In the main thread I am using this approach to pass the ImageBitmap to Pixi's Texture Loader which then ultimately uploads the texture to the GPU via gl.textImage2d. This all works fine as long as I am using small textures but now I wanna load bigger textures (1920x6000px) and the texture upload starts to take a decent amount of time (70ms). Now to my question: Has anybody created a progressive texture upload for pixi.js similar to this threejs library? If not, what would be the best approach to tackle this? Basically I have similar requirements as the poster in this thread (again unfortunately wrong framework Thanks, Andreas p.s.: I've started to look into pixi.js v5 ... seems like createImageBitmap is coming, yeah!!!
  15. scofieldly

    load assets after preload

    Hi all, currently I got 2 state stateA assetsA stateB assetsB I want to load assetsB after stateA create completed, so when I go to stateB the preload flow can be faster even to 0. so I wrote like this in the end of stateA create part but I got some wranings this.game.load.audio('stateB1', 'assets/audio/stateB1.ogg'); this.game.load.start(); Phaser.Loader - active loading canceled / reset ----phaser-2.6.2.js:74076 and the assets are not loaded at all. so do you guys now how should I do to 【preload】assets for next state, thx
  16. MouseCaneta

    Problem loading atlas

    I'm trying to load an atlas created with TexturePacker using: PIXI.loader .add("game", "assets/sprites/game.json") .add("ui", "assets/sprites/ui.json") .on("progress", loadProgress) .load(setup); But for some reason pixi seems to be indexing the loaded assets by incremental numeric id instead of using the labels contained in the respective json files. Because of this I'm getting index collision when loading more than one atlas. Anyone know why? Another question, how hard it is to write a custom loader. I'm trying to import animations from ToonBoom which uses a specific xml format. I want to load it automatically as with the TexturePacker atlas.
  17. Hi folks. Can someone please tell me why my tree model "deciduous01.dae" is not loading correctly? It loads, but then it gives an error "BJS - [06:39:35]: importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse" This is the demo : http://babylontesting.epizy.com/loader/main.php This happens with the OBJ version of the Object as well. http://babylontesting.epizy.com/loader/models/deciduous/01/deciduous01/deciduous01.obj I also can't get the textures to load. I have them in the same folder... http://babylontesting.epizy.com/loader/models/deciduous/01/deciduous01/ view-source:http://babylontesting.epizy.com/loader/app/main.js line 180 is where LoadEntity ( ) is called inside http://babylontesting.epizy.com/loader/plugins/BabylonLib/BabylonLib.js , is where the function LoadEntity ( ) is created on line 138 --------------- I just want this model to load correctly... Thank you all so kindly! <3 Mythros
  18. Hello. Is there a way to interrupt/stop BABYLON.SceneLoader.load ?
  19. Discworld

    Can't load images by any means.

    Im attempting to make a game with Phaser and nodeJS. I was doing my character as a graphic (game.add.graphic) but couldn't figure out how to remove the graphic so I figured I'd make a sprite and load it. var Game = { preload: function(){ game.load.image("snakeBody", "../../assets/snakeBody.png"); game.load.image("apple", "../../assets/apple.png"); }, my folder structure is like so: -assets -static -scripts -game.js But it tells me that it can't find both files. I've also tried to add this line app.use(express.static('assets')); and then var Game = { preload: function(){ game.load.image("snakeBody", "localhost:3000/assets/snakeBody.png"); game.load.image("apple", "localhost:3000/assets/apple.png"); }, But same error occurs. EDIT: Solved it, tursn out I had to set the path as just "/snakeBody.png". I still dont understand why, but this worked.
  20. Hi all. I'm trying to return an array of objects loaded by the Mesh Importer for later use. I would like to be able to call a function to load my objects and outside of the function, affect & change each one of them OUTSIDE of the function. Here is the small demo I made :: http://www.babylonjs-playground.com/#1QJUDF#3 Thank you! <3 Mythros
  21. Is there any glTF loader sendbox for to test exported glTF file online. Like Sandbox for .babylon files ? Greetings Ian
  22. Hi guys I have problems using cross origin resources, as I tested direct load of image is working, but the spritesheet & mp4 I still can't get it work, here is some use cases: // it works var image = PIXI.Sprite.fromImage(CROSS_ORIGIN_URL_IMAGE); // not work and showing the error message // Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The video element contains cross-origin data, and may not be loaded var videoTexture = PIXI.Texture.fromVideo(CROSS_ORIGIN_URL_MP4); var video = new PIXI.Sprite(videoTexture); // my json file is at local, and the image is on cdn server, so I change baseUrl right after add function, the image is loaded successfully, but when I try to use it, it shows the similar message // pixi.min.js:8 Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at ... may not be loaded. PIXI.loader.add("/src/image/spritesheet.json"); PIXI.loader.baseUrl = CDN_SERVER_BASE_URL; PIXI.loader.load(() => { var image = PIXI.Sprite.fromImage(FRAME_KEY); }); the response header has the property "access-control-allow-origin: *", and the same mp4 URL works fine in DOM element, am I missing something?
  23. Outfire

    One atlas many json for spine

    I want to use one atlas for many spine animations in my game. I found the way how to do it with loader. I am loaded atlas with game loader (name other.atlas) and got in game.loader.resources.other. Then i am trying to load json file of my animation from console. otherLoader = new PIXI.loaders.Loader() spineLoaderOptions = { metadata: { spineAtlas: 'game.loader.resources.other' } }; otherLoader.add('someJson', 'static/img/content/fullHD/machine/elements/testJ.json', spineLoaderOptions) .load() But it will not work. Loader still wants to load atlas with name of my json. GET http://localhost:3004/static/img/content/fullHD/machine/elements/testJ.atlas 404 (Not Found) I think it is because of atlas parser . I need varibale "pages" in my metadataAtlas, but there is no pages. How atlas data looks like in console. I am doing something wrong and i dont know what.
  24. lars

    Loader in Pandajs 2

    Hello everyone I´m having some issues with the Loader in Pandajs 2 When i do the following: this.loader.onStart = this.setGame.bind(this); this.loader.onComplete = this.loadingGame.bind(this); this.loader.start(); Everything is just fine: But when I try to make a onProgress the onProgress does not response: this.loader.onStart = this.setGame.bind(this); this.loader.onProgress = this.processGame.bind(this); this.loader.onComplete = this.loadingGame.bind(this); this.loader.start(); I can see it, and trace it in the Loader.js class : onProgress: function() { //console.log(this.percent); //if (this.barFg) this.barFg.scale.x = this.percent / 100; } Her is a simple implementation I done: game.module( 'game.start' ) .require( 'game.assets' ) .body(function() { game.createScene('Start', { backgroundColor: '#5ca282', init: function() { this.loader = new game.Loader(); this.loader.onStart = this.setGame.bind(this); this.loader.onProgress = this.processGame.bind(this); this.loader.onComplete = this.loadingGame.bind(this); this.loader.start(); }, //END init setGame: function() { console.log('started'); }, processGame: function() { console.log('percent'); }, loadingGame: function() { document.getElementById('loading').style.display = "none"; this.startContainer = new game.Container().addTo(this.stage); if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { this.mytastatur = new game.Sprite('tastatur').addTo(this.startContainer); } else { this.mytastatur = new game.Sprite('uden-tastatur').addTo(this.startContainer); } this.mytastatur.position.x = game.system.width / 2 - this.mytastatur.width / 2; this.mytastatur.position.y = 0; this.mytastatur.interactive = true; this.mytastatur.click = this.mytastatur.tap = this.changeScene.bind(this, "Main"); }, changeScene: function(go) { game.system.setScene(go); var playbg = game.audio.playMusic('bb', true); game.audio.setVolume(playbg, 0.2); }, }) //END Start }); Anybody knows what wrong with onProgress on the Loader. /Lars
  25. Hello, I created a LoadingBar class which contains a loading bar and a background. I load the resources of the LoadingBar in my Boot state and the loader works. The problem is that my LoadingBar has a background that has width 100% of the game width. And height 100% of the game height. When the resources of my state are loaded the create method is called. When the create method is called all the created sprites overlap the background of my LoadingBar. I don't want to destroy my LoadingBar when the resources are loaded but only when the "create" method has finished, because it creates the maps/buildings/sprites/characters/enemies... and other things. So I want to destroy/hide my Loading screen only when all sprites are created (only when the create method has finished to create the world). But when they are created they immediately overlap my background. So the question is: what can I do to the background of the LoadingBar to make it be always the highest z-index? class World extends Phaser.State { preload () { this.loadingBar = new LoadingBar(); // load sprite sheets.. music.. .. } create () { buildMap(); // Houses overlap the background of the loading screen buildJoypad(); // Joypad buttons overlap the background of the loading screen build... build..... // done this.loadingBar.destroy(); } }