Skip to content

Commit

Permalink
Camera: Refactor / add 'mau' logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vatroslav Vrbanic committed Dec 18, 2021
1 parent 42bf093 commit 864c58c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
27 changes: 21 additions & 6 deletions src/components-internal/Camera.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,12 @@ This is an internal **svelthree** _Camera_ Component.
: () => {
if (verbose && log_lc && (log_lc.all || log_lc.om)) console.info(...c_lc_int(c_name, "onMount"))
if (verbose && log_mau) {
console.debug(...c_mau(c_name, "onMount : cam.matrixAutoUpdate", cam.matrixAutoUpdate))
console.debug(
...c_mau(c_name, "onMount : cam.", {
matrixAutoUpdate: cam.matrixAutoUpdate,
matrixWorldNeedsUpdate: cam.matrixWorldNeedsUpdate
})
)
}
return () => {
Expand All @@ -323,15 +328,25 @@ This is an internal **svelthree** _Camera_ Component.
beforeUpdate(() => {
if (verbose && log_lc && (log_lc.all || log_lc.bu)) console.info(...c_lc_int(c_name, "beforeUpdate"))
if (verbose && log_mau) {
console.debug(
...c_mau(c_name, "beforeUpdate : cam.", {
matrixAutoUpdate: cam.matrixAutoUpdate,
matrixWorldNeedsUpdate: cam.matrixWorldNeedsUpdate
})
)
}
})
afterUpdate(() => {
if (verbose && log_lc && (log_lc.all || log_lc.om)) console.info(...c_lc_int(c_name, "afterUpdate"))
if (cam.matrixWorldNeedsUpdate === false) {
cam.matrixAutoUpdate = mau
}
if (verbose && log_lc && (log_lc.all || log_lc.od)) {
console.debug(...c_mau(c_name, "afterUpdate : cam.matrixAutoUpdate", cam.matrixAutoUpdate))
if (verbose && log_mau) {
console.debug(
...c_mau(c_name, "afterUpdate : cam.", {
matrixAutoUpdate: cam.matrixAutoUpdate,
matrixWorldNeedsUpdate: cam.matrixWorldNeedsUpdate
})
)
}
})
Expand Down
1 change: 0 additions & 1 deletion src/components/Mesh.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ This is a **svelthree** _Mesh_ Component.
if (verbose && log_lc) console.info(...c_lc(c_name, "onMount"))
}
//console.warn("SVELTHREE > onMount : Mesh : mesh.matrixAutoUpdate", mesh.matrixAutoUpdate)
return () => {
if (verbose && log_lc && (log_lc.all || log_lc.od)) console.info(...c_lc(c_name, "onDestroy"))
Expand Down

0 comments on commit 864c58c

Please sign in to comment.