Back in the days of Flash, I’d get to “model” snow a couple of times around Christmas every year. For some animated corporate Christmas cards, usually. So, when the time came to try out the WebVR Boilerplate – that’s what I chose for my first experiment. Gently falling snow.
(The above example is an iFrame – to pop it out for your VR goggles, click here)
The WebVR Boilerplate is a collection of files that does everything you need to do to get something in WebVR up and running, really easy. So that seems perfect for me! The base-state of the boilerplate shows just a rotating cube, in a room defined by a bright green grid. So all I did, to make this demo, was to remove the cube and start coding up the snow!
Lie down under a maple tree, and watch the keys lazily drift down towards you. In your VR goggles, with WebVR!
(This is in an iFrame – to pop it out for your VR goggles, click here)
I’d written a demo using THREE.js some time back, that simulated maple keys falling in the spring. Having secured some VR goggles (Samsung Gear VR with a Galaxy S7), and tried no end of VR experiences, it seemed like I should “port” that demo into an immersive version.
About a week ago, I got my first set of VR goggles. Nothing fancy – it’s the Samsung Gear VR. I explored some of the demos. (great fun!) Some of what I explored was WebVR, which just became available on Gear VR (without the use of “experimental browsers”) a couple of weeks ago – albeit with a “deprecated API”. (which means, an old obsolete version.) Then I took a crack at a tool called A-Frame.
A-Frame makes WebVR easy. Easy peasy. It reminds me of X3DOM – it’s a “declarative language”, so it drives a lot like HTML5. All of the things you declare when you’re using A-Frame get added to the “DOM” (Document Object Model), so everything in your “world” can be accessed and manipulated just like you would the elements on a plain, old-fashioned web page. Which, really, makes a lot of things easy. Easy peasy.
I don’t always try to get to the bottom of a new technology before there’s commercial demand for it. But when I do, it’s because the potential of a technology really stands out. And that’s the case with the dawn of WebVR.
I’d tried a bunch of the WebVR demos on my flat monitor. Yup, that provides a 3D experience like anything from VRML on. But the kick with WebVR is that your 3D stuff can get rendered either on a monitor, or in a VR headset.
So you’re a web developer, and you’ve been hearing things about VR. I’m also a web developer, and I’ve also been hearing things about VR! And I’ve been blogging about it. Not just VR – but how VR is very likely to soon become both a crisis and an opportunity for web developers. So what are the prospects for VR for web developers?
Today is April 8, 2016. The Oculus Rift and the HTC Vive both tried to start shipping in the last couple of weeks – and it’s been a bit of a mess. But even so, eager early adopters have raved up and down that this revolutionary technology finally actually works.
Given that VR goggles have been available to consumers for DAYS, not even weeks, and given that the only people who have even heard of the Oculus Rift are gamers and sports fans, I think all the pessimism about a “virtual reality web” may be a little bit premature. Or so I’d like to think, anyway.
I saw this article today about a “virtual reality web” – and was amazed at both how forward-thinking, and pessimistic it was.
The opening paragraph paints a pretty elaborate picture of something that’s, well, science fiction:
“What if you could browse the web in virtual reality? Just imagine the potential. Hyperlinks could take you not to Wikipedia pages about history, but right to the landscapes of ancient cultures, immersing you in plagues and art and war. Recipe sites could give you smell-o-vision cooking simulations. Message boards could become face-to-face chats. The web as we know it could become tangible, interactive, and more immersive than ever.”
idoru.js is an experiment I’m working on with artificial characters in virtual worlds. The idea is that to provide good “user experience” (UX) in a virtual world, a character must have good “stage presence” to stimulate engagement.
The idea is to create a framework for an artificial character that is charming and attentive to the user. This character can then be “dressed up” with any imaginable avatar. It can be given any “job” that anyone cares to script.
A good suit and deep knowledge are not enough to make a person engaging in the real world. A person needs body language. A person needs to be attentive to the person they are engaging. They need to make eye contact. They need to interact with a person’s personal space in a thoughtful, polite way.
I’ve always loved it when maple keys come showering down from the trees.
So this is what I chose for my first “cross-technology” bit of eye candy. I made a model of a key in Blender. I exported it as a .JSON file, and imported it into three.js. Once there, I created hundreds of it, and wrote some hackey code to make them drift lazily down from the trees right where the camera is pointed. And then I added a 360 degree background image. Continue reading “Virtual Silver Maple Keys”