Device Orientation with Vanilla JavaScript (Vintage Hologram Effect)

preview_player
Показать описание
We learn to use the device orientation using vanilla javascript. We use the device orientation to create an old-school (vintage) hologram effect similar as those in this video:
(Polaroid phantagrams The World of Nature Krypton laser holograms by @Smirholo)

You can create this effect with simple, vanilla JavaScript and using two images on your computer. For example, I use the images with Leonard and Radu from here:

Leonard and Radu are characters in many of my Edutainment videos from here:

To test on your device, you can upload your code to github and use github pages, or, as I show in the tutorial, you can use codepen.

⭐ MORE LINKS ⭐

Interpolation Video

Codepen

Same place different seasons:
Рекомендации по теме
Комментарии
Автор

Radu always with unique and awesome content, not just traditional web developing tutorials like a todo list, or e-commerce etc, always showing you how to use JS in diffrent ways.

juancamacho
Автор

You always bring nice content to us, thanks from Brazil!

alexandremccastro
Автор

That was a really cool use of the sensors! Imagine making the images from an horror site, that changes when you view them when laying down, and the smartphone is above your head! Hahah nice one Radu!

pesterenan
Автор

Dude that's super cool! Your content is greatly unique

EnglishRain
Автор

It's amazing how every time I watch one of your videos I learn so many new things.

igor
Автор

Wow. Some really nice project, didn't know the devTools have this feature. Learned again from you. Thanks.

mircast
Автор

love you bro, you're making amazing content.... more power to you..

senorperez
Автор

Your content is really amazing and different rather than other . Love 💞 thanks from india

getsetalk
Автор

💯
I have commented this on your previous video

But I have to first turn on it in devtools I'm on Samsung A04e then it works

MadaraAzukar
Автор

it would be interesting, starting with the same promise (the tilting of the phone), being able to maintaing the dimension and direction of an image on the screen, so that it cannot distort based on the tilt of the phone (i hope you understand). so when you tilt the image the image remain with the same dimension and prospective visible from any angle.

checosa
Автор

Mate, what web hosting do you recommend? Is there a free one for learning?

alwysrite
Автор

is it possible to make compass with javascript and device accelerometer? please do teach that sir

Son_Goku
Автор

is it possible that to switch urls or tabs on browser quickly by tilting phones though👀

basiccoder
Автор

Hello. Do these sensors require special permissions in chrome?

KlinovAS