aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
655 stars 203 forks source link

material 'repeat' parameter is not reflected on scene until a shader change #462

Closed feiss closed 7 years ago

fernandojsg commented 7 years ago

Have you tried doing that directly on aframe and not just in the inspector? Just to know if it's an issue from the inspector or the way to go on aframe

feiss commented 7 years ago

hmmm.. it seems an aframe issue. If I try this:

<!DOCTYPE html>
<html>
<head>
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
</head>
<body onload="onload()">
<a-scene>
  <a-assets>
    <img id="groundTexture" src="https://cdn.aframe.io/a-painter/images/floor.jpg">
  </a-assets>
  <a-circle rotation="-90 0 0" radius="32" material="shader:flat; src:#groundTexture; repeat: 1 1;"></a-circle>
</a-scene>

<script>
function onload(){
  document.querySelector('a-circle').setAttribute('material', {repeat: '5 5'});
  // document.querySelector('a-circle').setAttribute('material', {shader: 'standard'});
}
</script>
</body>
</html>

The repeat 5 5 is not updated in the scene unless I remove the comments on the line that changes the shader

fernandojsg commented 7 years ago

Ok, I'll close it here, do you mind opening an issue on aframe repo and just reference it from there?

feiss commented 7 years ago

sure