From f77dedf28b38c2f1700cb69ca9c610d416ac582d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=BB=D0=B0=D0=B2=D1=80=D0=B5=D0=B4=20=7C=20Glavred?= Date: Tue, 29 Dec 2020 00:01:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BE=D1=82=20=D0=93=D0=BB=D0=B0=D0=B2=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=D0=B0=20=D0=93=D0=B8=D1=82=D0=96=D0=A1=20|=20Chang?= =?UTF-8?q?es=20of=20GitJS=20Glavred?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 0000 | 2 +- 🎬.js | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/0000 b/0000 index bfcc0fd..28d2ee2 100644 --- a/0000 +++ b/0000 @@ -1,5 +1,5 @@ Π ΠΈΡΠΎΠ²Π°Ρ‚Π΅Π»ΡŒ -0.7.0 +0.7.1 https://git.opengamestudio.org/PuCOBATEJlb/PuCOBATEJlb /base64js.min.js diff --git a/🎬.js b/🎬.js index 0b140db..d9142a1 100644 --- a/🎬.js +++ b/🎬.js @@ -70,11 +70,15 @@ ΠΌΠΈΡ€.ΠΊΠ°ΠΌΠ΅Ρ€Π°.updateProjectionMatrix(); ΠΌΠΈΡ€.Ρ€ΠΈΡΠΎΠ²Π°Ρ‚Π΅Π»ΡŒ.setSize(ΡˆΠΈΡ€ΠΈΠ½Π°, высота); - var Ρ€Π°Π·ΠΌΠ΅Ρ€ = ΠΌΠΈΡ€.ΠΌΠ°ΡΡˆΡ‚Π°Π± * 100; - ΠΌΠΈΡ€.ΠΊΠ°Π½Π²Π°.style = ` + /* position: absolute; left: 0; top: 0; +*/ + + var Ρ€Π°Π·ΠΌΠ΅Ρ€ = ΠΌΠΈΡ€.ΠΌΠ°ΡΡˆΡ‚Π°Π± * 100; + ΠΌΠΈΡ€.ΠΊΠ°Π½Π²Π°.style = ` + max-width: ${Ρ€Π°Π·ΠΌΠ΅Ρ€}%; max-height: ${Ρ€Π°Π·ΠΌΠ΅Ρ€}%; width: ${Ρ€Π°Π·ΠΌΠ΅Ρ€}%; @@ -109,7 +113,10 @@ height: ${Ρ€Π°Π·ΠΌΠ΅Ρ€}%; ΠΌΠΈΡ€.тСкстурщик = new THREE.TextureLoader(); ΠΌΠΈΡ€.ΠΌΠ°ΡΡˆΡ‚Π°Π± = 1; ΠΌΠΈΡ€.ΠΊΠ°Π½Π²Π° = document.createElement("canvas"); - document.body.prepend(ΠΌΠΈΡ€.ΠΊΠ°Π½Π²Π°); + var Ρ€ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒ = document.createElement("div"); + Ρ€ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒ.appendChild(ΠΌΠΈΡ€.ΠΊΠ°Π½Π²Π°); + Ρ€ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒ.style = "overflow: auto; width: 100%; height: 100%; max-width: 100%; max-height: 100%;"; + document.body.prepend(Ρ€ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒ); ΠΌΠΈΡ€.Ρ€ΠΈΡΠΎΠ²Π°Ρ‚Π΅Π»ΡŒ = new THREE.WebGLRenderer({canvas: ΠΌΠΈΡ€.ΠΊΠ°Π½Π²Π°, antialias: true}); };