File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ export function injectCanvasRootInitializer(injector?: Injector) {
48
48
try {
49
49
const state = root . snapshot ;
50
50
state . events . disconnect ?.( ) ;
51
+
51
52
state . gl ?. renderLists ?. dispose ?.( ) ;
53
+ state . gl ?. dispose ?.( ) ;
52
54
state . gl ?. forceContextLoss ?.( ) ;
53
55
if ( state . gl ?. xr ) state . xr . disconnect ( ) ;
54
56
dispose ( state . scene ) ;
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export type NgtCameraParameters = Partial<
39
39
> & { manual ?: boolean } ;
40
40
export interface NgtRendererLike {
41
41
render : ( scene : THREE . Scene , camera : THREE . Camera ) => any ;
42
+ dispose ?: ( ) => void ;
42
43
}
43
44
export type NgtCanvasElement = HTMLCanvasElement | OffscreenCanvas ;
44
45
export type NgtGlobalRenderCallback = ( timeStamp : number ) => void ;
You can’t perform that action at this time.
0 commit comments