Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
FREEDOM251

Freedom251 › Blog › JavaScript

Three.js Static Scene Rendering: Stop Unnecessary Phone Heating

By Freedom251 Team · · 10 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If a Three.js canvas looks frozen but your phone is getting warm, the likely explanation is that JavaScript is still rendering it every animation frame. A continuous renderer.render(scene, camera) call can keep the CPU, GPU and browser busy even when no object visibly moves. Three.js documents this as wasted device power and, on portable devices, wasted battery. The fix for a genuinely static scene is to render once after setup, then request another frame only when something changes.

That makes the render loop a plausible contributor, not proof that Three.js alone caused a particular phone’s temperature. Your phone model, browser, operating system, scene complexity, ambient temperature and other application work can all matter.

As an Amazon Associate I earn from qualifying purchases.

Why a motionless scene can still use power

A rendered image does not become a permanent picture merely because it looks unchanged. If your code contains a loop such as requestAnimationFrame(animate) and calls renderer.render(scene, camera) inside animate, the browser keeps invoking that callback for as long as the page is visible. Each pass traverses scene objects, updates GPU commands and presents a frame, even when the camera and objects have not changed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Three.js manual’s Rendering on Demand guide describes continuous rendering of a non-animated scene as a waste of device power and portable-device battery. The documentation does not provide a universal battery percentage, temperature threshold or frame-rate measurement, so do not expect a particular number of degrees or minutes of battery life from changing your code.

#1 Best Overall
NEVEIKA Plug-in Phone Cooler, Cellphone Radiator with Dual Semi-Conductor Cooling Chip, Mobile Phones with a Width of 6 to 7.5cm for Tiktok Live Streaming, Outdoor Vlog, Mobile Gaming.
  • Linear damping telescopic clip: easy to adjust, pay attention! Suitable for all types of mobile phones with a width of "6 to 7.5 centimeters". NEVEIKIA mobile phone cooling can cool down when connected to a power source.(Attention: It is best to remove the phone case when using it for a better experience!)
  • Quick cooling: Dual engine, cooling principle is the same as a refrigerator, not ordinary fan cooling. It can cool your phone in "3 to 5 seconds", avoiding overheating and ensuring a stable live streaming or gaming experience.
  • Dual power supply design: supports powering the radiator through a mobile phone, and can also be connected to an external power source for use; When connected to an external power source, it can provide stable power to both the radiator and the phone, avoiding interruption of heat dissipation due to insufficient power during long-term use and ensuring continuous and stable heat dissipation performance.
  • Silent engine cooling: The fan with dual silent design can effectively dissipate air from all directions, providing stronger cooling effect without interfering with your games or Vlog programs.
  • Expanded cooling area: Approximately 2.82x1.29 inches of extreme thermal conductivity cooling area, covering the CPU and battery module, protecting your phone from blackening or sudden shutdown.

A canvas can also appear static while state is changing invisibly. OrbitControls damping may still be moving the camera after a gesture; a texture or model may finish loading; data may arrive from a network; a resize may alter the projection; or an application setting may change a material. The right question is therefore not “does the picture look still?” but “what events can change the pixels, and does the application render only after those events?”

First, verify that a render loop is actually running

Before changing architecture, establish where the work comes from. Search your code for requestAnimationFrame, setAnimationLoop, renderer.render, and callbacks named animate, loop or tick. A common pattern looks like this:

function animate() {
  requestAnimationFrame(animate);
  renderer.render(scene, camera);
}
animate();

This schedules another callback before rendering and therefore never becomes idle while the page continues to receive animation frames. A loop may be hidden in a framework effect, a helper class or a library component, so also inspect the code that creates the renderer and mounts the canvas.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a quick diagnosis, add a temporary counter immediately before the render call and log it once per second, or record timestamps around the call. If the counter keeps increasing while you are not interacting with the scene, your application is doing continuous work. Remove the logging after diagnosis; console output itself can distort timing.

Also check for other active work. A hot phone is not a Three.js-specific diagnostic. Video, camera capture, audio processing, physics, timers, large data transforms and another tab can consume power at the same time. The evidence supports unnecessary repeated rendering as a plausible contributor, not as proof of sole causation for an individual device.

Choose continuous or on-demand rendering

Use the rendering model that matches how your scene changes. The following distinction follows the guidance in the Three.js manual and renderer documentation.

Scene condition Appropriate model What requests frames
Real animation changes objects, materials or camera every frame Continuous animation loop The animation loop itself
Scene is static between interactions or state updates On-demand rendering Initial setup and meaningful changes such as controls, resize, assets or data
OrbitControls damping or inertia is enabled On-demand with temporary additional frames Control-change events until the camera settles

