Currently, I am facing an issue with a Blender object that I have successfully displayed on my web page using THREE.js. However, for some reason the object is not rotating when my loop function is called.
In my approach to working with JavaScript, I am trying to maintain an Object-Oriented Programming (OOP) methodology.
Below is a snippet of the code I have been working on:
var scene, camera, renderer, box;
function createScene() {
// Code for creating the scene
}
function createLight() {
// Code for creating light
}
function createBox() {
// Code for creating the box object
}
// Definition of Box constructor and related methods
function loop() {
// Looping through animation frames
}
function init() {
// Initializing the scene, light, box, and loop functions
}
window.addEventListener('load', init, false);