aframe-draw-component icon indicating copy to clipboard operation
aframe-draw-component copied to clipboard

Does not work with latest aframe branch

Open amicoleo opened this issue 9 years ago • 9 comments
trafficstars

Hi,

The components works perfectly if using aframe-core, as you have in your package "aframe-core": "0.1.2", but the with the latest aframe branch "aframe": "aframevr/aframe#dev" The canvas is not drawn on the entity and I didn't get any message on the console about it.

amicoleo avatar Mar 09 '16 00:03 amicoleo

Hmm, I'll look into this. The latest aframe branch has custom shaders which are probably which'll be used for this module once it's released.

maxkrieger avatar Mar 10 '16 03:03 maxkrieger

I just ran into this. To fix it, in createCanvas:

change

this.el.object3D.material = new THREE.MeshBasicMaterial();
this.el.object3D.material.map = this.texture;

to

this.el.object3D.children[0].material = new THREE.MeshBasicMaterial();
this.el.object3D.children[0].material.map = this.texture;

meta-meta avatar Mar 18 '16 20:03 meta-meta

I'll take care of this tomorrow, thanks!

On Fri, Mar 18, 2016 at 4:54 PM, Paul M. Christian <[email protected]

wrote:

I just ran into this. To fix it, in createCanvas:

change

this.el.object3D.material = new THREE.MeshBasicMaterial(); this.el.object3D.material.map = this.texture;

to

this.el.object3D.children[0].material = new THREE.MeshBasicMaterial(); this.el.object3D.children[0].material.map = this.texture;

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/maxkrieger/aframe-draw-component/issues/4#issuecomment-198538338

maxkrieger avatar Mar 19 '16 03:03 maxkrieger

This solution isn't backwards compatible, so I made a quick and dirty if...else.

Should be solved in 1.4.0, let me know how it goes.

maxkrieger avatar Mar 21 '16 20:03 maxkrieger

I've tried to get this component to work with A-Frame 0.2.0, but it doesn't work.

This example just renders a white cube with A-Frame 0.2.0 and version 1.4.0 of this component:

    <a-scene>
      <a-sky color="blue"></a-sky>
      <a-entity position="0 1 0" geometry="primitive: box" draw="width: 256; height: 256" square="text: Hello">
      </a-entity>
    </a-scene>

RSpace avatar May 31 '16 14:05 RSpace

@RSpace this should be fixed in 1.5.0.

maxkrieger avatar Sep 12 '16 23:09 maxkrieger

I tried it with the latest branch of aframe.io 0.3.0 and it works fine for me. Though i|ve to admit one should use the complete example code of the repository, not the short hints giving snippets of the repository page. And .. i've a question: is there an issue if one is using html-component, too? I seams to me as a normal draw component is running into a permanent loop than. I can show you some example code, if you want.

maltekosian avatar Sep 17 '16 09:09 maltekosian