Skip to content

Commit

Permalink
[Examples] Integer-texture (sand) Remove the quad mouse movement. (#6032
Browse files Browse the repository at this point in the history
)

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
  • Loading branch information
mvaligursky and Martin Valigursky committed Feb 2, 2024
1 parent 90d4f8b commit 9be9613
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions examples/src/examples/graphics/integer-textures.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ async function example({ canvas, data, deviceType, assetPath, files, glslangPath
mouseState = 0;
});

const lookRange = 1.5;
const mouseRay = new pc.Ray();
const planePoint = new pc.Vec3();
const mousePos = new pc.Vec2();
Expand All @@ -336,13 +335,6 @@ async function example({ canvas, data, deviceType, assetPath, files, glslangPath
mousePos.x = x;
mousePos.y = y;

const centerX = app.graphicsDevice.width / 2;
const centerY = app.graphicsDevice.height / 2;

const xOffset = (x - centerX) / app.graphicsDevice.width;
const yOffset = (y - centerY) / app.graphicsDevice.height;

cameraEntity.lookAt(xOffset * lookRange, 5 - yOffset * lookRange, 0);
if (cameraEntity.camera) {
cameraEntity.camera.screenToWorld(event.x, event.y, cameraEntity.camera.farClip, mouseRay.direction);
mouseRay.origin.copy(cameraEntity.getPosition());
Expand Down

0 comments on commit 9be9613

Please sign in to comment.