Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

spritesheets are, and always will be, a fun trick! ⚡ translate with css based on pointer position grace note™ blink included ♪

154,132 görüntüleme • 1 ay önce •via X (Twitter)

55 Yorum

Peter Petrash profil fotoğrafı
Peter Petrash1 ay önce

spritesheeted myself for my site ☺️ it has a mood system underneath including easter egg behaviors (eg. try hypnotizing it with your mouse)

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

haha 😅 that's real good i think where this one wins is because it doesn't try to be the "centerpiece", it's one of those where you've lined it up to be discovered easily, but then lets the user feel like they discovered it 👏

Peter Petrash profil fotoğrafı
Peter Petrash1 ay önce

appreciate it Jhey 👊

Boyd profil fotoğrafı
Boyd1 ay önce

I did something similar to this but for my dog.

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

love it - that's so good! 🐶

Boyd profil fotoğrafı
Boyd1 ay önce

Least I could do for him. He was a huge personality in our house.

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

i have no doubts from the pictures 🥲 such a lovely tribute 🫶

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

and of course, sorry for your loss Boyd, never quite know what the right words are 🙏 but, the "love it – it's so good" were definitely in regards to how well you have delivered that tribute 🫶

Boyd profil fotoğrafı
Boyd1 ay önce

Thanks! We miss him as a family but time has healed the immediate loss. Appreciate the kind words both about Pi and the project.

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

i didn't bookmark the post i saw doing the rounds for this the other day 🤦‍♂️ but saw a bunch of 'em so if someone has it to reference 🙏

Chauve Camille profil fotoğrafı
Chauve Camille1 ay önce

😮

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

that's the one i was looking for to QT 🙏 different technique but the same concept 💯

oil-oil profil fotoğrafı
oil-oil1 ay önce

I also implemented a similar effect on my website,

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

