Ask coding questions

← Back to all posts
Three.js moving objects
JBloves27 (1904)


I was experimenting with three.js and I thought about moving objects (such as cubes, spheres, etc.). I tried moving them with codes that came from various sites including the three.js org website, replit, and other websites. However, my conclusion came to failure lol.

If you could help me solve this problem, I would be very glad!

The Repl is attached for more info and you can always ping me on either github, replit, or discord.

Coder100 (18872)

as you may know import statement scripts must have type module:

<script src="script.js" type="module"></script>
JBloves27 (1904)

Yeah, ik, i just used separate script as u can see in code @Coder100

Coder100 (18872)

well yeah but script.js still has the error so you should probably remove it to remove conflicts. @JBloves27

JBloves27 (1904)

Oh, ok. Uh, and what about my question above? @Coder100