1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-30 10:39:58 +02:00

Allow setting of color of rocker switch. Defaults to current colors.

This commit is contained in:
Martin Budden
2020-01-26 07:33:11 +00:00
parent 8ac06b53e7
commit f5fdec613c
2 changed files with 10 additions and 6 deletions

View File

@@ -21,9 +21,13 @@ use <../utils/layout.scad>
include <../vitamins/rockers.scad>
module rockers()
layout([for(r = rockers) rocker_flange_w(r)], 5)
module rockers() {
layout([for(r = rockers) rocker_flange_w(r)], 5) {
rocker(rockers[$i]);
translate([0, 25])
rocker(rockers[$i], $i==0 ? "red" : "green");
}
}
if($preview)
rockers();