-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surfacing more image blocks #1371
base: master
Are you sure you want to change the base?
Conversation
//% this.defl="picture" | ||
//% from.shadow=screen_image_picker | ||
//% weight=0 | ||
drawTransparentImage(from: Image, x: int32, y: int32): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need a blockId?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to support scale? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the blockid! Not opposed to supporting scale, but it might be better off in the scale extension?
Also, fun fact: none of the blocks in the image category other than the ones in this pr have block ids 😅
What does picture draw do? Add picture inside picture? |
yeah, it draws one picture on top of another. it's very useful for things like HUDs, where you might want to draw some hearts for lives, etc. |
Why can't we put these inside an extension? They seem like advanced scenarios to me... Or if you feel like these are important, we could talk about removing some of the existing Image blocks? Do we have telemetry on how popular these blocks are? |
@Jaqster I'd be okay with removing the circle blocks (i just added those for completeness), but the other three blocks in this pr are all very useful and I think belong in core. I don't think these are any more advanced than the rest of the blocks in the image category. I think all of these blocks fall into the category of things you would expect any reasonable game making tool to have. My other motivation is that there isn't a clear extension that these blocks belong in. I want to avoid having a million micro extensions that each contain less than five blocks. |
I wonder if entire Image category should be an extension? (breaking change for sure). Are there any tutorials\skillmaps use this category? |
How many blocks total would be in the Images category? The most we have in 1 category is 30 (Sprite and Scene) - and I think that's too much. We should talk about maybe setting some limits on # of blocks per category? Makes it really hard to find stuff... Speaking of, I just did a quick count, and this is what it looks like across our code editors (not counting common blocks):
I think we can do some clean-up in micro:bit (remove some categories from Advanced), and let's really try and focus on only having the most commonly used blocks in the mainline editors. |
As has become tradition, I'd like to sneak a few missing blocks into this release.
This PR surfaces some already existent TS image apis into blocks:
In particular, the width/height block is extremely useful because the only way to get those values right now is to create a sprite (which you then have to immediately destroy).