wip
This commit is contained in:
parent
c2c920c4a2
commit
e5b95755e8
|
@ -120,7 +120,7 @@ export function imageDataUrl(options?: {
|
|||
const red = options?.color?.red ?? integer(0, 255);
|
||||
const green = options?.color?.green ?? integer(0, 255);
|
||||
const blue = options?.color?.blue ?? integer(0, 255);
|
||||
const alpha = options?.color?.alpha ?? 0;
|
||||
const alpha = options?.color?.alpha ?? 1;
|
||||
ctx.arc(canvas.width / 2, canvas.height / 2, canvas.width / 2, 0, Math.PI * 2, true);
|
||||
ctx.fillStyle = `rgba(${red}, ${green}, ${blue}, ${alpha})`;
|
||||
ctx.fill();
|
||||
|
|
|
@ -45,10 +45,8 @@ function createRender(params: {
|
|||
http.post('/api/admin/emoji/v2/list', async (req) => {
|
||||
await delay(100);
|
||||
|
||||
const bodyStream = req.request.body.
|
||||
const body = req.body as entities.AdminEmojiV2ListRequest;
|
||||
|
||||
console.log(req);
|
||||
const bodyStream = req.request.body as ReadableStream;
|
||||
const body = await new Response(bodyStream).json() as entities.AdminEmojiV2ListRequest;
|
||||
|
||||
const emojis = params.emojis;
|
||||
const limit = body.limit ?? 10;
|
||||
|
@ -72,8 +70,14 @@ export const Default = createRender({
|
|||
emojis: [],
|
||||
});
|
||||
|
||||
export const Max10 = createRender({
|
||||
emojis: [
|
||||
emoji(), emoji(), emoji(), emoji(), emoji(), emoji(), emoji(), emoji(), emoji(), emoji(),
|
||||
],
|
||||
export const List10 = createRender({
|
||||
emojis: Array.from({ length: 10 }, (_, i) => emoji({ name: `emoji_${i}` })),
|
||||
});
|
||||
|
||||
export const List100 = createRender({
|
||||
emojis: Array.from({ length: 100 }, (_, i) => emoji({ name: `emoji_${i}` })),
|
||||
});
|
||||
|
||||
export const List1000 = createRender({
|
||||
emojis: Array.from({ length: 1000 }, (_, i) => emoji({ name: `emoji_${i}` })),
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue