openscad / openscad-playground

OpenSCAD Web Playground
https://ochafik.com/openscad2
Other
91 stars 27 forks source link

Color #7

Open joeskeen opened 1 year ago

joeskeen commented 1 year ago

According to the OpenSCAD User Manual/First Steps/Changing the color of an object example:

color([1,0,0]) cube([2,3,4]);
translate([3,0,0])
color([0,1,0]) cube([2,3,4]);
translate([6,0,0])
color([0,0,1]) cube([2,3,4]);

should look like this: image

but in the openscad playground looks like this: image

Having different pieces rendered in different colors is very useful when designing practical parts that may fit around other pieces.

t-paul commented 1 year ago

OpenSCAD only supports colors in Preview mode and the WASM version does not support this mode at all. So for the time being we can only document that somewhere.

The OpenGL updates that are currently in progress might bring Preview support, full color mode is quite high on the wishlist but unlikely to happen any time soon unless someone jumps at that topic.

enemali commented 7 months ago

adding colors will be very useful , i want to use this to teach kids

Scopeuk commented 3 months ago

As noted in https://github.com/openscad/openscad-playground/issues/34#issuecomment-2203209642 this is starting to be integrated. It is still under development.