Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with latest aframe branch #4

Open
amicoleo opened this issue Mar 9, 2016 · 9 comments
Open

Does not work with latest aframe branch #4

amicoleo opened this issue Mar 9, 2016 · 9 comments

Comments

@amicoleo
Copy link

amicoleo commented Mar 9, 2016

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.

@maxkrieger
Copy link
Owner

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.

@meta-meta
Copy link

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;

@maxkrieger
Copy link
Owner

I'll take care of this tomorrow, thanks!

On Fri, Mar 18, 2016 at 4:54 PM, Paul M. Christian <notifications@github.com

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
#4 (comment)

@maxkrieger
Copy link
Owner

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.

@RSpace
Copy link

RSpace commented May 31, 2016

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>

@maxkrieger
Copy link
Owner

@RSpace this should be fixed in 1.5.0.

@maltekosian
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@RSpace @maltekosian @amicoleo @meta-meta @maxkrieger and others