diff --git a/public/models/untitled.glb b/public/models/untitled.glb new file mode 100644 index 0000000..afd7353 Binary files /dev/null and b/public/models/untitled.glb differ diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 94f5f50..9a27e34 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -1,9 +1,9 @@ import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import { PreloadAllModules, provideRouter, withPreloading } from '@angular/router'; import { routes } from './app.routes'; import { provideHttpClient } from '@angular/common/http'; export const appConfig: ApplicationConfig = { - providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes), provideHttpClient()] + providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes,withPreloading(PreloadAllModules)), provideHttpClient()] }; diff --git a/src/app/components/consent/consent.component.ts b/src/app/components/consent/consent.component.ts index d686adb..3f529e6 100644 --- a/src/app/components/consent/consent.component.ts +++ b/src/app/components/consent/consent.component.ts @@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; -import { ArLoggerService } from '../../services/ar-logger.service'; @Component({ selector: 'app-consent', @@ -17,7 +16,6 @@ export class ConsentComponent implements OnInit { constructor( private router: Router, - private logger: ArLoggerService ) {} ngOnInit(): void { @@ -26,8 +24,18 @@ export class ConsentComponent implements OnInit { if (this.isIosDevice) { console.log("iOS device detected. Study will be disabled."); } + this.preloadTestSuite(); } + preloadTestSuite(): void { + import('../test-suite/test-suite.component') + .then(() => { + }) + .catch(err => { + }); + } + + isIOS(): boolean { const win = window as any; return /iPad|iPhone|iPod/.test(navigator.userAgent) && !win.MSStream; @@ -41,7 +49,6 @@ export class ConsentComponent implements OnInit { startTestSuite(): void { if (this.consentGiven && !this.isIosDevice) { - this.logger.initializeSession(); this.router.navigate(['/test-suite']); } } diff --git a/src/app/components/test-suite/assessments/spatial-position-assessment/spatial-position-assessment.component.html b/src/app/components/test-suite/assessments/spatial-position-assessment/spatial-position-assessment.component.html index 4ccea7e..5518755 100644 --- a/src/app/components/test-suite/assessments/spatial-position-assessment/spatial-position-assessment.component.html +++ b/src/app/components/test-suite/assessments/spatial-position-assessment/spatial-position-assessment.component.html @@ -2,7 +2,7 @@