Загрузка видео...

Не удалось загрузить видео

На главную

SVG filters provide a basic lighting system you can sync with a little JavaScript and use in your web apps 💡 ... not as powerful but pretty cool

315,415 просмотров • 1 год назад •via X (Twitter)

Комментарии: 11

Фото профиля jhey ʕ•ᴥ•ʔ
jhey ʕ•ᴥ•ʔ1 год назад

alternative approach here is a masked pseudoelement that uses CSS backdrop-filter: blur() + contrast() + brightness() combos ⚡ fun to try out the SVG version though – you can read more about <feSpecularLighting> here 👇

Фото профиля Mo
Mo1 год назад

Only a matter of time before we get liquid-glass.js

Фото профиля Renato Ribeiro
Renato Ribeiro1 год назад

guys stop retweeting this before it reaches my team's designer

Фото профиля jhey ʕ•ᴥ•ʔ
jhey ʕ•ᴥ•ʔ1 год назад

haha - don't show them plz 🙏

Фото профиля Venil Designer
Venil Designer1 год назад

This is actually really cool, you are the dev every designer needs lol

Фото профиля cubiq
cubiq1 год назад

you can achieve similar effect without having to sync it with js just by ramping up brightness and saturation for the backdrop filter the effect is not as pretty but it's an approach without any js 😅

Фото профиля jhey ʕ•ᴥ•ʔ
jhey ʕ•ᴥ•ʔ1 год назад

did mention that approach - as you say, it can be "similar" 🤏 but it lacks "control" and you have to rely on the light being in the backdrop or duplicating the light source to make sure there is one in the backdrop (got a follow up with "extras" 🤙)

Фото профиля Ryan Vogel
Ryan Vogel1 год назад

maybe thin the border and add a radial gradient to show "rounding"?

Фото профиля jhey ʕ•ᴥ•ʔ
jhey ʕ•ᴥ•ʔ1 год назад

went with the border like that for video compression 😅 you don't have control over "rounding", it's specular lighting based on the phong lighting model – you jus' get control over intensity, height, position, etc. alternative is masked backdrop-filter blur + contrast ✅

Фото профиля Marc Seitz — oss/acc
Marc Seitz — oss/acc1 год назад

Where does the light come from? Are the app icons the light source?

Фото профиля jhey ʕ•ᴥ•ʔ
jhey ʕ•ᴥ•ʔ1 год назад

mapping the icon positions to fePointLight positions relative to the surface position the caveat is that light sources are single color

Похожие видео