KayelGee / select-tool-everywhere

MIT License
3 stars 12 forks source link

v10 moving multiple lights randomly crashes the canvas #5

Closed KayelGee closed 1 year ago

KayelGee commented 1 year ago

In v10 when moving multiple lights via the select tool it will randomly crash the canvas because the PerceptionManager seems to try to update some PointLightningMesh that doesn't exists for some reason. This doesn't happen when you update the lights via a macro like

{
    const updates = canvas.lighting.objects.children.map(e =>{return {_id:e.document._id, x:e.document.x-100, y: e.document.y, rotation: 0}});
    console.log(updates);
    canvas.scene.updateEmbeddedDocuments('AmbientLight', updates, {})
}

I have no clue how to fix this so the select tool for lights is disabled. If anyone want's to try to fix this just use the version v1.3.0 and play around with that. I'm open for pull requests.