-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from vatro/fix-eslint-rest
Fix remaining ESLint warnings, leave those with issues. See #170 for more details. Current Status: svelte-check: no errors / warnings / hints lint: 0 errors, 3 warnings The remaining 3 warnings should be fixed by: #135, #175 and #176
- Loading branch information
Showing
67 changed files
with
2,147 additions
and
1,558 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 was deleted.
Oops, something went wrong.
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,3 @@ | ||
// Mimic SvelteKit's `$app/environment` foor non-SSR outputs in RollUp only and Vite only setups. | ||
|
||
export const browser = true |
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,67 @@ | ||
import type { Scene, Object3D } from "three" | ||
import type { SvelthreeAnimationFunction, SvelthreeAnimation } from "../types/types-extra" | ||
import SvelthreeAnimationManager from "./SvelthreeAnimationManager" | ||
import SvelthreeAnimationObjectFactory from "./SvelthreeAnimationObjectFactory" | ||
|
||
export default class SvelthreeAni { | ||
private ani_obj_factory: SvelthreeAnimationObjectFactory | ||
private ani_manager: SvelthreeAnimationManager | ||
|
||
constructor( | ||
private scene: Scene, | ||
private foo: Object3D, | ||
private ani_fn: SvelthreeAnimationFunction, | ||
private aniauto: boolean | ||
) { | ||
this.create_ani_manager() | ||
} | ||
|
||
private create_ani_manager(): void { | ||
//if (verbose && log_dev) console.debug(...c_dev(c_name, "createAnimationManager!")) | ||
|
||
if (!this.ani_manager) { | ||
this.ani_obj_factory = new SvelthreeAnimationObjectFactory(this.ani_fn) | ||
this.ani_manager = new SvelthreeAnimationManager(this.ani_obj_factory, this.aniauto, this.foo, this.scene) | ||
} | ||
} | ||
|
||
public onCurrentSceneActiveChange(currentSceneActive: boolean): void { | ||
this.ani_manager ? this.ani_manager.handleCurrentSceneStatus(currentSceneActive) : null | ||
} | ||
|
||
public getAnimation(): SvelthreeAnimation { | ||
if (this.ani_manager) { | ||
return this.ani_manager.getAnimation() | ||
} else { | ||
console.error("SVELTHREE > SvelthreeAnimation > getAnimation : missing SvelthreeAnimationManager!", { | ||
ani_manager: this.ani_manager | ||
}) | ||
|
||
return undefined | ||
} | ||
} | ||
|
||
public destroyAnimation(): void { | ||
//if (verbose && log_dev) console.debug(...c_dev(c_name, "destroyAnimation!")) | ||
if (this.ani_manager) { | ||
this.ani_manager.destroyAnimation() | ||
} else { | ||
if (this.ani_fn) { | ||
console.error( | ||
"SVELTHREE > SvelthreeAnimation > destroyAnimation : missing SvelthreeAnimationManager!", | ||
{ ani_manager: this.ani_manager } | ||
) | ||
} | ||
} | ||
} | ||
|
||
public startAnimation(): void { | ||
if (this.ani_manager) { | ||
this.ani_manager.startAnimation() | ||
} else { | ||
console.error("SVELTHREE > SvelthreeAnimation > startAni : missing SvelthreeAnimationManager!", { | ||
ani_manager: this.ani_manager | ||
}) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.