#Rendering Scratch like blocks

17 messages · Page 1 of 1 (latest)

lunar vine
#

I'm wondering if anyone has done it.
Do you think it's possible to do it with cetz or fletcher ? I don't know how well they would deal with blocks inside blocks inside blocks ...

round aurora
#

I don't think the idea alone should be that difficult. The time consuming part would probably be finding the correct offsets for each block, like exactly how much the outer block needs to expand to hold the inner ones and so on. I haven't looked into cetz or fletcher much, but I think it should be doable. It's basically just decorated boxes with indents (and tabs) sticking in (and out).

vital wolf
#

there’s a javascript library for automatically turning plain text into svg blocks, perhaps it’s possible to make an extension that does that

vital wolf
round aurora
#

Otherwise, I'm aiming to help out @upper burrow on his blockst package, from a forum post that was made.

lunar vine
#

I tried at the time to translate the latex package with cetz and I managed to do the blocks and a few more things but I couldn't figure out how to have them grow correctly the way @upper burrow did. The idea was to simply create the blocks with no text inside so the user could simply put what they wanted in their language...
If you are interested I could try to find my files and share them

round aurora
livid elk
#

Wouldn’t it be easier to use SVG export directly from scratch/turbowarp? Keep your code in one place for testing

upper burrow
round aurora
#

The locales and the reference Scratch blocks from there could be very useful though.

lunar vine
#

My own attempts were even less successfull that I remebered : this is a screenshot of what I got, but unless you are interested in the code for the pen or the flag, I don't think my code has anything interesting compared to what you have

#

I would have been interested to help but I looked at the code and, as I have never learned any german, that would be difficult

upper burrow
upper burrow