Next up is an interactive 3d website from one of my favorite artists: Saba.
Update: The site was originally hosted at sabapivot.com but it's since been reverted back to his home page. This'll be a good lesson for me to include video captures of future microsites because they tend to have shorter life-spans
It's a fun concept site for his fans built on the three.js 3d library.
John Walt Foundation
Before getting into the site, if you rock with Saba, please check out the John Walt Foundation. Named for his late cousin John Walt, it's an amazing organization doing great things. They recently hosted a fun, informative, and socially distant writing session. Featuring Saba, Joseph Chilliams, Defcee, and Benjamin Earl Turner, its focus was encouraging self-expression. The foundation also put on an awesome food drive with a huge turnout.
I'll give the foundation some more shout-outs at the end of this article.
Chances are you've heard Saba even if you haven't realized it.
If you listen to Chance The Rapper, you heard Saba on "Angels", the lead single off "Coloring Book".
If you listen to anyone in the Chicago new school, you've certainly heard Saba on one of his countless collaborations with artists ranging from Noname to Mick Jenkins to Jamila Woods to the previously mentioned Chance the Rapper. He's also formed a super-group of sorts with Noname and Smino.
If that all sounds familiar, it may be because I wrote briefly about Saba here when discussing one of my favorite artists of 2020, singer-songwriter Gaidaa, who I found through a Saba co-sign.
But if you're still not familiar, it's a great time to get familiar. Saba is two studio albums into his career and about to release his third.
At least that's what this tweet made me hope a few weeks ago:
Bout that time 👀— SABA (@sabaPIVOT) September 15, 2020
Cue the hype!
Later that day he followed up with this tweet:
Text me +1 773-345-9523 ☎️ pic.twitter.com/Bh7gtPK82e— SABA (@sabaPIVOT) September 15, 2020
If you text the number you get a quick reply back from "Saba" with a link to a website named community.com to share your contact info:
what up it's Sab. thanks for hitting me up. just click the link and add yourself to my phone so I can text you directly 🙏🏾. looking fwd to hearing from u
The link asked for a lot more personal information than I expected, so I looked it up. After some research it looks like community.com is a growing method of artist/fan engagement and let's artists "text" their fans directly. Their site touts tons of public figures using the platform. Even Obama is using it.
As someone who turns on Twitter notifications for my favorite artists, I'm pretty intriged by the idea and I'll stay tuned to see how Saba uses it.
Two days later brings us to the topic of this post:
Crack the code ☎️ https://t.co/v7h5pOGRTa— SABA (@sabaPIVOT) September 17, 2020
Crack The Code
If you haven't yet, check out the Crack the Code site, which is actually Saba's homepage re-purposed.
You'll notice the familiar red telephone from his "Text me" tweet, and that the entire scene is interactive. You can change your perspective, you can zoom, and you can tap buttons.
Different buttons trigger different audio cues, almost like a telephone drum machine. But where are these sounds from?
And what about the code? One way to find the answer is to read the comments on Saba's Twitter and Instagram posts. But is there another way?
Take your own crack at the code before continuing...
Like I did on my Gaidaa post, I want to continue analyzing the source code behind these amazing music websites. Plus I knew the answer had to be somewhere in the code.
For example, the code from Gaidaa's video game website contains relatively readable references to the collectable items and enemies:
Meanwhile, the code on Saba's website looks like this...
So what the heck is going on here? The difference is that Saba's code is minified.
Minification is a common practice on the web that reduces the size of code.
Code is minified by doing things like removing spaces, tabs, new lines, and shortening lots of the variables names. In the screenshot above you can see lots of single letters like
In Gaidaa's code, you see things like
this.load.atlas. If Gaidaa's code was minified, it might look more like
This may seem silly, but one huge reason to do this is cost savings.
It may not matter as much on a personal blog like alej.hiphop, but if you add up bandwidth costs on websites with millions of views, every byte adds up quickly.
Thankfully there is a way to make this code a little easier to read. Every browser has a way to "pretty print" the code, or restore some of the spacing that existed before. You'll still have lots of non-sensical short snippets of text but it'll take you a long way.
Looking closer at the snippet of Saba's code from earlier, you can see that not every variable is short. For example, this highlighted text looks promising:
If we "pretty print" the code and let the browser restore the spacing and indentenation, suddenly the code is marginally more approachable:
We'll analyze this in a second, but first let's look around the code some more.
Scrolling through the code in general, the top of the file is especially difficult to parse.
If we go towards the end and start looking for more meaningful clues, we see words like the previously mentioned
unlockNumber as well as other good launching points for any curious debuggers such as:
This is a library that let's you view and interact with 3d objects, specifically WebGL objects, in web browsers.
This reference to Raycaster as well as viewing the files loaded by the browser confirm that three.js is the library that this site is built on.
If you open the Network tab in your web browser, you can even download the 3d objects yourself and view them individually.
For example here are the main objects that form the scene:
Slowly the site becomes more and more approachable.
(Side bar: if all this talk about "inspectors" and "network tabs" and "libraries" sounds interesting to you, but also sounds like mumbo jumbo, reach out to me on Twitter and I'll update this post with more technical details. My goal is to feel out what kind of technical interest exists and fill that need.)
So there you have it! The three.js library (along with 3d WebGL objects) is what makes this site tick, but what about the answer to Saba's prompt to "crack the code"?
The Code... Cracked
If you haven't guessed it yet the answer can be found – where else? In the code.
unlockedNumber variable from earlier, and searching for it in the pretty printed code, we find the answer laying in plain sight:
In fact if you look at the code from earlier, this makes a lot of sense:
Even though a lot of the code is shortened (because of minification) a lot of this is understandable, even without coding knowledge.
The first line of this code tells us this snippet of code is meant to
checkForUnlock, aka check if users have unlocked whatever this site is hiding.
We can also see there is lots of
matching-ing going on in this snippet.
Specifically, we see some
=== symbols next to the
unlockNumber code (which we know is "7, 7, 3").
We then might be able to guess that this code is trying to check if the
numbersPressed by the user are
7, 7, 3.
And in fact when you click those 3 numbers on the website, at last, our reward is unlocked.
The result is Saba's first single of 2020, "Mrs. Whoever". Even better, he immediately followed it up with another single, "Something in the Water" featuring Denzel Curry.
And with that, Saba season has officially started.
If you hadn't seen the answer on social media and didn't go into the code, the answer may have come to you if you tried the area code of Saba's hometown, Chicago.
Or even simpler than that, the answer was in his very first tweet to text him at 773-345-9523.
The Wrap Up
As a recovering vinyl-head, lots of websites that sell limited edition collectibles (like vinyl records) contain information on the number of products left in stock in their HTML source code.
Or if you're writing a blog and find design inspiration on another website, going into the Inspector can often help you find out what libraries or plugins that site is using.
All that to say I hope you enjoyed this and took something useful from it.
As one final treat, I found a fun function while searching the source code:
Though I couldn't figure out what it did after continued searching, the function is named
yoyo. I love having fun with my code and I'm happy this developer does too.
John Walt Post-Script
I offer one last bit of encouragement to readers who've made it this far.
And finally, and most importantly, please consider contributing to one of his initiatives in the John Walt Foundation. Even if you're not a Chicago local, you can always donate. Any little bit helps, especially in these crazy times.
If you enjoyed this breakdown, please feel free to retweet and share.