javascript - Drawing 3 lines html5 (alpha, beta, gamma via deviceorientation) -
I would like to draw 3 rows through HTML5 using toolwd (alpha, beta, gamma data)
& lt; Html & gt; & Lt; Canvas ID = "Mykennas" & gt; & Lt; / Canvas & gt; & Lt; Script & gt; window.addEventListener ('deviceorientation', function (e) {draw (imama, eb eta, a.lfa);}, false); Function Draw (G, B, A) {var gamma = Math.round (g); Var Beta = Math Plains (B); Var alpha = Math field (A); var canvas = document. getElementById ('mechanism'); Var cx = canvas.getContext ('2d'); // How can I draw these 3 lines? } & Lt; / Script & gt; & Lt; / Html & gt; Here is an example of three vectors:
Display: []
I think I need your needs. Here are some suggestions:
- Three. Use Js, and drag the axis here is one.
- Attach your three.js control with DeviceOrientation. three. JS already provides three types of control. The device is an integration control here.
- Position your location in three places. Apparently the camera at a point where you can see all the axes clearly.
I know this is an old post but hope that helps.
Comments
Post a Comment