had a few questions about this one 🤙 - quick way: generate a video based on a character map and use ffmpeg etc. to split frames and create the sprite (you don't need a 3mb sprite file! compress!) - smoothing: track pointer pos + eased pos. the eased pos plays catch up, use that

Joel Stransky ✨ profil fotoğrafı
Joel Stransky ✨1 ay önce

I did this in 2005 in Flash.

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

never got to play with flash 🥲

Joel Stransky ✨ profil fotoğrafı
Joel Stransky ✨1 ay önce

You would have been the best of us.

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

ha 😅 i highly doubt that but from what i understand, that was an incredibly fun/creative era

Hurricane Zane profil fotoğrafı
Hurricane Zane1 ay önce

where is beaver demo? my son is requesting access

Techies Reviews profil fotoğrafı
Techies Reviews1 ay önce

Wohoo sprites are back baby!

dennys dionigi profil fotoğrafı
dennys dionigi1 ay önce

Fun trick also here 😆

Geryy profil fotoğrafı
Geryy1 ay önce

Back in my times we used sprite sheets for button hover states.... 🧓

mr.tipton profil fotoğrafı
mr.tipton1 ay önce

I love sprite sheets. I built a native utility app with sprite sheets being the UI. Haha This one is so good! Love the look and smoothness

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

sprites are always fun! i did put a little "smoothing" slider in there to try help things out on it 😁

mr.tipton profil fotoğrafı
mr.tipton1 ay önce

Looks great man

Jimmy Lee profil fotoğrafı
Jimmy Lee1 ay önce

This is so good, the future of avatars

Brayan profil fotoğrafı
Brayan1 ay önce

Any tips on smooth sprite animations?

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

in this case, keep the pointer position as "the target" then lerp/ease a separate value towards it on every frame and use that eased value to drive the spritesheet frame you’re smoothing the input, not the sprite itself 🤙

Ismael profil fotoğrafı
Ismael1 ay önce

Wait, I need this for my website

Ahmed Dahbi profil fotoğrafı
Ahmed Dahbi1 ay önce

wow super cool! love the blink 😉

Occam’s Orange profil fotoğrafı
Occam’s Orange1 ay önce

How did you generate the sprite in the first place? When i tried using gpt image or gemini, it keep duplicating the same image.

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

the skill with ai is prepping the journey 1. base image for your character 2. character map for your character 3. gaze rig for your character if you try jumping to 3, that's the issue, you need good reference material, and a good model Krea + GPT 2.0 for this one 🤙

Occam’s Orange profil fotoğrafı
Occam’s Orange1 ay önce

Thank you 🙏 I'm trying to make one for

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

ahh yes - you should be able to generate one for that little character 💯 try prompting for the prompts too my gaze rig prompt would start something like: 9x9 spritesheet head-rotation gaze rig for this character (map + basic images attached) and then i'll detail the angles

Occam’s Orange profil fotoğrafı
Occam’s Orange1 ay önce

Got it. Thanks a ton! The character is my son. Gotta pay him royalist

808 profil fotoğrafı
8081 ay önce

Damn thats clean! I love the double blink, adds so much depth. Will this be added sooner or later to the /index?

Mane profil fotoğrafı
Mane1 ay önce

Didn’t know you vibes with beavers like that

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

it's a gopher 🥲

John Cotterell profil fotoğrafı
John Cotterell1 ay önce

The blinking is a really nice touch. I did something similar with this character. It is quite painstaking work doing it with a spritesheet.

Deepak profil fotoğrafı
Deepak1 ay önce

If I could follow one fucking person on X it'll be you man, you're the fucking goat

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

whoah - appreciate that 💯🙏 doin' what i can to try and post a little more again. i've been trying to collect/curate all my work over the years into one spot on my site, it's been takin' a minute 🙇‍♂️

Deepak profil fotoğrafı
Deepak1 ay önce

There's so much alpha in what you post, it's just an endless sea of knowledge. Thank you for your posts

yann · minimal design profil fotoğrafı
yann · minimal design1 ay önce

Is that on Codepen somewhere? 😍

Allie Speers profil fotoğrafı
Allie Speers1 ay önce

omg who is lil fella

jhey ʕ•ᴥ•ʔ profil fotoğrafı
jhey ʕ•ᴥ•ʔ1 ay önce

a little mascot i'm toying with for a project 😁

Simon profil fotoğrafı
Simon1 ay önce

really cool

Crownz | AI & Design profil fotoğrafı
Crownz | AI & Design1 ay önce

It does look fun

Joshua Ress, BSc profil fotoğrafı
Joshua Ress, BSc1 ay önce

I LOVE playing with spritesheets. Such a simple and effective trick

IGGYsosa profil fotoğrafı
IGGYsosa1 ay önce

Very very clever 👏 well done

Shubhu profil fotoğrafı
Shubhu1 ay önce

how many images you generated for this one?

Nattu profil fotoğrafı
Nattu1 ay önce

Thats some neat sprite management.

Anshuman profil fotoğrafı
Anshuman1 ay önce

The explanation on this one is superb!!! 🤯🙌

Dzmitry Drynau profil fotoğrafı
Dzmitry Drynau1 ay önce

Hmm, interesting and cool! I should try to do something like that on our platform.

Joseph Miclaus profil fotoğrafı
Joseph Miclaus1 ay önce

This is way too good... waaay too good.

Massdx profil fotoğrafı
Massdx1 ay önce

how ? can you share a tutorial ?

Benzer Videolar

CSS Trick 🧲 You can create magnetic links with the power of custom properties and some JavaScript 💪 a { translate: calc(clamp(-1, var(--x), 1) * var(--pad-x)) ...; transition: translate var(--s, 1s) var(--ease, var(--elastic)); } a:hover { --s: 0s; } The trick here is to pad out the list items wrapping your links and use that as a translation limit 🛑 Start by using some JavaScript to calculate a value between -1 and 1 for both the x/y axis on pointermove for each list item, not the link! 🔗 If your pointer was at the center of the item, you'd get [0,0]. If it was in the top right, you'd get [1,-1] ☝️ It's worth checking out the JavaScript snippet to see how the mapping function works. Essentially, you create a function that when given a value between two bounds, will give you a mapped value back 🤙 const mapX = mapRange( item.offsetWidth * -0.5, item.offsetWidth * 0.5, 1, -1 ) Then, on pointermove, you plug the pointer position in to get the value back out and pass that into your CSS const x = mapX(item.centerX - event.x) document​.documentElement​.style.setProperty(--x, x) When the pointer leaves the list item, you make sure to reset these values back to 0 ✨ Once CSS has your values, it's the trick of updating the translation of each part You know that in each axis, you only want to translate the link by the padding amount li a { translate: calc(clamp(-1, var(--x), 1) * var(--pad-x)) calc(clamp(-1, var(--y), 1) * var(--pad-y)); transition: translate var(--speed, 1s) var(--ease, var(--elastic)); } This will translate the link within the list item by the desired amount. The cool part here is that you can set an offset for the text inside the link and have that move at a different rate ⭐️ By only updating the --pad-x/y custom properties for the inside the link, you can control how much it moves nav a span { --pad-x: 0.25rem; --pad-y: 0.25rem; } And the last piece, how do you update the behavior for transition speeds? And so it springs back like that? Again, use custom properties ✨ a:hover { --s: 0s; } a { transition: translate var(--s, 1s) var(--ease, var(--elastic)); } By default, a link will use --elastic easing via linear() and have a transition-duration of 1s. When a link is hovered that speed becomes 0s because you want the link to magnetise to your pointer. How about that little gap between when your pointer enters the item but hasn't hovered the link? Set a different transition so it transitions to being hovered 🫶 nav li:hover a { --ease: ease-out; --speed: 0.1s; } That's kinda it! 🙌 Use JavaScript (~40 loc) to get the information and then let CSS do all the lifting for you 💪 Any questions or suggestions, let me know 🙏 If you want a walkthrough video, also let me know please 🙏 CodePen.IO link below 👇

jhey ʕ•ᴥ•ʔ

164,863 görüntüleme • 2 yıl önce