|
It should be renamed 'uglier' or 'obfusticate' const normals = [
-1, -1, -1,
1, -1, -1,
-1, 1, -1,
1, 1, -1,
-1, 1, 1,
1, 1, 1,
];
const positions = [
-1, -1, 0,
1, -1, 0,
-1, -1, 0,
-1, -1, 0,
1, -1, 0,
1, 1, 0,
]
ctx.drawImage(
image,
srcX, srcY, srcWidth, srcHeight,
dstX, dstY, dstWidth, dstHeight,
)
becomes const normals = [-1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1];
const positions = [
-1,
-1,
0,
1,
-1,
0,
-1,
-1,
0,
-1,
-1,
0,
1,
-1,
0,
1,
1,
0,
];
ctx.drawImage(
image,
srcX,
srcY,
srcWidth,
srcHeight,
dstX,
dstY,
dstWidth,
dstHeight
);
Those are less pretty and useful info is lost. |
The one thing I'll give to you is the handling of arrays. There is an open issue to treat array literals the same as object literals in that newlines between elements will be respected and not automatically compressed onto a single line if the whole line is less than max-width. After about a half year of usage that's the only default I really don't like.