-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deployed functions, working 3d model
- Loading branch information
1 parent
ae666c8
commit a5d6e9a
Showing
17 changed files
with
272 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { NavOptions, createAnimation } from '@ionic/core'; | ||
|
||
interface TransitionOptions extends NavOptions { | ||
progressCallback?: (ani: Animation | undefined) => void; | ||
baseEl: any; | ||
enteringEl: HTMLElement; | ||
// leavingEl: HTMLElement | undefined; | ||
leavingEl: HTMLElement; | ||
} | ||
|
||
function getIonPageElement(element: HTMLElement) { | ||
if (element.classList.contains('ion-page')) { | ||
return element; | ||
} | ||
|
||
const ionPage = element.querySelector( | ||
':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs' | ||
); | ||
if (ionPage) { | ||
return ionPage; | ||
} | ||
|
||
return element; | ||
} | ||
|
||
export function pageTransition(_: HTMLElement, opts: TransitionOptions) { | ||
const DURATION = 600; | ||
|
||
const rootTransition = createAnimation() | ||
.duration(opts.duration || DURATION) | ||
.easing('cubic-bezier(0.3,0,0.66,1)'); | ||
|
||
const enteringPage = createAnimation() | ||
.addElement(getIonPageElement(opts.enteringEl)) | ||
.beforeRemoveClass('ion-page-invisible'); | ||
|
||
const leavingPage = createAnimation().addElement( | ||
getIonPageElement(opts.leavingEl) | ||
); | ||
|
||
if (opts.direction === 'forward') { | ||
enteringPage.fromTo('transform', 'translateX(100%)', 'translateX(0)'); | ||
leavingPage.fromTo('opacity', '1', '0.25'); | ||
} else { | ||
leavingPage.fromTo('transform', 'translateX(0)', 'translateX(100%)'); | ||
enteringPage.fromTo('opacity', '0.25', '1'); | ||
} | ||
|
||
rootTransition.addAnimation(enteringPage); | ||
rootTransition.addAnimation(leavingPage); | ||
return rootTransition; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,37 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { Component } from '@angular/core'; | ||
import { RouterLink, RouterLinkActive } from '@angular/router'; | ||
import { IonApp, IonSplitPane, IonMenu, IonContent, IonList, IonListHeader, IonNote, IonMenuToggle, IonItem, IonIcon, IonLabel, IonRouterOutlet } from '@ionic/angular/standalone'; | ||
import { IonApp, IonMenu, IonContent, IonList, IonListHeader, IonNote, IonMenuToggle, IonItem, IonIcon, IonLabel, IonRouterOutlet } from '@ionic/angular/standalone'; | ||
import { addIcons } from 'ionicons'; | ||
import { mailOutline, mailSharp, paperPlaneOutline, paperPlaneSharp, heartOutline, heartSharp, archiveOutline, archiveSharp, trashOutline, trashSharp, warningOutline, warningSharp, bookmarkOutline, bookmarkSharp } from 'ionicons/icons'; | ||
import { LoadingComponent } from './loading/loading.component'; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: 'app.component.html', | ||
styleUrls: ['app.component.scss'], | ||
standalone: true, | ||
imports: [RouterLink, RouterLinkActive, CommonModule, IonApp, IonSplitPane, IonMenu, IonContent, IonList, IonListHeader, IonNote, IonMenuToggle, IonItem, IonIcon, IonLabel, IonRouterOutlet], | ||
imports: [RouterLink, RouterLinkActive, CommonModule, IonApp, IonMenu, IonContent, IonList, IonListHeader, IonNote, IonMenuToggle, IonItem, IonIcon, IonLabel, IonRouterOutlet, LoadingComponent], | ||
}) | ||
export class AppComponent { | ||
// loading = true; | ||
// private router = inject(Router); | ||
public appPages = [ | ||
{title:'Home', url: '/home', icon: 'mail'}, | ||
{ title:'Home', url: '/home', icon: 'mail' }, | ||
{ title: 'About', url: '/about', icon: 'mail' }, | ||
{ title: 'Projects', url: '/projects', icon: 'mail' }, | ||
{ title: 'Contact', url: '/contact', icon: 'mail' }, | ||
|
||
{ title: 'Inbox', url: '/folder/inbox', icon: 'mail' }, | ||
{ title: 'Outbox', url: '/folder/outbox', icon: 'paper-plane' }, | ||
{ title: 'Favorites', url: '/folder/favorites', icon: 'heart' }, | ||
{ title: 'Archived', url: '/folder/archived', icon: 'archive' }, | ||
{ title: 'Trash', url: '/folder/trash', icon: 'trash' }, | ||
{ title: 'Spam', url: '/folder/spam', icon: 'warning' }, | ||
]; | ||
public labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders']; | ||
{ title: 'Contact', url: '/contact', icon: 'mail' } | ||
] | ||
|
||
constructor() { | ||
addIcons({ mailOutline, mailSharp, paperPlaneOutline, paperPlaneSharp, heartOutline, heartSharp, archiveOutline, archiveSharp, trashOutline, trashSharp, warningOutline, warningSharp, bookmarkOutline, bookmarkSharp }); | ||
|
||
// this.router.events.subscribe(event => { | ||
// if (event instanceof NavigationStart) { | ||
// this.loading = true; | ||
// } else if (event instanceof NavigationEnd) { | ||
// this.loading = false; | ||
// } | ||
// }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.