Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
画面のパーセントで renderer.setSize 計算を設定する方法はありますか?
たとえば、フレーム セットをデバイスの幅の 80%、デバイスの高さの 80% にしたいのですが、それは可能ですか?
まず、 :window.innerWidthとを使用してデバイスの高さを取得する必要がありwindow.innerHeightます。
window.innerWidth
window.innerHeight
次に、レンダラーのサイズを次のように設定するときに、目的の倍率を適用します。
renderer.setSize(window.innerWidth * 0.8, window.innerHeight * 0.8);
この助けを願っています