So, am trying to make a third person game using cannon.js and three.js but I have encountered this error: Uncaught SyntaxError: missing ) after argument list It is coming from this script:
//create the model
_three.createModel(window.game.models.house, 12, new THREE.MeshLambertMaterial({ color: window.game.static.colors.cyan, shading: THREE.FlatShading });
//loads the model and calls it whatever
var house = _three.createModel(window.game.models.house, 12, new THREE.MeshLambertMaterial({ color: window.game.static.colors.cyan, shading: THREE.FlatShading });
console.log(house.mesh);
//collects the data from the model
_three.createModel(jsonData, scale, materials, isGeometry);
//loads the model
loader.load("js/game/game.models.js", function(geometry, materials) {
window.game.models = { house: geometry };
window.gameInstance = window.game.core();
window.gameInstance.init({
domContainer: document.querySelector("#game"),
rendererClearColor: window.game.static.colors.black
});
});
What this is supposed to do is grab a JSON script exported from blender and import it into my world but it is not loading but it is showing this unspecific error.
The line of code which is giving the error is _three.createModel(window.game.models.house, 12, new THREE.MeshLambertMaterial({ color: window.game.static.colors.cyan, shading: THREE.FlatShading });
If there is any possible way to fix this or if I can reply with more helpful support please tell me!