-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Open
Description
Description:
- A-Frame Version: 1.3.0
- Platform / Device: Any
- Reproducible Code Snippet or URL:
<!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');
- Result: Texture is not repeated correct.
- Expected: Texture is repeated twice.
- Interesting:
document.querySelector('a-plane').getObject3D('mesh').material.map.wrapS;(and wrapT) is 1001 but should be 1000 (=THREE.RepeatWrapping)
Workaround (choose one):
- Set
material="repeat: 1.001 1.001"as initial value - call
document.querySelector('a-plane').getObject3D('mesh').material.map.needsUpdate = true;once
Metadata
Metadata
Assignees
Labels
No labels