Open Dirk-27 opened 2 years ago
Description:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>A-Frame - material texture repeat issue</title> <meta name="description" content="A-Frame"> <script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script> </head> <body> <a-scene> <a-plane src="https://cdn.vrdoro.com/data/vrdoro/images/11/1663758749743.jpeg" position="0 1.6 -1" rotation="0 0 0"></a-plane> </a-scene> </body> </html>
Now do in console of browser inspector: document.querySelector('a-plane').setAttribute('material', 'repeat:2 2');
document.querySelector('a-plane').setAttribute('material', 'repeat:2 2');
document.querySelector('a-plane').getObject3D('mesh').material.map.wrapS;
Workaround (choose one):
material="repeat: 1.001 1.001"
document.querySelector('a-plane').getObject3D('mesh').material.map.needsUpdate = true;
FWIW, wrapS and wrapT values are correct. I think we just need to call needsUpdate on the map. Example on glitch
needsUpdate
Description:
Now do in console of browser inspector:
document.querySelector('a-plane').setAttribute('material', 'repeat:2 2');
document.querySelector('a-plane').getObject3D('mesh').material.map.wrapS;
(and wrapT) is 1001 but should be 1000 (=THREE.RepeatWrapping)Workaround (choose one):
material="repeat: 1.001 1.001"
as initial valuedocument.querySelector('a-plane').getObject3D('mesh').material.map.needsUpdate = true;
once