Continuing the discussion from Snapblocks (Part 1) - #252 by sonic123cdmania.
Previous discussions:
Continuing the discussion from Snapblocks (Part 1) - #252 by sonic123cdmania.
Previous discussions:
Well, there's nothing I can do to help with that.
:-(. Sad
unless they decied to add it to forums sorry man
I just upgraded define blocks to make them easier to make.
{test {test} $turtle (wow) [cool] <nice> ((cool)) :: motion} :: define+
test ({} @addInput) @turtle () [] <> ()
Yeah, you can now use $
instead of @
for icons (both act the same, although I am thinking of allowing the $text-size-r-g-b
to work for text with a $).
But, the icon list
might be an oversight. There is a plain list icon, but also a list input.
I did not think about that, but I can add that in.
You guys asked for it, I added the ability to set block colors (and input colors) using rgb values instead of a hex code.
(color [rgb(0 , 255 , 255)] :: rgb(0,255,0))
This really stemmed from me using the Color
class from snap (more specifically morphic.js) in snapblocks, which has a function to get a color from an rgb()
string (well, it was rgba()
, but I modified it to allow rgb()
. Should I see if jens wants that in morphic.js?).
edit: oops, somehow I broke something
edit2: now it's fixed
Alright guys, I feel like I'm getting close to the last thing I'm adding this release. Here's what I've currently added.
Boolean switches.
Snap define blocks automatically replace different shaped inputs with upvars
Actually correct comments
Set color using rgb values
Add icons using $
I do want to add the ability to change text color using $text-s-r-g-b
before I release 1.4.0 though.
edit: I've got that working for the snap style, not the scratch styles yet.
Keep in mind, I have not released all this yet, I'm just putting all of this here so you guys can see what I've done. Plus, there's a lot more stuff that changed behind the scenes anyway.
Update:
I've finished refactoring the snap style line positioning code, this time pretty much just copy / pasting from the snap source code, so hopefully the snap style is even more accurate.
I also managed to allow you to change the scale and color of text, by using the same syntax that snap uses, $text-s-r-g-b
, although it's currently only in the snap style.
1.4.0 got released.
No more than 2 consecutive posts
I have released Snapblocks 1.4.0.
<t>
, <f>
(small true and false boolean inputs), and <true>
and <false>
(for big (static) boolean inputs).$text-s-r-g-b
e.g. $text-2-0-255-0
.{[string] (number) <boolean>} :: define+
to automatically get the correct upvar labels.@loop
or @loopArrow
at the end of a line right after a c-slot, that will be placed on the right side of the block, making that c-slot have a loop arrow.rgb(r,g,b)
, for example, (color [rgb(0 , 255 , 255)] :: rgb(0,255,0))
.<touching color [\#fff] ?>
.@cloudGradient
, @robot
.list
or lists
for the lists
category.turnRight
and turnLeft
icons.@circle
is no longer the same as @circleSolid
, it's now a circle outline, like in Snap!.@flag
is now not colored, whereas @greenFlag
is (I also added @greenflag
because snap 10 uses that).@loop
is the full size loop, and @loopArrow
is the scaled loop (again, from snap 10).@turtle
is now scaled by 1.2.yummy
[scratchblocks]
define {{test {test :: custom-arg} :: motion}
The forum doesn't have snapblocks, so you'll have to test it out on https://snap-blocks.github.io/. Sorry.
Oh! Have you made a PR?
No, I'm not sure where it is. Plus, I think I have an idea on how to make a better plugin, one that reads the raw post, rather than rendering the snapblocks after the rest of the rendering (I was looking at the checkbox plugin). Meaning, I have an idea on how to make it so we don't have to do a whole bunch of weird stuff to get the snapblocks to render correctly.
Great, can't wait!
I'd have to figure out how to setup discourse locally to test it though...
Doesn't Discourse have a tutorial on that?
Probably, I just haven't looked into it.