hedron | A no-frills flexbox grid system for React | Frontend Framework library
kandi X-RAY | hedron Summary
kandi X-RAY | hedron Summary
A no-frills flexbox grid system for React, powered by styled-components.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Loads all the libraries in the store .
hedron Key Features
hedron Examples and Code Snippets
Community Discussions
Trending Discussions on hedron
QUESTION
Why won't a MeshPhongMaterial's envMap
property work on polygonal faces when viewed through an orthographic camera?
It works on spheres but not an IcosahedronGeometry, for example. If I set the detail
parameter of the IcosahedronGeometry to 2+ (more faces), the envMap begins to show. But if I switch to perspective cam, the envMap is fully visible even with detail
of 0.
This is what it looks like with perspective cam, note the cubemap reflection of some clouds:
This is what it looks like with orthogonal cam and detail
is 0, note the lack of cubemap reflection (please ignore the warping of the image):
Orthogonal cam, detail
is 1; cubemap reflection is back:
The only difference between these two versions of the script is the camera.
Here's the code I'm using to create this object:
...ANSWER
Answered 2022-Jan-05 at 01:54This is the expected behavior.
- With perspective cameras, the reflective "rays" separate as they get further away from the camera, reflecting a wider angle of the envMap.
- With an ortho camera these reflective "rays" do not separate because they're parallel. So the reflection on a flat face is a very narrow angle of the envMap.
See this demo I quickly put together to demonstrate what you're seeing:
- It seems to work on spheres because when the parallel orthographic "rays" bounce off a rounded surface, these rays grow wider apart. They are no longer parallel (as is the case with a Perspective camera).
You can see the reflections still work on your demo because the faces alternate between light and dark as you rotate them. You're just looking at a much narrower segment of the envMap:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install hedron
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page