# Hello World and Portal Rendering

**URL:** <https://discourse.threejs.org/t/hello-world-and-portal-rendering/87465>\
**Category:** Showcase\
**Tags:** perspective-projection, portals, camera-controls, camera\
**Created:** [October 10, 2025, 9:51pm UTC](https://discourse.threejs.org/t/hello-world-and-portal-rendering/87465 "2025-10-10T21:51:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![latentJake](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/latentjake/32/63818_2.png) [@latentJake](https://discourse.threejs.org/u/latentJake)\
**Post date:** [October 10, 2025, 9:51pm UTC](https://discourse.threejs.org/t/hello-world-and-portal-rendering/87465/1 "2025-10-10T21:51:30Z")

</div>

Hey cool peeps! Just wanted to introduce myself and share some of the projects I’ve been working on! I’m actually new to programming and at this point all I really know was learned while working on this PortalCamera project over the past year.

I got really into off axis rendering like this project from Johnny Lee’s desktop vr display with the Wii.  
[Head Tracking for Desktop VR Displays using the WiiRemote](https://www.youtube.com/watch?v=Jd3-eiid-Uw)

![portalclip2](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/b/8/b87b3a8da2b05b35b2e10595f4738c48660da45c.gif)

It was a long process of researching, trial and error and too many prompts than i’m willing to admit but I’ve finally got the tools to a place that they’re pretty performant and are a good foundation to dive deeper and make games or portal experiences with.

There’s actually been quite a few versions of this type of rendering over the years but most of them are outdated or required hardware that I didn’t have. The best solution I could come up with was using a vision model from mediapipe to track the user’s “gaze-point” between the eyes and create a coordinate output that was relative to the user’s monitor.

From there I had to adapt Robert Kooima’s General Perspective Projection formulas to a webgl format that three.js could utilize.

Here’s an all-in-one demo that bundles the tracker and the three.js project together on one page:  
[three.js webgl — PortalCamera (off-axis) — Littlest Tokyo](https://latentjake.github.io/portal-camera-demo/)

there’s an auto-calibrate wizard to get an initial alignment to your monitor and from there you can change the gains and offsets to better line things up.

This version isn’t as fast as the standalone version where I separate the tracker from the renderer.

You can run this [head tracker](https://github.com/latentJake/portal-head-tracker) as its own web application and it connects via a websocket to this standalone [portalcamera demo](https://github.com/latentJake/portalcamera-standalone)

and the last link (i promise) is basically another standalone demo that is as minimal as possible, it’s a great way to really see the core code that connects all the different components: [minimal portal camera demo](https://github.com/latentJake/portalcamera-minimal).

I apologize if this is confusing, there’s more technical details in the repos but I’m just excited to share this project, and see if anyone else is excited about it too 😅.

Let me know if any of you end up trying it out and how it works or if you have issues!

-Jake

> [@latentJake](#):
>
> Hey cool peeps! Just wanted to introduce myself and share some of the projects I’ve been working on! I’m actually new to programming and at this point all I really know was learned while working on this PortalCamera project over the past year.
> 
> I got really into off axis rendering like this project from Johnny Lee’s desktop vr display with the Wii.  
> [Head Tracking for Desktop VR Displays using the WiiRemote](https://www.youtube.com/watch?v=Jd3-eiid-Uw)
> 
> It was a long process of researching, trial and error and too many prompts than i’m willing to admit but I’ve finally got the tools to a place that they’re pretty performant and are a good foundation to dive deeper and make games or portal experiences with.
> 
> There’s actually been quite a few versions of this type of rendering over the years but most of them are outdated or required hardware that I didn’t have. The best solution I could come up with was using a vision model from mediapipe to track the user’s “gaze-point” between the eyes and create a coordinate output that was relative to the user’s monitor.
> 
> From there I had to adapt Robert Kooima’s General Perspective Projection formulas to a webgl format that three.js could utilize.
> 
> Here’s an all-in-one demo that bundles the tracker and the three.js project together on one page:  
> [three.js webgl — PortalCamera (off-axis) — Littlest Tokyo](https://latentjake.github.io/portal-camera-demo/)
> 
> there’s an auto-calibrate wizard to get an initial alignment to your monitor and from there you can change the gains and offsets to better line things up.
> 
> This version isn’t as fast as the standalone version where I separate the tracker from the renderer.
> 
> You can run this [head tracker](https://github.com/latentJake/portal-head-tracker) as its own web application and it connects via a websocket to this standalone [portalcamera demo](https://github.com/latentJake/portalcamera-standalone)
> 
> and the last link (i promise) is basically another standalone demo that is as minimal as possible, it’s a great way to really see the core code that connects all the different components: [minimal portal camera demo](https://github.com/latentJake/portalcamera-minimal).
> 
> I apologize if this is confusing, there’s more technical details in the repos but I’m just excited to share this project, and see if anyone else is excited about it too 😅.
> 
> Let me know if any of you end up trying it out and how it works or if you have issues!
> 
> -Jake

---

<div class="post-metadata">

**Author:** ![dubois](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dubois](https://discourse.threejs.org/u/dubois)\
**Post date:** [October 10, 2025, 11:56pm UTC](https://discourse.threejs.org/t/hello-world-and-portal-rendering/87465/2 "2025-10-10T23:56:58Z")

</div>

Nice!

My first threejs project was exactly this, I was trying to skew the projection matrix. Never got around to hooking it up to a tracker ☹

---

<div class="post-metadata">

**Author:** ![latentJake](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/latentjake/32/63818_2.png) [@latentJake](https://discourse.threejs.org/u/latentJake)\
**Post date:** [October 11, 2025, 12:17am UTC](https://discourse.threejs.org/t/hello-world-and-portal-rendering/87465/3 "2025-10-11T00:17:57Z")

</div>

It’s really fun to mess around with.

Even without the head tracking element, being able to skew it could be useful for literal projector maps like luma map or the light form projectors. I always found that stuff so cool and still get a kick out of those Madison square garden ads that mess with perspective.
