Open mkeblx opened 6 years ago
Example:
<div class="layer1">
<div class="layer2">
</div>
</div>
To get correct layer textures would need to hide layers, generate textures, then unhide & move on to next.
for (var i = 0; i < layers.length; i++) {
var layer = layers[i];
await page.evaluate((class) => {
var els = document.querySelectorAll('.'+class);
// hide/show appropriate layers
}, layer.name);
captureScreenshot(layer.name+'.png');
}
Split apart by layers, indicated by selectors. For depth layer concepts.