Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
An issue when I use aframe in react.js

When I use aframe in react.js, there is a problem. I can't connect camera or wasd-control, look-controls in my player entity.

<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<a-scene>
      <a-assets>
        <img id="sechelt" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/sechelt.jpg">
        <template id="avatar-template">
          <a-sphere color="yellow" radius="5"></a-sphere>
        </template>
      </a-assets>
      <a-entity
        id="player"
        class="heads"
        networked="template:#avatar-template;attachTemplateToLocal:false;"
        camera
        position="0 1.6 0"
        wasd-controls
        look-controls
      ></a-entity>
      <a-sky id="image-360" radius="100" src="#sechelt" data-set-image-fade-setup="true" animation__fade=""></a-sky>
    </a-scene>

It is working well in HTML file. only when I try it in react.js, I can't control player entity. then new entity which has camera, wasd-controls and look-controls is created so I can't control player entity.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You should write the <script src="" tag below all the code

<a-scene>
      <a-assets>
        <img id="sechelt" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/sechelt.jpg">
        <template id="avatar-template">
          <a-sphere color="yellow" radius="5"></a-sphere>
        </template>
      </a-assets>
      <a-entity
        id="player"
        class="heads"
        networked="template:#avatar-template;attachTemplateToLocal:false;"
        camera
        position="0 1.6 0"
        wasd-controls
        look-controls
      ></a-entity>
      <a-sky id="image-360" radius="100" src="#sechelt" data-set-image-fade-setup="true" animation__fade=""></a-sky>
    </a-scene>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!