aframe - Set look-at camera attribute on javascript created a-box -


i'm creating several a-frame (version 0.60) objects in javascript dynamically, manage set sorts of attributes successfully. when comes look-at attribute set camera, ignored. markup use:

    <a-camera id="camera" camera look-controls>        <a-cursor id="cursor" color="#ff0000"></a-cursor>     </a-camera> 

and js code:

    var aboxel = document.createelement('a-box');     aboxel.setattribute('look-at', 'camera');  

thank hint

thank andrew told me add look-at component source.

<script src="https://rawgit.com/ngokevin/aframe-look-at-component/master/dist/aframe-look-at-component.min.js"></script> 

the funny thing don't have add look-at source when doing markup


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -