Three.js: Material map can't get webglTexture handle

Created on 25 May 2017  路  1Comment  路  Source: mrdoob/three.js

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
  • [x] r85
  • [ ] ...
Browser
  • [ ] All of them
  • [x] Chrome
  • [ ] Firefox
  • [ ] Internet Explorer
OS
  • [ ] All of them
  • [ ] Windows
  • [ ] macOS
  • [x] Linux
  • [ ] Android
  • [ ] iOS
Hardware Requirements (graphics card, VR Device, ...)
Question

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings