delete simulation
This commit is contained in:
parent
cddb050dfe
commit
96ae3f44a1
11 changed files with 112 additions and 42 deletions
src/modules/simulationRenderer/classes
|
@ -253,7 +253,9 @@ export class SimulationRenderer {
|
|||
|
||||
const offset = invert(
|
||||
relativeTo(this.lastMousePosition, worldPosition)
|
||||
).map(
|
||||
)
|
||||
|
||||
const scaledOffset = offset.map(
|
||||
(value, index) => value * this.camera.transform.scale[index]
|
||||
) as vector2
|
||||
|
||||
|
@ -269,7 +271,7 @@ export class SimulationRenderer {
|
|||
if ((this.mouseState >> 1) & 1) {
|
||||
this.camera.transform.position = add(
|
||||
this.camera.transform.position,
|
||||
invert(offset)
|
||||
invert(scaledOffset)
|
||||
)
|
||||
|
||||
this.spawnCount = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue