Source code
Revision control
Copy as Markdown
Other Tools
# A CSS sprite sheet: the whole 48x48 sheet is pushed, scaled so each 16x16
# cell covers 40x40, and clipped down to the centre cell. That cell is uniform
# 0x7f and every neighbour is 0xff, so without sampling being restricted to the
#
# The restriction is derived from what the clip rect leaves of the bounds, which
# here is the centre cell: (0,0)-(40,40) of a (-40,-40)-(80,80) destination is
# the fraction (1/3,1/3)-(2/3,2/3), i.e. texels (16,16)-(32,32) of the sheet.
root:
items:
- image: checkerboard(0, 16, 16, 3, 3)
bounds: [-40, -40, 120, 120]
clip-rect: [0, 0, 40, 40]