Skip to content

Commit

Permalink
Update exhibition_booth.html
Browse files Browse the repository at this point in the history
  • Loading branch information
quez-fun authored Jun 16, 2024
1 parent 189fb54 commit 529c051
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions exhibition_booth.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@

<body>

<div>temporary mobile console area:<div id="tmpConsole"></div>
</div>

<div id="title">Exhibition Booth</div>
<div id="btn"></div>
<canvas id="canvas"></canvas>
Expand Down Expand Up @@ -107,6 +110,8 @@

function main() {

const tmpConsole = document.getElementById("tmpConsole");

let x1 = 0, x2 = 0, y1 = 0, y2 = 0, delta0, delta1;

//内容区
Expand Down Expand Up @@ -658,6 +663,8 @@
const deltaY = e.targetTouches[0].pageY - e.targetTouches[1].pageY;
delta0 = Math.sqrt(deltaX * deltaX + deltaY * deltaY);

tmpConsole.innerText = delta0;

break;

}
Expand Down Expand Up @@ -710,6 +717,7 @@
radius -= (delta1-delta0);
radius = Math.min(60, Math.max(1, radius));

tmpConsole.innerText = radius;
cameraPosition[2] = radius;
target = [0, 0, 0];
var cameraMatrix = m4.lookAt(cameraPosition, target, up, m4.identity());
Expand Down

0 comments on commit 529c051

Please sign in to comment.