pixalynx/pixal-gps

These files define two separate printed circuit boards: a small, two-layer battery cartridge with protection circuitry and contact pads for a pouch cell, and a larger, two-layer wireless charging dock featuring USB-C input, a resonant coil, and wireless power transmission components.

Version
0.1.2
License
unset
Stars
0

simulator/scripts/browser-qa-resume.js

async (page) => {
 const errors=[];page.on('pageerror',e=>errors.push(e.message));
 await page.setViewportSize({width:1440,height:1100});await page.goto('http://localhost:4186/');await page.waitForFunction(()=>window.pixalStudio?.ready);
 await page.getByRole('button',{name:'Complete kit',exact:true}).click();await page.waitForTimeout(1800);
 const save=async(name,button='↓ Save render')=>{const event=page.waitForEvent('download',{timeout:60000});await page.getByRole('button',{name:button,exact:true}).click();await (await event).saveAs('renders/'+name);};
 await page.getByRole('button',{name:'Tracker',exact:true}).click();await page.getByRole('checkbox',{name:'Cutaway',exact:true}).check();await page.waitForTimeout(1500);await save('pixal-gps-tracker-cutaway.png');
 await page.getByRole('button',{name:'⇄ Swap battery',exact:true}).click();await save('pixal-gps-battery-exchange.webm','↓ Record animation');
 await page.getByRole('button',{name:'Battery',exact:true}).click();await page.waitForTimeout(1600);await save('pixal-gps-cartridge.png');
 await page.getByRole('button',{name:'Dock',exact:true}).click();await page.getByRole('checkbox',{name:'Cutaway',exact:true}).check();await page.waitForTimeout(1500);await save('pixal-gps-dock-cutaway.png');
 await page.getByRole('button',{name:'⌁ Dock & charge',exact:true}).click();await save('pixal-gps-docking.webm','↓ Record animation');
 await page.getByRole('button',{name:'Complete kit',exact:true}).click();await page.getByRole('checkbox',{name:'Cutaway',exact:true}).uncheck();await page.waitForTimeout(1200);await save('pixal-gps-concept.glb','↓ 3D model');
 const geometry=await page.evaluate(()=>{const {parts,scene}=window.pixalStudio;scene.updateMatrixWorld(true);const p=parts.pcb.getObjectByName('P1'),q=parts.pack.getObjectByName('P1');return {pogo:p.matrixWorld.elements.slice(12,15),pad:q.matrixWorld.elements.slice(12,15),parts:window.pixalStudio.product.children.length};});
 if(Math.abs(geometry.pogo[0]-geometry.pad[0])>.001||Math.abs(geometry.pogo[2]-geometry.pad[2])>.001||Math.abs(geometry.pogo[1]-geometry.pad[1]-2.5)>.001)throw Error('Pogo geometry mismatch '+JSON.stringify(geometry));
 await page.getByRole('button',{name:'Design notes ↗',exact:true}).click();await page.keyboard.press('Escape');
 await page.setViewportSize({width:390,height:844});await page.getByRole('button',{name:'Tracker',exact:true}).click();await page.waitForTimeout(2000);if(await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth))throw Error('Mobile overflow');await page.screenshot({path:'output/playwright/mobile.png',fullPage:true});
 await page.setViewportSize({width:1440,height:1100});await page.getByRole('button',{name:'Complete kit',exact:true}).click();await page.waitForTimeout(1300);
 if(errors.length)throw Error(errors.join('\n'));console.log(JSON.stringify({errors,geometry,result:'Playback, pause, three video downloads, five stills, model export and mobile passed.'}));
}