Do not select on-demand rendering merely because the first screenshot is static. If a shader, particle system, video texture or simulation changes continuously, the scene is animated even when the camera is not moving and needs a loop.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Convert a basic static scene to on-demand rendering

The core change is to draw once after setup and provide one coalesced redraw function for every later change. The flag prevents ten events arriving in the same browser turn from creating ten callbacks.

Rank #2
Jremreo 2-in-1 Magnetic & Clip-On Phone Cooler – Semiconductor-Powered Gaming Cell Phone Cooling Fan Radiator for iPhone/Android/iPad/Tablet – Gaming, Video Calls, Live Broadcasting, and Vlog Use
  • ENHANCED HEATSINK FOR FASTER COOLING – Built with a larger internal heatsink (1 × 1 inch), this phone radiator delivers significantly improved heat dissipation compared to standard models. The aluminum alloy thermal core accelerates cooling efficiency, helping maintain stable device performance even during long gaming or streaming sessions.
  • STRONG MAGNETIC ATTACHMENT & OPTIONAL STICKER SUPPORT – Designed with high-strength magnetic suction, this cooler securely attaches to the back of compatible devices. For phones or tablets without built-in magnets, it includes magnetic stickers to ensure firm attachment—especially useful during intense gaming or extended usage.
  • DETACHABLE CLIP WITH CLOUD CONNECTION PORT – The adjustable clip-on arm expands up to 4 inches (10 cm) and now features an added port for connecting to a cloud gaming platform, making it easier to pair with gamepads or streaming accessories. Whether clipped or magnet-mounted, it offers a reliable hold on iPhone, Android, and tablet devices.
  • 3 FAN SPEEDS WITH RGB TEMP DISPLAY – Offers three fan speed modes and a digital screen that displays real-time cooling temperature. The integrated RGB lighting reacts to temperature levels while maintaining low-noise operation, ensuring immersive gameplay, streaming, or calls without disturbance.
  • PERFECT FOR GAMING, VIDEO CALLS, AND CREATIVE USE – Simply plug in the included Type-C cable to activate cooling. Whether gaming, broadcasting live, video conferencing, or vlogging, this compact cooler helps prevent thermal throttling and keeps your device cool and responsive throughout intensive use.
const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);

const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(
  50,
  window.innerWidth / window.innerHeight,
  0.1,
  100
);
camera.position.set(0, 1, 4);

// Add meshes, lights and materials here.

let renderRequested = false;

function render() {
  renderRequested = false;
  renderer.render(scene, camera);
}

function requestRenderIfNotRequested() {
  if (renderRequested) return;
  renderRequested = true;
  requestAnimationFrame(render);
}

requestRenderIfNotRequested();

This still uses requestAnimationFrame, but only as a browser-friendly way to schedule a requested redraw. It is not an always-running loop: after the callback completes, no further frame is queued until another event calls requestRenderIfNotRequested().

Call the request function after any operation that can alter visible output. If several operations happen together, the flag coalesces them into one frame.

Wire OrbitControls to redraws

OrbitControls emits a change event when its camera view changes. Connect that event to the coalesced scheduler:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const controls = new OrbitControls(camera, renderer.domElement);
controls.addEventListener('change', requestRenderIfNotRequested);
requestRenderIfNotRequested();

With damping enabled, the camera can continue moving after the pointer or touch gesture ends. In that case, call controls.update() during each requested frame. The update can emit another change event, which schedules the next frame while inertia is still changing the view. Because scheduling is deferred through requestAnimationFrame and guarded by the flag, the change handler does not synchronously call a full render from inside controls.update().

controls.enableDamping = true;

function render() {
  renderRequested = false;
  controls.update();
  renderer.render(scene, camera);
}

function requestRenderIfNotRequested() {
  if (renderRequested) return;
  renderRequested = true;
  requestAnimationFrame(render);
}

controls.addEventListener('change', requestRenderIfNotRequested);
requestRenderIfNotRequested();

When damping settles and no further change events occur, the chain stops. If your controls implementation does not emit change events for its damping updates, use that implementation’s documented update signal rather than inventing a permanent loop; the requirement is to keep requesting frames only while the camera is changing.

Handle window resizing

A resize changes the camera projection and renderer viewport, so it must request a redraw even if every object remains fixed.

function onWindowResize() {
  const width = window.innerWidth;
  const height = window.innerHeight;

  camera.aspect = width / height;
  camera.updateProjectionMatrix();
  renderer.setSize(width, height);
  requestRenderIfNotRequested();
}

window.addEventListener('resize', onWindowResize);

Update the aspect ratio and projection matrix before the scheduled render. Otherwise the first frame after rotation or a browser resize can use stale camera geometry.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Request frames for asynchronous assets and data

Loading is another source of visible changes. A texture may arrive after the first frame; a model loader may add meshes later; a network response may update labels or geometry; and a user preference may change a material or background. In each completion handler, finish the state update and then request one redraw.

Rank #3
Black Shark FunCooler 5 Magnetic Cell Phone Cooler for Gaming, Portable Mobile Phone Cooling Fan with RGB Light, Cellphone Radiator for iPhone Magnetic Series/Android/Tablet/iPad (Black)
  • 【20W Power Ultra-Fast Cooling】The wired magnetic phone cooler utilizes high-performance Peltier element (TEC) with high heat dissipation capacity, and its heat dissipation ability lowers the temperature of the main unit by about 95℉. NOTE: Connection to power supply required for use. Power must exceed 20W for optimal performance. Data cable not included in packag.
  • 【Simple Control】The cell phone cooling fan has a built-in Type-C interface, just connect the power cord and it is ready to use. Switch between overclocking mode and silent mode with the click of a button. 12N strong magnetic force holds the phone firmly in place and prevents it from falling off.
  • 【Compact and lightweight design】The Magnetic cell phone cooler weighs only 0.18 lb in a small size, leaving more space for hand operation and being without overheavy burden.
  • 【Quiet Operation】This smartphone cooler adopts noise reduction design, and the operating noise in silent mode is only 30db, allowing you to play games or watch videos comfortably.
  • 【Vertical Air Duct Design】The vertical air duct design of FunCooler 5 smartphone cooling fan focuses on the user's actual experience and innovative ergonomic design, which provides a comfortable grip and does not dissipate heat to the hand.
loader.load('/assets/model.glb', (gltf) => {
  scene.add(gltf.scene);
  requestRenderIfNotRequested();
});

textureLoader.load('/assets/photo.jpg', (texture) => {
  material.map = texture;
  material.needsUpdate = true;
  requestRenderIfNotRequested();
});

function applyUserSetting(value) {
  material.roughness = value;
  material.needsUpdate = true;
  requestRenderIfNotRequested();
}

The paths in this example are placeholders for your own assets; the important part is that the redraw follows the state change. If an update modifies only application data that is not displayed, it does not need a render request.

Prevent duplicate callbacks and update/render recursion

Naively calling renderer.render directly from every event can create redundant work. A resize, control change and data update can arrive in the same turn, yet one frame is sufficient to display all three changes. The renderRequested flag above collapses those requests.

Be especially careful with controls. If a render function calls controls.update(), and the control’s change listener immediately calls the render function again, the update and render paths can recurse or multiply work. Schedule the next frame asynchronously and let the guard decide whether a callback is already pending. This is the coalescing pattern illustrated by the Three.js on-demand rendering guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep state mutation separate from drawing where practical. Event handlers should update camera, geometry or material state and call the scheduler; the scheduled callback should perform the update steps required for that frame and then render. That separation makes it easier to identify which event is keeping the phone busy.

When a continuous loop is the correct choice

Retain continuous rendering when pixels must change independently of user or application events. Examples include a rotating object, a timeline, particles, a physics simulation, animated shader uniforms, a video texture or a camera feed. An on-demand design would stop displaying intermediate states or require you to schedule frames manually for every simulation tick.

For genuinely animated content, Three.js advises defining the loop with renderer.setAnimationLoop(callback) rather than manually wiring requestAnimationFrame, for best compatibility. The renderer documentation states: “Applications are advised to always define the animation loop with this method and not manually with requestAnimationFrame() for best compatibility.” See the WebGLRenderer documentation for the API used by your project.

function animate(time) {
  // Advance animation or simulation using time.
  mixer.update(/* elapsed seconds */);
  renderer.render(scene, camera);
}

renderer.setAnimationLoop(animate);

Do not use setAnimationLoop to make a static scene demand-driven. It is still a continuous loop; changing the API name does not remove the repeated work. Conversely, do not disable a loop while a simulation genuinely needs each frame.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What powerPreference does—and does not do

Renderer options can include a powerPreference hint, but it is not a substitute for removing an unnecessary loop. The browser may use that hint when choosing a GPU, while your code can still submit work every frame. If the scene is static, the primary power-saving action is to stop scheduling frames until a meaningful change occurs.

Rank #4
CHONCHOW Magnetic Cell Phone Cooler, RGB Phone Cooling Fan Portable Lightweight Mobile Phone Cooling Fan, Phone Radiator with Larger Cooling Area for Phone/Tablet/IPad (with Digital displays)
  • Rapid Cooling Down: It's the same refrigeration principle as the refrigerator, not the ordinary fan cooling,it can cool down your phone in few minutes to avoid overheat and ensure stabilize your live streaming or gaming experience.
  • Universal Compatibility: This phone cooler provides two installation options – magnetic attachment and back clip fixation, making it perfect for most phone sizes. Whether you prefer the convenient magnetic snap-on or the sturdy back clip, it's designed to suit your needs.
  • Wired USB-C Powered — Requires 15W+ Adapter for Peak Performance: This is a plug-in phone cooling fan, not wireless. For maximum 32°C cooling and fast frost, use a 5V/3A or 15W+ USB-C power adapter (not included) and a 3A-rated cable. The included 2A cable works for everyday cooling.
  • Mute Engine Dissipation: Silent designing fan can efficiently emit wind from all sides, providing a stronger refrigeration effect, no disturbance to your gaming or your Vlog show.
  • Large Cooling Area & Plug and Play: About 4.65 sq. Inches extreme thermal conductive cooling area to cover the CPU and battery module, protecting your phone from blackening or sudden shut-off. Use the C-type cable(included), plug and play.

Treat the hint as a compatibility and policy decision for your application, not as a guarantee of lower temperature or longer battery life. The Three.js renderer documentation is the appropriate reference for the options supported by the renderer and version you have installed.

Renderer and version details to check before copying code

Three.js has more than one renderer API, and initialization requirements can differ. The newer Renderer API requires initialization before calling render() outside an animation loop. Confirm which renderer your project creates and which Three.js release it uses before applying that pattern; do not paste a WebGPU-oriented example into a WebGL project without checking its API.

For example, a renderer that exposes an asynchronous initializer may need a sequence like this:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const renderer = new THREE.Renderer();
await renderer.init();
renderer.render(scene, camera);

The exact constructor and initialization method are version-dependent, so consult the Renderer API documentation for your installed release. The WebGLRenderer page also notes that it uses WebGL 2 and that WebGL 1 is unsupported since Three.js r163. That is version-sensitive context; verify your dependency rather than assuming every project has the same capabilities.

Diagnose a phone that remains hot after the change

After converting a static scene, test in a controlled way: load the page, leave it untouched, interact once, resize or rotate the device, and trigger an asset or data update. Confirm that a render occurs after each visible change and that no callback continues indefinitely while idle.

  • Check for a second loop created by a component, post-processing pass or helper in addition to your main loop.
  • Look for timers, polling, physics, video, camera capture, audio analysis or large JavaScript calculations that continue after the scene stops changing.
  • Verify that an event handler is not repeatedly dispatching changes, especially when damping or camera constraints are enabled.
  • Make sure your resize listener is not firing continuously because layout code changes the canvas size in response to its own resize.
  • Test with browser developer tools or a simple render counter, then remove diagnostics from production.

A cooler phone after the loop is removed would support the render loop as a contributor, but it would not establish that it was the only cause. The available documentation gives a qualitative power warning, not a thermal benchmark for a particular handset, browser or scene.

Practical decision checklist

  1. Classify the scene: identify whether any object, shader, texture, camera, simulation or video changes without an event.
  2. If nothing changes continuously, delete the self-scheduling animation loop and render one initial frame.
  3. Create one guarded redraw scheduler using a pending flag and a single requestAnimationFrame callback.
  4. Connect control changes, resize handling, asynchronous loaders, network data and user settings to that scheduler.
  5. If damping is enabled, update controls in the scheduled callback and allow frames to continue only while change events are being emitted.
  6. If animation is real and continuous, keep a loop and define it with renderer.setAnimationLoop as recommended by Three.js.
  7. Check the renderer class and Three.js version, including initialization requirements, before adapting examples.
  8. Re-test idle behavior and investigate unrelated work if the device still heats up.

What this fix can and cannot establish

Demand-driven rendering removes unnecessary repeated rendering from a scene that is otherwise unchanged. It does not guarantee a specific battery improvement, temperature, frame rate or user experience, because those outcomes depend on the device and the rest of the application. It also does not eliminate work that is legitimately required for animation, damping, video or simulation. The reliable result you can claim is narrower: an idle static scene no longer asks the renderer for frames until a meaningful state change occurs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

JavaScriptmobile performanceon-demand renderingrequestAnimationFrameThree.jsWebGL

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.