This commit is contained in:
Paul Henschel
2020-08-11 09:33:31 +02:00
parent 312dcb7338
commit 61d0aaee6c
3 changed files with 2 additions and 5 deletions

View File

@@ -70,12 +70,12 @@ function createConfig(entry, out, closure = true) {
babel(getBabelOptions({ useESModules: true }, '>1%, not dead, not ie 11, not op_mini all')),
resolve({ extensions }),
targetTypings(entry, out),
/*closure &&
closure &&
compiler({
compilation_level: 'SIMPLE',
jscomp_off: 'checkVars',
}),
closure && addImport(`dist/${out}.js`, `import * as THREE from "three";`),*/
closure && addImport(`dist/${out}.js`, `import * as THREE from "three";`),
sizeSnapshot(),
],
},

View File

@@ -631,7 +631,6 @@ export const useCanvas = (props: UseCanvasProps): DomEventHandlers => {
// Dispose renderer on unmount
useEffect(
() => () => {
console.log('dispose')
if (state.current.gl) {
state.current.gl.renderLists.dispose()
if (state.current.gl.forceContextLoss) state.current.gl.forceContextLoss()

View File

@@ -1,7 +1,5 @@
import * as THREE from 'three'
import React from 'react'
//@ts-ignore
//import Reconciler from 'react-reconciler/cjs/react-reconciler.production.min'
import Reconciler from 'react-reconciler'
import { unstable_now as now, unstable_IdlePriority as idlePriority, unstable_runWithPriority as run } from 'scheduler'
import { CanvasContext } from './canvas'