three.js how to make double sided object

In your case, you add the following to your callback function: objects.traverse( function( node ) { if( node.material ) { node.material.side = THREE.DoubleSide; } }); The doubleSided property of Mesh is deprecated. It was replaced with the side property of Material Also, it is best to learn from three.js examples that work with the current … Read more

Error message “Uncaught TypeError: Cannot destructure property ‘basename’ of ‘React2.useContext(…)’ as it is null” [duplicate]

You’re using Link from react-router-dom, which is calling useContext. The context it is looking for is provided by BrowserRouter, but your app is not wrapped by a BrowserRouter. Your index.js: import { BrowserRouter } from ‘react-router-dom’ render( <BrowserRouter> <App /> </BrowserRouter>, document.getElementById(‘root’) )

three.js outer glow for sphere object?

I’ve worked a bit on separating out the part of the WebGL Globe code (linked to above) that produces the atmospheric effect. A preliminary working version is here: http://stemkoski.github.io/Three.js/Atmosphere.html To the best of my understanding, there are a few interesting things going on in the original code to create the atmospheric effect. First, the glowing … Read more

Multiple transparent textures on the same mesh face in Three.js

Use ShaderMaterial and set both textures as uniforms, and then blend them within shader. I made this example: http://abstract-algorithm.com/three_sh/ and that really should be enough. So, you make ShaderMaterial: var vertShader = document.getElementById(‘vertex_shh’).innerHTML; var fragShader = document.getElementById(‘fragment_shh’).innerHTML; var attributes = {}; // custom attributes var uniforms = { // custom uniforms (your textures) tOne: { … Read more