Skip to content

Commit 3311b8c

Browse files
committed
hmm
1 parent f43050b commit 3311b8c

2 files changed

Lines changed: 44 additions & 6 deletions

File tree

src/pg/inputPixelEditor/README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,10 @@ A complete JSON storage for a 10x10 image.
108108
"layers": [
109109
{
110110
"name": "Layer 1",
111-
"export": true,
111+
"exclude": false,
112112
"locked": false,
113-
"visible": true,
113+
"hidden": false,
114+
"type": "pixel",
114115
"opacity": 1
115116
}
116117
],
@@ -130,3 +131,28 @@ A complete JSON storage for a 10x10 image.
130131
]
131132
}
132133
```
134+
135+
## Layer Type
136+
137+
There are currently 5 differnet layer types.
138+
139+
- `pixel` - Raster artboard of pixels.
140+
- `path` - pixels
141+
- `reference`
142+
- `id` - uuid of frame
143+
- `x`
144+
- `y`
145+
- `pattern` - Repeat an existing frame (with optional offset x/y)
146+
- `path` - pixels
147+
- `id` - uuid of frame
148+
- `linear` - Linear gradient.
149+
- `start: [x, y]`
150+
- `end: [x, y]`
151+
- `stops: [[stop, colorIndex], [stop, colorIndex]]`
152+
- `dither: 'bayer4' | 'bayer8', 'bayer16'`
153+
- `radial` - Radial gradients.
154+
- `start: [x, y]`
155+
- `end: [x, y]`
156+
- `transform: [1, 0, 0, 0.5, 0, 0]` to create ellipses
157+
- `stops: [[stop, colorIndex], [stop, colorIndex]]`
158+
- `dither: 'bayer4' | 'bayer8', 'bayer16'`

src/pg/inputPixelEditor/__examples__/basic/basic.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,29 @@ export default class XPgInputPixelEditorBasic extends HTMLElement {
146146
});
147147
// Layers
148148
this.$layers.columns = [{
149-
label: 'Color',
150-
key: 'color'
149+
label: 'Name',
150+
key: 'name',
151+
}, {
152+
label: 'Type',
153+
key: 'type',
151154
}];
152155
this.$addLayer.addEventListener('click', () => {
153156
// number[][][]
154157
// this.$input.addLayer();
155158
});
156159
// Colors
157160
this.$colors.columns = [{
158-
label: 'Name',
159-
key: 'name'
161+
label: 'Red',
162+
key: 'r',
163+
}, {
164+
label: 'Green',
165+
key: 'g',
166+
}, {
167+
label: 'Blue',
168+
key: 'b',
169+
}, {
170+
label: 'Alpha',
171+
key: 'a',
160172
}];
161173
}
162174

0 commit comments

Comments
 (0)