Skip to content

material: repeat doesn't work, when repeat has default or '1 1' set #5120

@Dirk-27

Description

@Dirk-27

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):

  1. Set material="repeat: 1.001 1.001" as initial value
  2. call document.querySelector('a-plane').getObject3D('mesh').material.map.needsUpdate = true; once

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions