More information!
I am at the raft and the line 131-132 lines destroyed the entire code!
The error in the JavaScript console is coming from line 132:
Uncaught TypeError: mesh.setAngularFactor is not a function
at addRaft (VM62 code.html:132)
at VM62 code.html:47
But you have typed line 132 correctly:
mesh.setAngularFactor(new THREE.Vector3(0, 0, 0));
Since that line is correct, there must be a problem with mesh
somewher else in the code. That problem is line 123:
mesh = tube;
That re-assigns the mesh
variable to be the tube
mesh instead of the physics mesh that we want.
What you meant to do here is:
mesh.tube = tube;
That assigns the tube
to the tube
property of the mesh so that it can be used later. Once you do that, your code should be working again.
-Chris