jeromeetienne / AR.js

Efficient Augmented Reality for the Web - 60fps on mobile!
MIT License
15.79k stars 2.22k forks source link

https://stackoverflow.com/questions/51941580/trying-to-use-ar-js-to-display-jpeg-image-and-only-when-a-button-is-clicked #408

Closed saelha01 closed 6 years ago

saelha01 commented 6 years ago

Do you want to request a feature or report a bug?

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Operating System and Device Name

saelha01 commented 6 years ago

https://stackoverflow.com/questions/51941580/trying-to-use-ar-js-to-display-jpeg-image-and-only-when-a-button-is-clicked

nicolocarpignoli commented 6 years ago

Hi! Everything i Know about click events on AR.js I wrote in this article. https://medium.com/chialab-open-source/how-to-handle-click-events-on-ar-js-58fcacb77c4

Feel free to contact me for any tip. Issues in this repo are for 'features and bugs'. Yours is a different troubleshooting. Stackoverflow is the best place to ask for this kind of problem. (and i see you already did).

Anyway, I see different people with problems related to clicking events on objects. Please continue discussing here => https://github.com/jeromeetienne/AR.js/issues/416

hoktok commented 6 years ago

Try nesting a-image inside a-assets, without using img.

`

<a-assets>
    <a-image id="transpImage" rotation="0 0 0" src="${productFullImage}" alt="<c:out value="${fullImageAltDescription}" escapeXml="${env_escapeXmlFlag}"/>" title="<c:out value="${fullImageAltDescription}" escapeXml="${env_escapeXmlFlag}"/>" class="product_main_image"/></a-image>
</a-assets>

`

saelha01 commented 6 years ago

@hoktok still does not work Behave exactly the same as before.

do you know of any examples of using an jpeg or any kind of image that I can refer to ?

thanks in advance for your help

saelha01 commented 6 years ago

@hoktok still does not work Behave exactly the same as before.

do you know of any examples of using an jpeg or any kind of image that I can refer to ? thanks in advance for your help

shade_badr@yahoo.com 832-488-2313Knowledge is just symbolic representations stored in the brain(Newell, 1990).

On Tuesday, September 25, 2018, 2:49:18 PM CDT, hoktok <notifications@github.com> wrote:  

Try nesting a-image inside a-assets, without using img.

`

" title="" class="product_main_image"/>

`

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

hoktok commented 6 years ago

Try this in codepen or your html and paste a PNG or JPG in the src ...


<head>
<script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
<script src="https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js"></script>
</head>

<body style='margin : 0px; overflow: hidden;'>
<a-scene embedded="" arjs="trackingMethod: best;" class="" inspector="" keyboard-shortcuts="" screenshot="" vr-mode-ui=""> 
  <a-marker preset="hiro" id="aframe-scene" position="" rotation="" scale="" visible="" material="" arjs-anchor="" arjs-hit-testing="">    
    <a-image id="test" src="yourimage.png" position="0 0 0" rotation="-90 0 0" width="" height="" opacity="1" transparent="true" alpha-test="0.2" shader="standard" scale="1 1 1" visible="" material="" geometry=""></a-image>
</a-marker>
</a-scene>
</body>
saelha01 commented 6 years ago

works like a charm.big thanks Shade El-Hadik shade_badr@yahoo.com 832-488-2313Knowledge is just symbolic representations stored in the brain(Newell, 1990).

On Wednesday, September 26, 2018, 1:10:31 PM CDT, hoktok <notifications@github.com> wrote:  

Try this in codepen or your html and paste a PNG or JPG in the src ...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

saelha01 commented 6 years ago

works like a charm. Big thanks