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) {
4848 try {
4949 const state = root . snapshot ;
5050 state . events . disconnect ?.( ) ;
51+
5152 state . gl ?. renderLists ?. dispose ?.( ) ;
53+ state . gl ?. dispose ?.( ) ;
5254 state . gl ?. forceContextLoss ?.( ) ;
5355 if ( state . gl ?. xr ) state . xr . disconnect ( ) ;
5456 dispose ( state . scene ) ;
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export type NgtCameraParameters = Partial<
3939> & { manual ?: boolean } ;
4040export interface NgtRendererLike {
4141 render : ( scene : THREE . Scene , camera : THREE . Camera ) => any ;
42+ dispose ?: ( ) => void ;
4243}
4344export type NgtCanvasElement = HTMLCanvasElement | OffscreenCanvas ;
4445export type NgtGlobalRenderCallback = ( timeStamp : number ) => void ;
You can’t perform that action at this time.
0 commit comments