jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.65k stars 514 forks source link

x3d-serializer improvements #1235

Open andreasplesch opened 1 year ago

andreasplesch commented 1 year ago

Expected Behavior

Actual Behavior

Output uses diffuseColor + emissiveColor. Output uses averaged normals for smoothing (the X3D default). Output is rotated such that +Y is horizontal. Output has long list of vertex colors even when uniform. Output is a bit dull.

Steps to Reproduce the Problem

  1. serialize basicColors example to X3D
  2. load X3D into X3D browser such as x-ite or x3dom
  3. observe colors, smoothing, and orientation

Specifications

See more complete discussion at #1234.

These are relatively simple changes to the X3D serializer. I can generate a unified PR, or separate PRs for each suggestion. Please advise.

hrgdavor commented 1 year ago

@andreasplesch I see you are pretty active lately. If you feel like it you can also join jscad discord channel https://discord.gg/AaqGskur93 where we talk more than issues.

andreasplesch commented 1 year ago

Thanks ! I joined the channel. I am also using the discussions tab here on github to keep things in one place.