# Please update the glide block from the official 'animation' library

Here's how.

EDIT - what I wanted in the first place, thanks Simon:

It's what's been needed in the project below to work as intended.

Mouse clicking makes the dot go upwards, otherwise the gravitation makes it go downwards.

This doesn't seem to be a bug

You just seem to want a modified version that uses the pen - which you've done

#Confused

No, what I want is the following:

If (previously in a script) pen is already set down and then the glide block is run, it should sense if the pen is down and in this case set it up as shown in the screenshot above, then set it down again.

That's what I meant in the first place, but you're right that I haven't explained myself clearly enough.

With you now

This should do the job

Thank you, Simon.

P. S.
I still think the glide block from the official animation library needs to be updated.

Thank you for your input. We will look into the request.

Best,
The Snap! Team

You're asking us to impose something you need for one project onto everyone, when it's easy enough for you to do it yourself:

Whereas if we do what you want, there's no way for users who want the existing behavior to get it.

Bottom line: It's deliberate that the pen state is independent of the motion commands.

How is @jedi_force a moderator when they join Jan 3 and just now posted??

I think he/she is one of the Snap! team.

Also, I noticed @bhenrique is a new moderator I don't know where he comes from, like @jedi_force.

confusion

No, it's an error in the glide library. The destination coordinates are established by a forth-and-back move. It's quite obvious that the pen should not draw in that phase and be restored to its previous state.

Execute this script to see the problem (with long duration)

I believe some introductions are in order! I am the newest member of the Snap! team through a partnership with SAP. I have been working with the UC Berkeley Snap course (Beauty and Joy of Computing) since 2018 as a Graduate Student Instructor. Looking forward to engaging with the forum community!

Oh! Sorry, I totally didn't understand that. Sorry, @kinestheticlearning! Ok, I'll get that fixed. Thanks.

Yes, two new moderators. Sorry for any confusion. They're Berkeley grad students working on Snap!.

ngl the mods here are good

That's awesome! I was confused at first, but it all makes sense. I love that you guys are expanding the snap team, and more mods are always great.

I prefer

By the way I also was confused by the post by @dardoro until I tried the example he mentioned.

Thanks! And thanks to SAP, who's paying for their time. (Strange SAP politics; for some reason beyond me, this is easy to pay for, but cloud support, which they promised, in a contract with Berkeley, to pay for, they haven't found a way to get past their bean counters yet.)

Umm are you saying you want us to add that to the animation library? Because we're just fixing a bug here, not building a new toolkit. If we were, I'd do a SICP-esque uber-abstraction on your block:

:~P

I'm unsure if it belongs in a library but it is a style I prefer because this kind of thing comes up often enough to warrant an abstraction. I like the SICP version though it does require more sophistication for someone to understand how run with pen up action works.

Do you know about the JavaScript version of Structure and Interpretation of Computer Programs which will be out next month?