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

Marker Generator's pattern ratio stuck at 0.50 #392

Closed
Tino-F opened this issue Aug 6, 2018 · 4 comments
Closed

Marker Generator's pattern ratio stuck at 0.50 #392

Tino-F opened this issue Aug 6, 2018 · 4 comments

Comments

@Tino-F
Copy link
Contributor

Tino-F commented Aug 6, 2018

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

What is the current behavior?
Every time I generate a pattern in the marker generator with a ratio >0.6 or <0.4, the marker won't work. I have tried generating the pattern files for images at different ratios, but no matter what ratio I set it to, the .patt files are exactly the same. I have tested out different ratios of patterns and they all work on the image with the 0.5 ratio.

If the current behavior is a bug, please provide the steps to reproduce.
To reproduce the issue, generate the pattern file & image at any ratio other than 0.5 and use it on they image made at the 0.5 ratio.

What is the expected behavior?
I expected it to work on the maker with the ratio that it is set to.

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

Please mention other relevant information such as the browser version, Operating System and Device Name
I have tried this in Chrome & firefox with similar console errors when I modify the pattern ratio.

Firefox: TypeError: this.rippleElement_ is null ripple.js:117

Chrome: ripple.js:66 Uncaught TypeError: Cannot read property 'style' of null
at S.downHandler_ (ripple.js:66)
ripple.js:117 Uncaught TypeError: Cannot read property 'classList' of null at S. (ripple.js:117)

@nicolocarpignoli
Copy link
Collaborator

Hi @Tino-F , this is interesting.
At a first sight, I don't think Cannot read property 'style' of null error in console is relevant, it shows up even if you only go with the mouse over the slider.

BTW, can you please provide us the image that you are using to generate pattern markers?

@Tino-F
Copy link
Contributor Author

Tino-F commented Aug 9, 2018

pattern

This is one of the images I tried using. However, after doing some further research, I don't believe it's an issue with the marker generator. I found the option for patternRatio while digging through the code. There is no documentation that states that there is a patternRatio option in a-frame ar/AR.js at all (that I could find at least). I thought that the marker generator would generate a pattern file at that ratio. I'm sure that other users might find this confusing as well.

Basically I wasn't aware that the pattern ratio needed to be set in the the code.

Here is the code I used to modify the pattern ratio

for anyone else who may run into this issue

<a-scene embedded  ar-js='patternRatio: 0.7;'>

@Tino-F
Copy link
Contributor Author

Tino-F commented Aug 9, 2018

My next question is if it is possible to set pattern ratios for individual markers in aframe?

@nicolocarpignoli
Copy link
Collaborator

marker generator has been updated. now you could change such ratio through it withouth problems. I you find any, feel free to comment here

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

2 participants