fix(i18n): add 'home' body class to English homepage so section__title margin applies
This commit is contained in:
1 parent
9d78567386
commit
939ce8fcc9
88 files changed
+1830
-2
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import puppeteer from 'puppeteer';
|
||||
const b = await puppeteer.launch({ args:['--no-sandbox','--disable-setuid-sandbox','--use-gl=angle','--enable-unsafe-swiftshader','--ignore-gpu-blocklist'] });
|
||||
const p = await b.newPage();
|
||||
await p.setViewport({width:1100,height:1300});
|
||||
await p.goto('http://10.200.201.3:4175/_lab/neu-card.html',{waitUntil:'load',timeout:60000});
|
||||
await new Promise(r=>setTimeout(r,1200));
|
||||
const r = await p.evaluate(()=>{
|
||||
const m=document.querySelector('[data-shader-demo] .card-shader').paperShaderMount;
|
||||
const gl=m.gl;
|
||||
const flat=[0.486,0.361,1,1, 0,0.761,0.78,1, 1,0.361,0.541,1, 1,0.702,0.278,1];
|
||||
gl.useProgram(m.program);
|
||||
gl.uniform4fv(gl.getUniformLocation(m.program,'u_colors'), new Float32Array(flat));
|
||||
gl.uniform1f(gl.getUniformLocation(m.program,'u_colorsCount'),4);
|
||||
gl.drawArrays(gl.TRIANGLES,0,6);
|
||||
const W=m.canvasElement.width,H=m.canvasElement.height;
|
||||
const pts=[[100,100],[360,100],[620,100],[100,220],[360,220],[620,220],[100,340],[360,340],[620,340]];
|
||||
const out=pts.map(([x,y])=>{const px=new Uint8Array(4);gl.readPixels(x,y,1,1,gl.RGBA,gl.UNSIGNED_BYTE,px);return [x,y,Array.from(px)];});
|
||||
// макс яркость по всему canvas
|
||||
const buf=new Uint8Array(W*H*4); gl.readPixels(0,0,W,H,gl.RGBA,gl.UNSIGNED_BYTE,buf);
|
||||
let maxc=0; for(let i=0;i<buf.length;i++) maxc=Math.max(maxc,buf[i]);
|
||||
return { samples:out, maxChannel:maxc };
|
||||
});
|
||||
console.log(JSON.stringify(r,null,1));
|
||||
await b.close();
|
||||
Reference in new issue
Block a user