Skip to content

Commit

Permalink
Change standard lookAt type and add JSDoc comment (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vatroslav Vrbanic committed Dec 3, 2022
1 parent 0aaa5d0 commit 6c862ef
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/CubeCamera.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,8 @@ Renders a `CubeMap` which can be used with **non-PBR** materials having an `.env
}
}
/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && camera && lookAt ? set_lookat() : lookAt && camera ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/Group.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ svelthree uses svelte-accmod, where accessors are always `true`, regardless of `
}
}
/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && group && lookAt ? set_lookat() : lookAt && group ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/LoadedGLTF.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ svelthree uses svelte-accmod, where accessors are always `true`, regardless of `
}
}
/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && container && lookAt ? set_lookat() : lookAt && container ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/Mesh.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ svelthree uses svelte-accmod, where accessors are always `true`, regardless of `
}
}
/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && mesh && lookAt ? set_lookat() : lookAt && mesh ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/Object3D.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ svelthree uses svelte-accmod, where accessors are always `true`, regardless of `
}
}
/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && object3d && lookAt ? set_lookat() : lookAt && object3d ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/OrthographicCamera.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ If you use this approach you'll see a warning in the console if you define left,
}
}
/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && camera && lookAt ? set_lookat() : lookAt && camera ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/PerspectiveCamera.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ svelthree uses svelte-accmod, where accessors are always `true`, regardless of `
}
}
/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && camera && lookAt ? set_lookat() : lookAt && camera ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/PointLight.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ svelthree uses svelte-accmod, where accessors are always `true`, regardless of `
}
}
/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && light && lookAt ? set_lookat() : lookAt && light ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/Points.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,8 @@ svelthree uses svelte-accmod, where accessors are always `true`, regardless of `
}
}
/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && points && lookAt ? set_lookat() : lookAt && points ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/RectAreaLight.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ svelthree uses svelte-accmod, where accessors are always `true`, regardless of `
}
}
/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && light && lookAt ? set_lookat() : lookAt && light ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/Scene.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ svelthree uses svelte-accmod, where accessors are always `true`, regardless of `
}
}

/** */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined = undefined
/** **shorthand** attribute for calling the `svelthree`-custom `lookAt` method with the provided value as argument. */
export let lookAt: Vector3 | Parameters<Vector3["set"]> | Targetable | undefined | null = undefined
$: !matrix && scene && lookAt ? set_lookat() : lookAt && scene ? console.warn(w_sh.lookAt) : null
function set_lookat() {
if (verbose && log_rs) console.debug(...c_rs(c_name, "lookAt", lookAt))
Expand Down

0 comments on commit 6c862ef

Please sign in to comment.