diff --git a/.eslintignore b/.eslintignore index 40e66fd..edd27e6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -17,3 +17,6 @@ yarn.lock /src/lib/components-check /src/lib/components-internal-check generate_svelthree_components.js + +# Ignore Error tests +/src/routes/error_tests diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 20fff36..67ca2f8 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -7,24 +7,31 @@ module.exports = { plugins: ["svelte3", "@typescript-eslint"], //(default) check *.svelte and *.ts files - // ignorePatterns: ["*.cjs"], + ignorePatterns: ["*.cjs"], // check only *.svelte files - ignorePatterns: ["*.cjs", "*.ts"], + //ignorePatterns: ["*.cjs", "*.ts"], overrides: [ { files: ["*.svelte"], - processor: "svelte3/svelte3", + processor: "svelte3/svelte3" // checking specific rules (set to "off" / "error") // errors only - rules: { + /* rules: { "no-inferrable-types": "error", "no-undef": "error", "no-empty": "error", "no-case-declarations": "error", "no-prototype-builtins": "error" + } */ + }, + // see: https://typescript-eslint.io/docs/linting/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors + { + files: ["*.ts", "*.mts", "*.cts", "*.tsx", "*.svelte"], + rules: { + "no-undef": "off" } } ], diff --git a/.gitignore b/.gitignore index 67cbd7f..2f5bbcc 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,10 @@ node_modules /generator /src/lib/components-check /src/lib/components-internal-check -generate_svelthree_components.js \ No newline at end of file +generate_svelthree_components.js + +# any routes +src/routes/ + +# app.html +src/app.html \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index b61947c..31cb27e 100644 --- a/.prettierrc +++ b/.prettierrc @@ -8,5 +8,18 @@ "endOfLine": "crlf", "pluginSearchDirs": ["."], "bracketSameLine": false, - "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] + "overrides": [ + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + }, + { + "files": "src/lib/types/*.ts", + "options": { + "printWidth": 160 + } + } + ] } diff --git a/postprocess_package.js b/postprocess_package.js index 352fed4..6342da8 100644 --- a/postprocess_package.js +++ b/postprocess_package.js @@ -14,12 +14,14 @@ const replace_tasks = [ //regex: /get mat\(\).*}>>;/s, //regex: /get mat\(\).*?};/s, regex: /get mat\(\).*?>;/s, //opt2 - replacement: `get mat(): MeshProps['mat'];` + //replacement: `get mat(): MeshProps['mat'];` + replacement: `get mat(): PropMat;` }, { //regex: /set mat\(.*}>>\);/s, regex: /set mat\(.*?\);/s, // opt2 - replacement: `set mat(_: MeshProps['mat']);` + //replacement: `set mat(_: MeshProps['mat']);` + replacement: `set mat(_: PropMat);` } ] }, @@ -30,12 +32,14 @@ const replace_tasks = [ //regex: /get mat\(\).*}>>;/s, //regex: /get mat\(\).*?};/s, regex: /get mat\(\).*?>;/s, //opt2 - replacement: `get mat(): PointsProps['mat'];` + //replacement: `get mat(): PointsProps['mat'];` + replacement: `get mat(): PropMat;` }, { //regex: /set mat\(.*}>>\);/s, regex: /set mat\(.*?\);/s, // opt2 - replacement: `set mat(_: PointsProps['mat']);` + //replacement: `set mat(_: PointsProps['mat']);` + replacement: `set mat(_: PropMat);` } ] } @@ -164,7 +168,7 @@ const get_process_comments_fn = (file_path) => { for (let [prop_name, comment] of comments_map) { const str_setter = `set ${prop_name}` - const regex_setter = new RegExp("\\b" + str_setter + "\\b") + const regex_setter = new RegExp(str_setter) const test_setter = content.match(regex_setter) const acc_comment = comment.replace( `/**`, @@ -172,7 +176,7 @@ const get_process_comments_fn = (file_path) => { ) if (test_setter) { - new_content = new_content.replace(`set ${prop_name}`, `${acc_comment}\n\tset ${prop_name}`) + new_content = new_content.replace(`set ${prop_name}(_`, `${acc_comment}\n\tset ${prop_name}(_`) } else { const str_getter = `get ${prop_name}` const regex_getter = new RegExp("\\b" + str_getter + "\\b") @@ -201,6 +205,8 @@ const get_process_comments_fn = (file_path) => { // --- ENTRY POINT --- +const schedule_code_replacement_tasks = true + /** * - Fix generic `mat` shorthand property type when using accessors: * - Replace `mat` accessors type definitions (accessor getter and setter) -> only `Mesh` and `Points`, @@ -217,10 +223,12 @@ const do_postprocess = async () => { console.log("🤖 SVELTHREE > post-processing package: started...") // schedule code replacement tasks - console.log("🤖 SVELTHREE > post-processing package: scheduling replacement tasks...") - for (let i = 0; i < replace_tasks.length; i++) { - const task = replace_tasks[i] - fns.push(exec_replace_task(task)) + if (schedule_code_replacement_tasks) { + console.log("🤖 SVELTHREE > post-processing package: scheduling replacement tasks...") + for (let i = 0; i < replace_tasks.length; i++) { + const task = replace_tasks[i] + fns.push(exec_replace_task(task)) + } } // schedule accessors-comments optimization in `d.ts` files diff --git a/src/lib/$app/env/index.ts b/src/lib/$app/env/index.ts deleted file mode 100644 index 7111125..0000000 --- a/src/lib/$app/env/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Mimic SvelteKit's `$app/env` foor non-SSR outputs in RollUp only and Vite only setups. - -export const browser = true diff --git a/src/lib/$app/environment/index.ts b/src/lib/$app/environment/index.ts new file mode 100644 index 0000000..b267124 --- /dev/null +++ b/src/lib/$app/environment/index.ts @@ -0,0 +1,3 @@ +// Mimic SvelteKit's `$app/environment` foor non-SSR outputs in RollUp only and Vite only setups. + +export const browser = true diff --git a/src/lib/ani/SvelthreeAni.ts b/src/lib/ani/SvelthreeAni.ts new file mode 100644 index 0000000..2e7ed8b --- /dev/null +++ b/src/lib/ani/SvelthreeAni.ts @@ -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 + }) + } + } +} diff --git a/src/lib/ani/SvelthreeAnimation.ts b/src/lib/ani/SvelthreeAnimation.ts deleted file mode 100644 index 679de94..0000000 --- a/src/lib/ani/SvelthreeAnimation.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { Scene, Object3D } from "three" -import type { SvelthreeAnimationFunction } from "../types/types-extra" -import SvelthreeAnimationManager from "./SvelthreeAnimationManager" -import SvelthreeAnimationProp from "./SvelthreeAnimationProp" - -export default class SvelthreeAnimation { - animationEnabled: boolean - animation: any - aniauto: boolean - obj: Object3D - scene: Scene - aniManager: SvelthreeAnimationManager - - constructor(scene: Scene, obj: Object3D, animation: SvelthreeAnimationFunction, aniauto: boolean) { - this.scene = scene - this.obj = obj - this.animation = animation - this.aniauto = aniauto - - this.createAnimationManager() - } - - private createAnimationManager(): void { - //if (verbose && log_dev) console.debug(...c_dev(c_name, "createAnimationManager!")) - - if (!this.aniManager) { - this.animation = new SvelthreeAnimationProp(this.animation) - this.aniManager = new SvelthreeAnimationManager(this.animation, this.aniauto, this.obj, this.scene) - } - } - - public onCurrentSceneActiveChange(currentSceneActive: boolean): void { - this.aniManager ? this.aniManager.handleCurrentSceneStatus(currentSceneActive) : null - } - - public getAnimation(): any { - if (this.aniManager) { - return this.aniManager.getAnimation() - } else { - console.error("SVELTHREE > SvelthreeAnimation > getAnimation : missing SvelthreeAnimationManager!", { - aniManager: this.aniManager - }) - - return undefined - } - } - - public destroyAnimation(): void { - //if (verbose && log_dev) console.debug(...c_dev(c_name, "destroyAnimation!")) - if (this.aniManager) { - this.aniManager.destroyAnimation() - } else { - if (this.animation && this.animationEnabled) { - console.error( - "SVELTHREE > SvelthreeAnimation > destroyAnimation : missing SvelthreeAnimationManager!", - { aniManager: this.aniManager } - ) - } - } - } - - public startAni(): void { - if (this.aniManager) { - this.aniManager.startAni() - } else { - console.error("SVELTHREE > SvelthreeAnimation > startAni : missing SvelthreeAnimationManager!", { - aniManager: this.aniManager - }) - } - } -} diff --git a/src/lib/ani/SvelthreeAnimationManager.ts b/src/lib/ani/SvelthreeAnimationManager.ts index a9c5ca1..b05a15e 100644 --- a/src/lib/ani/SvelthreeAnimationManager.ts +++ b/src/lib/ani/SvelthreeAnimationManager.ts @@ -1,176 +1,129 @@ +import type SvelthreeAnimationObjectFactory from "./SvelthreeAnimationObjectFactory" import type { Object3D, Scene } from "three" -import SvelthreeAnimationProp from "./SvelthreeAnimationProp" -import { verbose_mode } from "../utils/SvelthreeLogger" +import type { SvelthreeAnimation } from "../types/types-extra" export default class SvelthreeAnimationManager { - // TODO (ESLint -> 'no-explicit-any') see https://github.com/vatro/svelthree/issues/165 - animation: SvelthreeAnimationProp | any - aniauto: boolean - obj: Object3D - scene: Scene + /** Generated animation-`Object Literal` (_interface `SvelthreeAnimation`_): result of `this.ani_obj_factory.create(...)`. */ + ani_obj: SvelthreeAnimation - // TODO (ESLint -> 'no-explicit-any') see https://github.com/vatro/svelthree/issues/165 - constructor(animation: SvelthreeAnimationProp | any, aniauto: boolean, obj: Object3D, scene: Scene | null) { - this.animation = animation - this.aniauto = aniauto - this.obj = obj - this.scene = scene - } + constructor( + private ani_obj_factory: SvelthreeAnimationObjectFactory, + private aniauto: boolean, + private foo: Object3D, + private scene: Scene | null + ) {} - handleCurrentSceneStatus(currentSceneActive: boolean) { + public handleCurrentSceneStatus(currentSceneActive: boolean): void { if (currentSceneActive) { - if (verbose_mode()) { - console.debug( - "SVELTHREE > SvelthreeAnimationManager > handleCurrentSceneStatus : currentSceneActive = true!" - ) - } + console.debug( + "SVELTHREE > SvelthreeAnimationManager > handleCurrentSceneStatus : currentSceneActive = true!" + ) if (this.aniauto) { - if (verbose_mode()) { - console.debug( - "SVELTHREE > SvelthreeAnimationManager > handleCurrentSceneStatus : this.aniauto = true!" - ) - } - this.handleSceneActive() + console.debug("SVELTHREE > SvelthreeAnimationManager > handleCurrentSceneStatus : this.aniauto = true!") + this.handle_scene_active() } } else { - if (verbose_mode()) { - console.debug( - "SVELTHREE > SvelthreeAnimationManager > handleCurrentSceneStatus : currentSceneActive = false!" - ) - } - this.handleSceneInActive() + console.debug( + "SVELTHREE > SvelthreeAnimationManager > handleCurrentSceneStatus : currentSceneActive = false!" + ) + this.handle_scene_inactive() } } // active / reactivated - handleSceneActive() { - if (verbose_mode()) { - console.debug("SVELTHREE > SvelthreeAnimationManager > handleSceneActive!") - } + private handle_scene_active(): void { + console.debug("SVELTHREE > SvelthreeAnimationManager > handle_scene_active!") // check if animation has been initiated, if so try to execute 'onSceneReactivated'... - if (this.animationInitiated() === true) { - this.tryOnSceneReactivated() + if (this.ani_obj) { + this.try_on_scene_reactivated() } else { // ... otherwise initate / start it (aniauto is true) - this.initiateAnimation() + this.initiate_animation() } } /*eslint @typescript-eslint/no-explicit-any: ["error", { "ignoreRestArgs": true }]*/ - initiateAnimation(...args: any[]): void { - //if (verbose_mode()) console.debug("SVELTHREE > SvelthreeAnimationManager > initiateAnimation!") + private initiate_animation(...args: any[]): void { + console.debug("SVELTHREE > SvelthreeAnimationManager > initiate_animation!") // if animation is a function it has not been initiated / started yet (otherwise object) if (this.scene) { if (!this.scene.userData.isActive) { console.warn( - "SVELTHREE > SvelthreeAnimationManager : initiateAnimation : You're about to initiate an animation in an inactive Scene!" + "SVELTHREE > SvelthreeAnimationManager : initiate_animation : You're about to initiate an animation in an inactive Scene!" ) } - } else if (this.scene === null && (this.obj as Scene).isScene) { - if (!(this.obj as Scene).userData.isActive) { + } else if (this.scene === null && (this.foo as Scene).isScene) { + if (!(this.foo as Scene).userData.isActive) { console.warn( - "SVELTHREE > SvelthreeAnimationManager : initiateAnimation : You're about to initiate an animation in an inactive NESTED Scene!" + "SVELTHREE > SvelthreeAnimationManager : initiate_animation : You're about to initiate an animation in an inactive NESTED Scene!" ) } } - this.animation = this.animation.initiate(this.obj, args) + this.ani_obj = this.ani_obj_factory.create(this.foo, args) + + console.debug( + "SVELTHREE > SvelthreeAnimationManager > initiate_animation : after initialization: this.ani_obj:", + this.ani_obj + ) - if (verbose_mode()) - console.debug( - "SVELTHREE > SvelthreeAnimationManager > initiateAnimation : after initialization: this.animation:", - this.animation - ) try { - this.animation.onStart() + this.ani_obj.onStart() } catch (error) { throw new Error("SVELTHREE Exception, " + error) } } - tryOnSceneReactivated(): void { - this.animation.onSceneReactivated - ? this.animation.onSceneReactivated() + private try_on_scene_reactivated(): void { + Object.prototype.hasOwnProperty.call(this.ani_obj, "onSceneReactivated") + ? this.ani_obj.onSceneReactivated() : console.warn( - "SVELTHREE > SvelthreeAnimationManager > tryOnSceneReactivated : Animation couldn't be started, missing 'onSceneReactivated' method!" + "SVELTHREE > SvelthreeAnimationManager > try_on_scene_reactivated : 'onSceneReactivated' property is missing in 'SvelthreeAnimation'-Object! Please ensure this is correct.", + this.ani_obj ) } // inactive / deactivated - handleSceneInActive() { + private handle_scene_inactive(): void { // check if animation has been initiated // if it has been initated, try to execute 'onSceneDeactivated' - if (this.animationInitiated() === true) { - this.tryOnSceneDeactivated() - } + this.ani_obj + ? this.try_on_scene_deactivated() + : console.debug( + "SVELTHREE > SvelthreeAnimationManager > handle_scene_inactive : 'SvelthreeAnimation'-Object not available!" + ) } - tryOnSceneDeactivated(): void { - this.animation.onSceneDeactivated - ? this.animation.onSceneDeactivated() + private try_on_scene_deactivated(): void { + Object.prototype.hasOwnProperty.call(this.ani_obj, "onSceneDeactivated") + ? this.ani_obj.onSceneDeactivated() : console.warn( - "SVELTHREE > SvelthreeAnimationManager > tryOnSceneDeactivated : Animation couldn't be stopped, missing 'onSceneDeactivated' method!" + "SVELTHREE > SvelthreeAnimationManager > try_on_scene_deactivated : 'onSceneDeactivated' property is missing in 'SvelthreeAnimation'-Object! Please ensure this is correct.", + this.ani_obj ) } - startAni(): void { - if (this.animationInitiated() === false) { - this.initiateAnimation() - } else { - console.warn( - "SVELTHREE > SvelthreeAnimationManager > startAni : animation has already been initiated! 'animation': ", - this.animation - ) - } - } - - destroyAnimation(): void { - if (this.animation.prototype.hasOwnProperty.call(this.animation, "onDestroy")) { - this.animation.onDestroy() + public startAnimation(): void { + if (!this.ani_obj) { + this.initiate_animation() } else { - console.warn( - "SVELTHREE > SvelthreeAnimationManager > Unable to find 'onDestroy' method in 'animation': This may be a BUG in REPL and may be safe to ignore. Please check if your animation is running as intended and consider checking it in another environment. Contributions on this issue are welcome! : this.animation", - this.animation - ) - } - } - - animationInitiated(): boolean { - if (this.animationIsAnimationProp()) { - return false - } else if (this.animationIsObject()) { - return true - } else { - console.warn("SVELTHREE > SvelthreeAnimationManager > animationInitiated? : 'animation': ", this.animation) - throw new Error( - "SVELTHREE > SvelthreeAnimationManager > animationInitiated? : 'animation' prop is of unsupported type!" + console.debug( + "SVELTHREE > SvelthreeAnimationManager > startAnimation : animation has already been initiated! 'animation': ", + this.ani_obj ) } } - animationIsAnimationProp(): boolean { - if (this.animation) { - if (this.animation instanceof SvelthreeAnimationProp) { - return true - } - } - return false - } - - animationIsObject(): boolean { - if (this.animation) { - if (typeof this.animation === "object") { - return true - } - } - return false + public destroyAnimation(): void { + Object.prototype.hasOwnProperty.call(this.ani_obj, "onDestroy") + ? this.ani_obj.onDestroy() + : console.error( + "SVELTHREE > SvelthreeAnimationManager > destroyAnimation : required 'onDestroy' property is missing in 'SvelthreeAnimation'-Object!" + ) } - // TODO (ESLint -> 'no-explicit-any') see https://github.com/vatro/svelthree/issues/165 - getAnimation(): any { - if (this.animationInitiated()) { - return this.animation - } + public getAnimation(): SvelthreeAnimation { + return this.ani_obj } } diff --git a/src/lib/ani/SvelthreeAnimationObjectFactory.ts b/src/lib/ani/SvelthreeAnimationObjectFactory.ts new file mode 100644 index 0000000..af18d3e --- /dev/null +++ b/src/lib/ani/SvelthreeAnimationObjectFactory.ts @@ -0,0 +1,33 @@ +import type { Object3D } from "three" +import type { SvelthreeAnimationFunction, SvelthreeAnimation } from "../types/types-extra" + +export default class SvelthreeAnimationObjectFactory { + constructor(private ani_fn: SvelthreeAnimationFunction) {} + + /*eslint @typescript-eslint/no-explicit-any: ["error", { "ignoreRestArgs": true }]*/ + public create(foo: Object3D, ...args: any[]): SvelthreeAnimation { + let ani_obj: SvelthreeAnimation + + try { + ani_obj = this.ani_fn(foo, args) + + if (!Object.prototype.hasOwnProperty.call(ani_obj, "onStart")) { + console.error("SVELTHREE > Provided animation is missing 'onStart' function!", { + animation: ani_obj + }) + //throw new Error("SVELTHREE Exception (see warning above)") + } + + if (!Object.prototype.hasOwnProperty.call(ani_obj, "onDestroy")) { + console.error("SVELTHREE > Provided animation has no 'onDestroy' function!", { + animation: ani_obj + }) + //throw new Error("SVELTHREE Exception (see warning above)") + } + } catch (error) { + throw new Error("SVELTHREE Exception, " + error) + } + + return ani_obj + } +} diff --git a/src/lib/ani/SvelthreeAnimationProp.ts b/src/lib/ani/SvelthreeAnimationProp.ts deleted file mode 100644 index 58029b9..0000000 --- a/src/lib/ani/SvelthreeAnimationProp.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { Object3D } from "three" -import type { SvelthreeAnimationFunction } from "../types/types-extra" - -export default class SvelthreeAnimationProp { - fn: SvelthreeAnimationFunction - - constructor(fn: SvelthreeAnimationFunction) { - this.fn = fn - } - - initiate(obj: Object3D, ...args: any[]): any { - let initiatedFn: any - - try { - initiatedFn = this.fn(obj, args) - - if (!Object.prototype.hasOwnProperty.call(initiatedFn, "onStart")) { - console.error("SVELTHREE > Provided animation is missing 'onStart' function!", { - animation: initiatedFn - }) - //throw new Error("SVELTHREE Exception (see warning above)") - } - - if (!Object.prototype.hasOwnProperty.call(initiatedFn, "onDestroy")) { - console.error("SVELTHREE > Provided animation has no 'onDestroy' function!", { - animation: initiatedFn - }) - //throw new Error("SVELTHREE Exception (see warning above)") - } - } catch (error) { - throw new Error("SVELTHREE Exception, " + error) - } - - return initiatedFn - } -} diff --git a/src/lib/ani/index.ts b/src/lib/ani/index.ts index b0d9c41..6312a2e 100644 --- a/src/lib/ani/index.ts +++ b/src/lib/ani/index.ts @@ -1,3 +1,3 @@ -export { default as SvelthreeAnimationProp } from "./SvelthreeAnimationProp" +export { default as SvelthreeAnimationObjectFactory } from "./SvelthreeAnimationObjectFactory" export { default as SvelthreeAnimationManager } from "./SvelthreeAnimationManager" -export { default as SvelthreeAnimation } from "./SvelthreeAnimation" +export { default as SvelthreeAni } from "./SvelthreeAni" diff --git a/src/lib/components-internal/SvelthreeInteraction.svelte b/src/lib/components-internal/SvelthreeInteraction.svelte index c7e6e9a..ec7f940 100644 --- a/src/lib/components-internal/SvelthreeInteraction.svelte +++ b/src/lib/components-internal/SvelthreeInteraction.svelte @@ -11,13 +11,22 @@ This is a **svelthree** _SvelthreeInteraction_ Component. --> - - - diff --git a/src/lib/components/AmbientLight.svelte b/src/lib/components/AmbientLight.svelte index 701ff90..40404c0 100644 --- a/src/lib/components/AmbientLight.svelte +++ b/src/lib/components/AmbientLight.svelte @@ -10,7 +10,7 @@ svelthree uses svelte-accmod, where accessors are always `true`, regardless of ` AmbientLight cannot be used to cast shadows as it doesn't have a direction. Position is also irrelevant. See https://threejs.org/docs/#api/en/lights/AmbientLight. [ tbd ] Link to Docs. -->