internalisation
This commit is contained in:
parent
097c44e86e
commit
0c76f3cdf6
33 changed files with 561 additions and 63 deletions
src/modules/simulationRenderer/classes
|
@ -27,6 +27,7 @@ import { wireConnectedToGate } from '../helpers/wireConnectedToGate'
|
|||
import { updateMouse, handleScroll } from '../helpers/scaleCanvas'
|
||||
import { RefObject } from 'react'
|
||||
import { Singleton } from '@eix-js/utils'
|
||||
import { dumpSimulation } from '../../saving/helpers/dumpSimulation'
|
||||
|
||||
export class SimulationRenderer {
|
||||
public mouseDownOutput = new Subject<MouseEventInfo>()
|
||||
|
@ -200,6 +201,8 @@ export class SimulationRenderer {
|
|||
this.lastMousePosition = this.camera.toWordPostition(event.position)
|
||||
})
|
||||
|
||||
dumpSimulation(this)
|
||||
|
||||
this.reloadSave()
|
||||
this.initKeyBindings()
|
||||
}
|
||||
|
@ -222,7 +225,6 @@ export class SimulationRenderer {
|
|||
if (!save) return
|
||||
if (!(save.simulation || save.camera)) return
|
||||
|
||||
this.simulation.dispose()
|
||||
this.simulation = fromSimulationState(save.simulation)
|
||||
this.camera = fromCameraState(save.camera)
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue