Comments (5)
Hey Jules - I verified that this is a bug. I found an issue with fixing it, namely that in order to have a good FPS you will need keyboard input. We need a way to make the GLAM canvas take the keyboard input. Internally there is a way to do that via JavaScript by setting it as a "tabstop" but I need to think about how to surface this to the tag set. Maybe just a "tabstop" attribute on the root <glam> tag?
Any thoughts?
from glam.
Hi Tony, thanks for getting onto this. So as I understand it the tabstop setting is essentially targeting the canvas inside the glam tag to expect/accept the keyboard input.
I haven't tested whether I can have multiple glam tags (and scenes) in one page, but assuming you can it might make more sense to call the attribute something like keyTarget or inputTarget or something similar rather than expose the tabstop concept at the tag level.
I presume it makes more sense to have that attribute set on the glam tag rather than the scene but that is obviously your call.
Thanks again for looking at this, once we get the fps setting working I would be happy to contribute an example to the GLAM repo for others to refer to.
from glam.
Good points...
I don't have multiple GLAM canvases working on a single page yet. That's something I need to work on - later.
Would tabstop/keyTarget/whatever automatically give the set focus to the canvas, or would it just make it so that clicking gives it focus?
Do you think this is an appropriate thing to put in the declaration syntax, or would it be better to just provide an API method e.g. glam.focus()?
Tony
from glam.
No problem on the multiple canvas scenario, I hadn't actually thought of using that in any case. :)
I guess you could add it as an attribute on the GLAM canvas so that if the attribute is present then it would automatically set the focus to that canvas, and then add an API method as well that could be used to programatically switch on and off the focus.
A default behaviour of setting the focus by clicking in the canvas would probably make sense too, then it would still work even if you didn't set the attribute or make the API call.
Is that useful?
from glam.
Yes very useful. r/e the default behavior of clicking: that makes sense but I would also want to provide a "notabstop" attribute to override that. Thanks for the input; let me meditate a little and I'll keep in you in the loop as I make the changes.!
from glam.
Related Issues (20)
- Rename <cube> to <box>
- View Events HOT 1
- Document all the tags that are available HOT 2
- Get rid of jQuery dependency. HOT 2
- Tutorial / Offical Website HOT 6
- Project Page Redesign HOT 1
- Documentation - User Guide HOT 3
- GLAM as Web Components HOT 2
- Separate website to gh-pages and remove it from master. HOT 1
- VR UI Components
- Responsive Layout for Docs HOT 2
- Responsive Layout for Project Page HOT 4
- dynamic setting of .textContent isn't implemented
- head tracking on chrome skew the sky picture
- How to import a rigged object and then animate it using tags or animation kf
- autoVR for renderer and controller - switching normal mode and VR mode.
- How to play a animation with js after glam ready?
- Are planning to enable html content as texture ? HOT 3
- Is exporting to dae/collada planned ? HOT 1
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 glam.