I working on this project...that suppose to work in a browser and in iphone as well... So I am dealing with the events issue right now... Wich javascript events can I use for iphone???
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- CALayer - backgroundColor flipped?
It depends on what functionality you need, but try this on your phone. It should render some a cube structure similar to these: three.js cubes http://lifesine.eu/labs/media/images/vector.gif
It should be possible to touch and drag. This is based on the old cube drag sample that comes with three.js and here are the events used:
And here are the listeners:
Note that there are a few variables used, which might not be obvious, like targetRotation, targetRotationOnMouseDown, etc. Feel free to use the source code from that link, but be aware that I coded that last year, so, some of the three.js code might be slightly different(maybe materials and such), but the events part should still work if you paste it in your code.
HTH