Question?

How does Snap! work? Like how does it run blocks and how does the Process class work?

Questions like this are strongly discouraged on the forum.

The forum is to talk about using Snap! and not how does it work down in the engine room. :slight_smile:

There is documentation in the source files but it does assume a certain level of JavaScript knowledge

Also, how can we answer such a broad question? You're asking us to write a book! Sometimes we get narrower questions, e.g., "where are the block shapes defined?" or "how are processes scheduled?" and those (while still kinda discouraged) are answerable (often by other users!).

Actually I was just about to ask where the block shapes were? Do you happen to know? Or should I start a separate thread?

The block shapes are in src/blocks.js. The functions you should look for are render or draw (I can't remember exactly, but I used them to create snapblocks as accurate as possible).

Where is the notch rendering and the dents is it also in blocks.js?

The notch is part of the shape, so yes.

Specifically, here's the function that calls other functions to draw the entire command block shape.

Maybe you can dig around there, and then you could figure everything out.

Thanks!

Where do you create new categories?