Skip to content

Commit 5c9d89d

Browse files
author
Simon he
committed
chore: update
1 parent 430c3d3 commit 5c9d89d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sThree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,14 @@ export function sThree(container: HTMLElement | string, options: SThreeOptions):
382382
})
383383
}
384384
scene!._add = function (...args: any[]) {
385-
scene.add(...args)
385+
scene!.add(...args)
386386
const result = args.map(arg => () => unmount(arg))
387387
return result.length === 1 ? result[0] : result
388388
function unmount(arg: Mesh) {
389389
const { material, geometry } = arg;
390390
(material as any).dispose()
391391
geometry.dispose()
392-
scene.remove(arg)
392+
scene!.remove(arg)
393393
}
394394
}
395395
createMesh?.()

0 commit comments

Comments
 (0)