イタリックテキスト### 前提・実現したいこと
Leapmotionというモーションセンサーを使って画像を表示したいです。
下記のソースコード(javascript)に書いているのは指を一本あげたら1と文字表示されているものです。
文字表示だけでなく画像も表示したいのですがうまくいきません。
発生している問題・エラーメッセージ
指を一本あげたらファイルにある画像を表示したい
該当のソースコード
<script src="http://js.leapmotion.com/leap-0.6.3.min.js"> </script> <script> var controllerOptions = {enableGestures: true}; Leap.loop(controllerOptions, function(frame){ var handType = ""; var counter = 0; if (frame.fingers.length > 0){ for(var i = 0; i < frame.fingers.length; i++){ var finger= frame.fingers[i]; if (finger.extended) counter++; } switch (counter){ case 0: handType= "0"; break; case 1: handType= "1"; break; case 2: handType= "2"; break; case 3: handType= "3"; break; case 4: handType= "4"; break; case 5: handType= "5"; break; } } document.getElementById("hand").innerHTML = handType; }) </script></head> <body><h1>Leap Motion</h1> <div id ="hand" style="font-size:250px"></div> </body></html>試したこと
imgのコードを入れてみたが画像は表示されない
補足情報(FW/ツールのバージョンなど)
どういったコードをいれたらいいのか教えていただきたいです。
あなたの回答
tips
プレビュー