VOCC / vocc

A web-based Gameboy Advance image editor and converter
9 stars 5 forks source link

Create "Layers" section #23

Open bhillier3 opened 4 years ago

bhillier3 commented 4 years ago

Holds Layers for original images, edits, etc.

lbussell commented 4 years ago

Notes from meeting about implementation details:

class Sprite 
    layers: Array<SpriteLayer>(5)
    changePixel(coords: ImageCoordinates, layer: number);
    getPixelAt(ImageCoords, layers?: Array<number):
        look at the topmost non-"transparent" pixel in layers
}

type SpriteLayer = Array<Array<number>>

"Transparent" pixels in layers can be a value of -1.