Closed chrigi closed 5 years ago
Thank you Christian, this is great, is the fix for the custom marker same as this code?
}else if( _this.data.preset === 'custom' ){ arProfile.defaultMarkerParameters.type = 'pattern' arProfile.defaultMarkerParameters.patternUrl = _this.data.patternUrl; arProfile.defaultMarkerParameters.markersAreaEnabled = false
}else {
the portrait fix is also a good one,
there is another issue I have, maybe you know why this happens, my marker when detected activates and shows a video (I use a-frame with ar.js, so aframe-ar), I want to detect a click on that video element, not on the whole screen, for some reason yes I can detect a click but its detected in the entire whole screen, instead of just in the video element itself, how can I make sure that it happens on the video element itself?
Also I am using onclick events now because this used to work:
AFRAME.registerComponent('javi1', { init: function () { var el = this.el; el.addEventListener('click', function (evt) {... etc
but now its not working anymore for some reason,
what's your recommended way to detect a click on the specific video element?
btw, in console Im receiving these 2 warnings, do they have any relation to the issues with clicks? "THREE.WebGLRenderer 87 pictoar1js.min.js:3 extras:primitives:warn Mapping keys should be specified in lower case. The mapping key minConfidence may not be recognized pictoar1js.min.js:3 extras:primitives:warn Mapping keys should be specified in lower case. The mapping key hit-testing-renderDebug may not be recognized "
thanks a lot
@javismiles No, the custom marker fix I marged was #168 so not exactly your code. Your code would require type="custom" which unneccesary as there is already type="pattern" documented.
I'm sorry but I can't help you with your other issues. I would also be interested in the click handling but I've only found #148 and that there is a "arjs-hit-testing" variable you can set but I thing regarding the hit-testing I might misunderstand the use.
Is it possible to trigger a sound when marker is detected and stop it when marker is lost using the event listener?
Sorry, but why was this set as invalid?
Is this merged into the latest AR.js. i.e. can we expect the latest AR.js version to fire 'marker-found' and 'marker-lost'?
I just checked the changes made since I posted this modified version. It looks like the portrait fix and the custom marker fix were both merged into the code a while ago. Thanks a lot 😄
The only thing still not merged are the events. There is an older pull request: https://github.com/jeromeetienne/AR.js/pull/303 which sadly has conflicts.
@chrigi You said that 'the portrait fix' is merged, but it doesn't seem to work; Could you tell me in which doc or function a change is needed?
@EBKH I think I just merged the changes I mentioned in my first post here: https://github.com/jeromeetienne/AR.js/pull/212
Hello
As there were quite a few issues/improvements we needed for our project and the relevant pull requests (#212 and #168) are not merged yet, I merged them myself and rebuilt the 1.5.1 version including these fixes. Some of you might be interested in a simple release build so I have attached my fixed version.
This version fixes:
This version adds:
Notes regarding custom pattern that I found helpful:
type="pattern"
on your a-marker you will need to useurl=
and notpatternurl=
.Notes regarding the new events:
(I know this is not a technically a bug but I though this might help some people turning to the issue tracker looking for help) (Had to attach .txt to the files otherwise I could not upload them)
aframe-ar.js.txt aframe-ar.min.js.txt ar.min.js.txt ar.js.txt babylon-ar.min.js.txt babylon-ar.js.txt artoolkit-webvr-polyfill.min.js.txt artoolkit-webvr-polyfill.js.txt