Comments (6)
Yes, on gesture-handler
you can edit the handleRotation
function according to your needs.
Right now is rotating on X and Y axis but you can just delete the one you don't need.
from arjs-gestures.
I have tested gestures.js with mindar.js and it seems to work if you use workaround from #15 to switch off marker-based checking.
I used the Image Tracking Basic example (https://hiukim.github.io/mind-ar-js-doc/examples/basic) and added gesture-handler to both entities (a-plane and a-gltf-model) - both were scaling and rotating properly.
<a-entity mindar-image-target="targetIndex: 0">
<a-plane src="#card" position="0 0 0" height="0.552" width="1" rotation="0 0 0" object-detection gesture-handler="minScale: 0.5; maxScale: 10; locationBased: true;"></a-plane>
<a-gltf-model rotation="0 0 0 " position="0 0 0.1" scale="0.005 0.005 0.005" src="#avatarModel" object-detection gesture-handler="minScale: 0.5; maxScale: 10; locationBased: true;">
</a-entity>
I also added a parent entity to both a-plane and a-gltf-model objects and used it as a rig for gestures for both and it worked fine.
<a-entity mindar-image-target="targetIndex: 0">
<a-entity gesture-handler="minScale: 0.5; maxScale: 10; locationBased: true;">
<a-plane src="#card" position="0 0 0" height="0.552" width="1" rotation="0 0 0"></a-plane>
<a-gltf-model rotation="0 0 0 " position="0 0 0.1" scale="0.005 0.005 0.005" src="#avatarModel"
>
</a-antity>
</a-entity>
So yes, with simple modifications it works pretty well as long as targeting A-Frame based objects I guess :)
from arjs-gestures.
Yes, on
gesture-handler
you can edit thehandleRotation
function according to your needs.Right now is rotating on X and Y axis but you can just delete the one you don't need.
Thanks @fcor , it worked beautifully, i had another question. Does this work on mind-ar-js(https://hiukim.github.io/mind-ar-js-doc/) image tracking as well? i tried adding all the necessary attributes like gesture-detector, gesture-handlers but it doesn't seem to work.Is it because these attributes are specific to , tags? and since mindar uses different tags to render the 3d models.
from arjs-gestures.
I have tested gestures.js with mindar.js and it seems to work if you use workaround from #15 to switch off marker-based checking.
I used the Image Tracking Basic example (https://hiukim.github.io/mind-ar-js-doc/examples/basic) and added gesture-handler to both entities (a-plane and a-gltf-model) - both were scaling and rotating properly.
<a-entity mindar-image-target="targetIndex: 0"> <a-plane src="#card" position="0 0 0" height="0.552" width="1" rotation="0 0 0" object-detection gesture-handler="minScale: 0.5; maxScale: 10; locationBased: true;"></a-plane> <a-gltf-model rotation="0 0 0 " position="0 0 0.1" scale="0.005 0.005 0.005" src="#avatarModel" object-detection gesture-handler="minScale: 0.5; maxScale: 10; locationBased: true;"> </a-entity>
I also added a parent entity to both a-plane and a-gltf-model objects and used it as a rig for gestures for both and it worked fine.
<a-entity mindar-image-target="targetIndex: 0"> <a-entity gesture-handler="minScale: 0.5; maxScale: 10; locationBased: true;"> <a-plane src="#card" position="0 0 0" height="0.552" width="1" rotation="0 0 0"></a-plane> <a-gltf-model rotation="0 0 0 " position="0 0 0.1" scale="0.005 0.005 0.005" src="#avatarModel" > </a-antity> </a-entity>
So yes, with simple modifications it works pretty well as long as targeting A-Frame based objects I guess :)
Oh! thanks, i'll also give this one a try in a while.
from arjs-gestures.
@AdamVI2 Thanks for your help :)
from arjs-gestures.
Yes, on
gesture-handler
you can edit thehandleRotation
function according to your needs.Right now is rotating on X and Y axis but you can just delete the one you don't need.
When deleting the y axis I think I messed up the code. I will be very grateful if you can provide me with the code with disabled y axis and scale for the 3d model. Thanks!
from arjs-gestures.
Related Issues (19)
- Can't manipulate the model (not via marker)
- Keep the model in the center of the screen HOT 5
- How to use the example under vue or ES6 module? HOT 2
- Camera error HOT 3
- Multiple object HOT 1
- Customise scaling of height and width HOT 7
- Can this work with the location-based method? HOT 3
- How to stop animation on touch HOT 1
- How Can I set autorate?
- The second example does not work ! HOT 2
- How can i can moving object3d by onefingermove? HOT 2
- It doesn' work in PC like Chrome browser
- About AR marker HOT 4
- Nice work! How to change the marker?Thank you! HOT 1
- issue HOT 1
- How to replace other photos HOT 1
- Image Tracking
- Loading multiple models HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arjs-gestures.