Jump to content

Different FPS between Chrome and Firefox


amerkoleci
 Share

Recommended Posts

Hi,

 

I have tried with some babylon.js demos and everything seems to be all right.

Sometimes FPS fall down to 50, but it rises to 60 immediately.

 

Is it possible for you to make an exemple that we can try ? Like a jsFiddle, thus we can compare with your result.

 

Thanks.

Link to comment
Share on other sites

This is the code i'm using:

// Get the Canvas element from our HTML belowvar canvas = document.getElementById("renderCanvas");// Load BABYLON 3D engine and set the root directoryvar engine = new BABYLON.Engine(canvas, true);//Create a new scene with a camera (mandatory), a light (better) and a sphere (to see the origin)var scene = new BABYLON.Scene(engine);scene.ambientColor = new BABYLON.Color3(1, 1, 1);// Creating a camera looking to the zero point (0,0,0)var camera = new BABYLON.ArcRotateCamera("MainCamera", 1, 0.8, 10, new BABYLON.Vector3(0, 0, 0), scene);//var camera = new BABYLON.FreeCamera("MainCamera", new BABYLON.Vector3(0, 5, -20), scene);// Creating a omnidirectional lightvar light0 = new BABYLON.DirectionalLight("Omni", new BABYLON.Vector3(0, -1, 0), scene);var material = new BABYLON.StandardMaterial("Mat1", scene);var box = BABYLON.Mesh.CreateBox("origin", 1, scene);material.diffuseTexture = new BABYLON.Texture("Assets/texture/10points.png", scene);material.emissiveColor = new BABYLON.Color3(1, 1, 1);box.material = material;// Attach the camera to the scenescene.activeCamera.attachControl(canvas);var objectCount = 0;for (var i = 0; i < 30; i++) {	for (var e = i; e < 30; e++) {		var clone = box.clone();		clone.position.x = (e - i * 0.5) * 1.01 + 7;		clone.position.y = 0.5 + i * 1.0;		clone.position.z = 3.0;	}}// Once the scene is loaded, just register a render loop to render itengine.runRenderLoop(function () {	scene.render();	window.document.title = BABYLON.Tools.GetFps().toFixed() + " fps , active=" + scene._activeMeshes.length;});
Link to comment
Share on other sites

I made a jsFiddle to find a solution, I cannot load any texture from the JSfiddle (and i haven't got your texture).

 

But FPS is always up to 60.

 

Could you please try your scene without your texture ? May be the problem comes from the texture (it's the only difference between our scenes).

 

I give you the JSFiddle if you want to try it by yourself.

 

http://jsfiddle.net/MaxenceBrasselet/22TFv/8/

 

Hope it can be helpful.

Link to comment
Share on other sites

Hi,

 

Sorry but i have no idea for now.

 

Could you please give us the picture of your texture ? thus we can try to load it and look if FPS drop down.

 

You can also try with another texture file in order to try if the problem comes from your first texture.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...