I’m super stoked to share a project that I’ve been working on with three.js.
I’ve put together a 3D portfolio that’s a bit out of the box - quite literally. I used react-three-fiber to craft an impossible box, and each of its faces is a different project I’ve worked on.
And the cherry on top - this project bagged an Honorable Mention on Awwwards!
I’d really appreciate any feedback you guys might have. If you spot something off, or have suggestions to make it better, do let me know. I’m all ears for ways to improve.
It is beautiful and captivating. If I stay more than 30 seconds watching a showcase, it means I like it. I stayed a few minutes with (or in) your impossible box.
As for glitches, there are some:
the asset loading bar is not honest, see where 50% is (sometimes it is 1/3, sometimes it is 1/4 full)
the maze has some z-fighting
when I enter the house generation room, I cannot exit (tried pressing the close button many times), the exit buttons of other rooms work fine
I tried to look under the box or on top of its roof (in case there is some Easter egg), … but there was none
Also, congrats for the honorable mention on Awwwards!
Thanks heaps for your feedback on my project! I’ll tackle those unnoticed bugs ASAP. As for the Easter egg on the box top and bottom - love the idea, but it’s tricky with the current setup
I’m really scratching my head over this issue as it seems to crop up only on certain devices. Could you please let me know the type of device and browser you used? This info would be super helpful in troubleshooting
Thanks so much for going the extra mile and running these tests, I really appreciate your help.
I tried your fix, but I can’t tell if it worked because I’m not able to reproduce the bug on my end
The issue is strange because the maze is just one plane, so it’s weird that it would have z-fighting with itself. I think it might be a shader issue, but I’m not sure why this would happen on some devices and not others
Honestly, this issue has me totally stumped
I’m not even sure where to start fixing this.
But I really appreciate the information - it could come in handy as I continue to troubleshoot
Sorry for the delay. I’ve put together a CodeSandbox with everything needed to reproduce the bug. Here’s the link: CodeSandbox Link
Thank you for taking the time to help me try to solve this issue, I really appreciate
However, the color looks wrong. So, when I look how wallHeight is used, I see direct compare of floating point values. This is dangerous. When I replace a==b with abs(a-b)<0.001, the color looks OK with wallHeight = 10:
It turned out to be an easy fix after all!
No more comparing floating-point values for me – I’ve learned my lesson haha
I’ve made the correction on the site, but this time I’m the one with a Z-fighting issue
To resolve it, I removed the polygon offset and adopted this code organization and it seems to work:
This is seriously cool. Apart from cube itself with the “portals”, the I especially like the house layout generator. Did you use a wave-function collapse method for this?
Thank you! No, I don’t even know what that is. I created a 3-dimensional js array where I fill in information like ‘wall’ or ‘staircase’ with algorithms, and then I use that array to generate the three.js geometries