Material map can’t get webglTexture handle

Create material
var material = new THREE.MeshBasicMaterial();
      material.map = new THREE.Texture(canvas);
      material.transparent = true;
      material.side = THREE.DoubleSide,
      material.opacity = 1;
      material.map.minFilter = THREE.LinearFilter;
      material.map.magFilter = THREE.LinearFilter;
      material.map.generateMipmaps = true;
      material.map.needsUpdate = true;
Get material target

var handle = material.map.__webglTexture;

Description of the problem

but why handle is always return undefined, Before r69 version can get handle return WebGLTexture but r85 version can’t i don’t understand Thank you 🙂

Three.js version
  • Dev
  • r85
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Author: Fantashit

1 thought on “Material map can’t get webglTexture handle

Comments are closed.