0hmX/mq135-air-quality-sensor-module
This code defines a detailed PCB and schematic design for a Winsen MQ-135 air quality sensor module featuring the sensor itself, a comparator IC, voltage regulators, LEDs, resistors, a potentiometer, pin headers, and associated physical component footprints.
- Version
- 1.0.1
- License
- unset
- Stars
- 0
scripts/render-3d-views.mjs
import { mkdir, readFile, writeFile } from "node:fs/promises"
import { renderGLTFToPNGFromGLB } from "poppygl"
const projectRoot = new URL("../", import.meta.url)
const glb = await readFile(new URL("dist/index/3d.glb", projectRoot))
const outputDirectory = new URL("dist/3d-renders/", projectRoot)
await mkdir(outputDirectory, { recursive: true })
const commonOptions = {
width: 1200,
height: 900,
supersampling: 2,
fov: 32,
ambient: 0.42,
gamma: 2.2,
cull: "none",
}
const views = [
{
filename: "mq135-top.png",
camPos: [42, 72, -66],
lookAt: [0, 4, 0],
up: "z+",
},
{
filename: "mq135-underside.png",
camPos: [42, -68, -64],
lookAt: [0, -2, 0],
up: "z-",
},
]
for (const view of views) {
const png = await renderGLTFToPNGFromGLB(glb, {
...commonOptions,
camPos: view.camPos,
lookAt: view.lookAt,
up: view.up,
})
await writeFile(new URL(view.filename, outputDirectory), png)
}
console.log(views.map(({ filename }) => filename).join("\n"))