mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 22:49:31 -07:00
fix linter
This commit is contained in:
@@ -375,7 +375,7 @@ const initThreeJS = () => {
|
|||||||
|
|
||||||
resize()
|
resize()
|
||||||
|
|
||||||
const animate = (time: number) => {
|
const animate = () => {
|
||||||
animationId = requestAnimationFrame(animate)
|
animationId = requestAnimationFrame(animate)
|
||||||
|
|
||||||
if (beamMesh && beamMesh.material) {
|
if (beamMesh && beamMesh.material) {
|
||||||
@@ -389,7 +389,7 @@ const initThreeJS = () => {
|
|||||||
|
|
||||||
animationId = requestAnimationFrame(animate)
|
animationId = requestAnimationFrame(animate)
|
||||||
|
|
||||||
;(container as any)._resizeObserver = resizeObserver
|
;(container as HTMLDivElement & { _resizeObserver?: ResizeObserver })._resizeObserver = resizeObserver
|
||||||
}
|
}
|
||||||
|
|
||||||
const cleanup = () => {
|
const cleanup = () => {
|
||||||
@@ -399,11 +399,11 @@ const cleanup = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (containerRef.value) {
|
if (containerRef.value) {
|
||||||
const container = containerRef.value
|
const container = containerRef.value as HTMLDivElement & { _resizeObserver?: ResizeObserver }
|
||||||
|
|
||||||
if ((container as any)._resizeObserver) {
|
if (container._resizeObserver) {
|
||||||
;(container as any)._resizeObserver.disconnect()
|
container._resizeObserver.disconnect()
|
||||||
delete (container as any)._resizeObserver
|
delete container._resizeObserver
|
||||||
}
|
}
|
||||||
|
|
||||||
if (renderer && renderer.domElement.parentNode === container) {
|
if (renderer && renderer.domElement.parentNode === container) {
|
||||||
|
|||||||
Reference in New Issue
Block a user