Skip to content

Instantly share code, notes, and snippets.

@Kruptein
Created May 21, 2020 10:15
Show Gist options
  • Save Kruptein/b8f1afdb9c3e9da1a9235634b39e27d1 to your computer and use it in GitHub Desktop.
Save Kruptein/b8f1afdb9c3e9da1a9235634b39e27d1 to your computer and use it in GitHub Desktop.
input: asset of a certain resolution (e.g. 200 x 200 pixels)
case A: 5ft/ 50px grid cells
case B: 10ft/ 50px grid cells
case C: 5ft/100px grid cells
case D: 10ft/100px grid cells
without any extra information:
drop on A] 4 by 4 cells (20 x 20 ft)
drop on B] 4 by 4 cells (40 x 40 ft)
drop on C] 2 by 2 cells (10 x 10 ft)
drop on C] 2 by 2 cells (20 x 20 ft)
-> The image will just always take 200 by 200 pixels irregardless of grid settings and thus render different for every grid setting
with info that the image should represent 2 x 2 cells:
drop on A] 2 by 2 cells (10 x 10 ft)
drop on B] 2 by 2 cells (20 x 20 ft)
drop on C] 2 by 2 cells (10 x 10 ft)
drop on C] 2 by 2 cells (20 x 20 ft)
-> The image will be resized, but to the wrong size if we differ from the default 1 cell = 5ft
with info that the image should represent 2 x 2 cells that are 5ft:
drop on A] 2 by 2 cells (10 x 10 ft)
drop on B] 1 by 1 cells (10 x 10 ft)
drop on C] 2 by 2 cells (10 x 10 ft)
drop on C] 1 by 1 cells (10 x 10 ft)
-> Actually correct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment