跳到正文
Shane Brumback· 来源· @ShaneBrumback · X·· 3 小时前AI 评分55
正文 · 原文

AI-built Three.js game running hot on phones? Check pixel ratio. Agents often pass devicePixelRatio straight in, so a 3x screen renders 9x the pixels. Clamp it: renderer.setPixelRatio(Math.min(devicePixelRatio, 2)). More: https://www.shanebrumback.com/?v=20261026

来源:Shane Brumback · x.com