Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Jan 11, 2025
1 parent 1c8a795 commit eb27c6a
Showing 1 changed file with 30 additions and 18 deletions.
48 changes: 30 additions & 18 deletions demos/web-editor/web/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,36 @@ class App {
scene.canvas.addEventListener("contextmenu", (event) => {
event.preventDefault();
});
scene.canvas.addEventListener("pointerdown", (event) => {
event.preventDefault();
if (event.button === 0) {
scene.beginTranslate(event);
} else if (event.button === 2) {
scene.beginRotate(event);
}
}, { passive: false });
window.addEventListener("pointerup", (event) => {
event.preventDefault();
scene.endDrag();
}, { passive: false });
window.addEventListener("pointermove", (event) => {
event.preventDefault();
if (scene.drag(event)) {
requestRedraw();
}
}, { passive: false });
scene.canvas.addEventListener(
"pointerdown",
(event) => {
event.preventDefault();
if (event.button === 0) {
scene.beginTranslate(event);
} else if (event.button === 2) {
scene.beginRotate(event);
}
},
{ passive: false },
);
window.addEventListener(
"pointerup",
(event) => {
event.preventDefault();
scene.endDrag();
},
{ passive: false },
);
window.addEventListener(
"pointermove",
(event) => {
event.preventDefault();
if (scene.drag(event)) {
requestRedraw();
}
},
{ passive: false },
);
this.scene = scene;

// Hot-patch the gyroid script to be eval (instead of exec) flavored
Expand Down

0 comments on commit eb27c6a

Please sign in to comment.