Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • A AR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GeoVistoogsi
  • AR
  • Merge requests
  • !74
An error occurred while fetching the assigned milestone of the selected merge_request.

Update public/index.html

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Percen requested to merge 21pesi1bif-master-patch-26759 into master 4 months ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1
  • Percen @21pesi1bif merged 4 months ago

    merged

  • Percen @21pesi1bif mentioned in commit eef6999a 4 months ago

    mentioned in commit eef6999a

  • Loading
  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • master (base)

and
  • latest version
    0e320470
    1 commit, 4 months ago

1 file
+ 15
- 16

    Preferences

    File browser
    Compare changes
public/index.html
+ 15
- 16
  • View file @ 0e320470

  • Edit in single-file editor

  • Open in Web IDE


@@ -30,7 +30,6 @@
@@ -30,7 +30,6 @@
let currentModel = null;
let currentModel = null;
let scene, camera, hitTestSource;
let scene, camera, hitTestSource;
let hitTestResults = [];
let hitTestResults = [];
let isSwipe = false;
async function activateXR() {
async function activateXR() {
const canvas = document.createElement('canvas');
const canvas = document.createElement('canvas');
@@ -101,30 +100,30 @@
@@ -101,30 +100,30 @@
}
}
// Touch-Logik zur Unterscheidung zwischen Swipe und Tap
// Touch-Logik zur Unterscheidung zwischen Swipe und Tap
let startX = 0, endX = 0, isSwiping = false;
let startX = 0, startY = 0, endX = 0, endY = 0;
const threshold = 50;
const swipeThreshold = 50; // Minimale Swipe-Distanz
document.body.addEventListener('touchstart', (e) => {
document.body.addEventListener('touchstart', (e) => {
startX = e.touches[0].clientX;
startX = e.touches[0].clientX;
isSwiping = false;
startY = e.touches[0].clientY;
});
});
document.body.addEventListener('touchmove', (e) => {
document.body.addEventListener('touchend', (e) => {
const moveX = e.touches[0].clientX;
endX = e.changedTouches[0].clientX;
if (Math.abs(moveX - startX) > threshold) {
endY = e.changedTouches[0].clientY;
isSwiping = true;
if (moveX > startX) {
const deltaX = endX - startX;
 
const deltaY = endY - startY;
 
 
// Unterscheidung zwischen Swipe und Tap
 
if (Math.abs(deltaX) > swipeThreshold) {
 
if (deltaX > 0) {
switchModel('next');
switchModel('next');
} else {
} else {
switchModel('previous');
switchModel('previous');
}
}
startX = moveX; // Verhindert mehrfaches Swipen bei einem langen Touchmove
} else if (Math.abs(deltaY) < swipeThreshold) {
}
placeModel(); // Nur platzieren, wenn keine große Bewegung erkannt wurde
});
document.body.addEventListener('touchend', () => {
if (!isSwiping) {
placeModel();
}
}
});
});
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: 21pesi1bif-master-patch-26759

Menu

Explore Projects Groups Snippets

Dies ist die Gitlab-Instanz des Transferportals der Hochschule für Technik Stuttgart. Hier geht es zurück zum Portal