mirror of
https://github.com/zhigang1992/react-three-fiber.git
synced 2026-01-12 22:51:27 +08:00
cleanup
This commit is contained in:
@@ -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(),
|
||||
],
|
||||
},
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user