sgenoud / replicad

The library to build browser based 3D models with code.
https://replicad.xyz
MIT License
392 stars 42 forks source link

[WIP] Adding the quick reference #34

Open sgenoud opened 2 years ago

netlify[bot] commented 2 years ago

Deploy Preview for stupefied-edison-1dae54 failed.

Name Link
Latest commit 6a52b79dac163cd9909483cf804d77b4d3afc38a
Latest deploy log https://app.netlify.com/sites/stupefied-edison-1dae54/deploys/62df8fa6a6573700081127d3
cloudflare-workers-and-pages[bot] commented 2 years ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6a52b79
Status: ✅  Deploy successful!
Preview URL: https://ceb08c27.replicad.pages.dev
Branch Preview URL: https://feature-adding-quick-referen.replicad.pages.dev

View logs

sgenoud commented 2 years ago

@raydeleu I have played a bit further with a way to import this automatically (and in a nice way) but I failed to achieve something that I would be happy with.

I would like to avoid having to do some manual editing for each change on your side.

Would you be open to modify the markdown with this type of table. Or it it is too annoying, if I create a helper for what you have your tables?

If you want to keep working with asciidoc, would you be open for me to help you have something automatically build it and be available as a link within the documentation?

raydeleu commented 2 years ago

I can change it anyway you like. If you send me an example on how it should look I can adapt it to your needs. Your automatic translation looked very good, apart from the section headers. I could also imagine using the automatic translation and perform some manual cleanup afterwards. Perhaps Pandoc can do some automatic translation as well. Note that as now is holiday time I can not promise on progress.

On the github I found the format for the documentation you have so far. I can also modify those to create a quick reference. But I would need an example how tables are created in that format and which options are available (for example formatting within table cells).

I have not been very active the last weeks as I had the impression that you were performing major changes to the sketch and drawing APIs. As soon as it is stabilised I can make a new attempt at completing the quick reference. I think that the 2D booleans etcetera in the drawing API would be an interesting addition.

And I did not yet progress on the subject of creating solids out of surfaces as needed for the icospheres.

Finally I noticed an interesting concept to import javascript functions in your "hinged box" example. You were right that this is practical still very transparent as the code for the function can be inspected. This definitely needs to be included in the manual/quick reference.

Raymond Deleu

sgenoud commented 2 years ago

Note that as now is holiday time I can not promise on progress.

First, enjoy your holidays, hope you are not too warm!

I could also imagine using the automatic translation and perform some manual cleanup afterwards. Perhaps Pandoc can do some automatic translation as well. Note that as now is holiday time I can not promise on progress.

I have used asciidoc + pandoc to do the conversion:

asciidoc -b docbook replicad-qrc.adoc
pandoc -f docbook -t markdown_mmd replicad-qrc.xml -o index.md

And then the manual cleanup you can see in this commit (note that the changes to the tables were generated by my editor, it is not necessary).

But I would need an example how tables are created in that format and which options are available (for example formatting within table cells).

This is using multimarkdown table syntax, you can read about it here. Not sure what your OS is, but I sometimes use Marked to see what I do live. Also VS Code has some markdown support builtin. You can even run docusaurus if you want to (yarn start from packages/replicad-docs.

I have not been very active the last weeks as I had the impression that you were performing major changes to the sketch and drawing APIs.

Changes were mostly about fixing bugs - it feels like it does kinda work so I probably won't do big changes (additive stuff for sure, and priorising draw over sketch).