Search the Community
Showing results for tags 'progress'.
-
Has anyone encountered a problem with the load progress reporting incorrectly when loading sprite sheets? I'm loading a large sprite sheet and loading goes from .5,.33,.66, to 1.00 immediately and loads these numbers every time. The game does eventually load fine, but way after load progress reports 100%. Here's the code: this.load.multiatlas('sprite_sheet1', 'sprite_sheets/sprite_sheet1.json', 'sprite_sheets'); this.load.on('progress', function (value) { console.log(value); }); I'm using Phaser 3. Anyone see any problems with the way I'm doing this?
-
Is it possible to show the loading progress of a png sptire atlas and its json file? Something like we used to do in flash with totalBytes and loadedBytes?
-
Hi, I'm running into an issue regarding the Assets Manager and the Video Textures : When loading a sound, here is an example of code that works very well, using Assets : var binaryTaskSound = assetsManager.addBinaryFileTask("s1 task", "sounds/sound1.mp3");binaryTaskSound.onSuccess = function (task) { music5 = new BABYLON.Sound("s5", task.data, scene, soundReady, { loop: true});};Now when I want to load a Video Texture using the same method, it doesn't not seem to work anymore : var binaryTaskVideo = assetsManager.addBinaryFileTask("v1 task", "videos/Cocoon720p-Synced.mp4");binaryTaskVideo.onSuccess = function (task) { var videoTexture = new BABYLON.VideoTexture("video", [task.data], scene, false, true);};
- 1 reply
-
- Babylon.js
- Assets manager
-
(and 2 more)
Tagged with:
-
So I noticed that a lot of people in here were asking about a loading/progress bar so I came up with my own solution. Let me know what you think var barGreen,barYellow,maxWidth,tween;function create(){ barGreen = game.add.graphics(200,300); barGreen.beginFill(0xEAF516); barGreen.drawRect(0,0,300,50); barYellow = game.add.graphics(200,300); barYellow.beginFill(0x4BFAF7); barYellow.drawRect(0,0,300,50); maxWidth = 300; barYellow.width=0; tween = game.add.tween(barYellow); tween.to({width:maxWidth},1000); tween.start();}Here's the JSFiddle if you want to see what it looks like: http://jsfiddle.net/Batzi/op3grg2w/10/
-
Hi, I'm having trouble with TypeScript when trying to create a custom preloader function/graphic does anybody know a solution please? thanks j class Main { // onFileComplete can't find this function myLoadUpdate() { console.log("myLoadUpdate"); } preload () { this.game.load.image("star", "assets/star.png"); this.game.load.onFileComplete.add(this.myLoadUpdate, this); // => Uncaught Error: Phaser.Signal: listener is a required param of add() and should be a Function. }}
- 3 replies
-
- TypeScript
- preload
-
(and 2 more)
Tagged with:
-
Hi, I'm looking for a best way to load several textures while displaying the progress to the user. Until now I've found the Tools.LoadImage method which works well and even cares for IndexedDB. However this method returns an Image object, and I didn't found a way to create a texture from an Image. Texture constructor receives the Url of an image and not an Image object. In addition, this method (Tools.LoadImage) provides just OnLoad callback and I want the OnProgress. I've also looked at FilesInput class, but it appears that this class is used for Drag&Drop files loading and I can't use it for my own purposes. Any suggestions? I'm sure that I'm missing something, certainly there is a simple way to do it.
-
Is there any way to create function - as progress, and final call For all scene when is loaded on page , models texture , effect - so is pure offline from this moment on and all is on stage ? As I use progress when loading model after is finish it take few more moments to show all - that I would like to hide as it is not nice to see each model adding to scene. Thank you