Using three.js
On my home PC with Nvidia GNU, I get about 105 of these in my browser console:
/#/home:1 [.CommandBufferContext]RENDER WARNING: Render count or primcount is 0
But on my intel GNU laptop, I do not. Is this a disagreement with the GNU driver? Or is this something I can fix?
var animationId;
var CAMERA_POSITION = 5000;
function runClouds() {
var speed = 0.8;
cloudsContainer.style.display = 'block';
animationId = requestAnimationFrame( runClouds );
camera.position.y = -75;
if (camera.position.z <= 0) {
window.cancelAnimationFrame(animationId);
camera.position.z = CAMERA_POSITION;
cloudsContainer.style.display = 'none';
return true;
} else if (camera.position.z <= 400) {
speed = 0.1;
} else if (camera.position.z <= 900) {
speed = 0.3;
} else if (camera.position.z <= 2000) {
speed = 0.7;
}
camera.position.z -= 100 * speed;
renderer.render( scene, camera );
}
This warning is thrown when Three.js is trying to render an object that does not exist yet.
Take, for example, a program here you draw a line.
If you add the line to the scene before you add any points, this warning will appear UNTIL the first point is added and a line can be seen.
If you get this, either something is waiting to be added to the scene, or in your case, since you say you get about 105 every time, I assume that an object is added to the scene then due to asychronicity, is actually made in another function after the fact.
Since it is a warning, there isn't much to be afraid about.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With