The link:
Thanks to @hofk for the based work!
Hi @hofk , I need Your help:
When I tryed to run
to serve as base for this page, after installing r129 in my computer, the console showed the message:
Uncaught TypeError: dice.quaternion.setFromBasis is not a function
Then I used :
Is there a possibility to use Quaternion in the first link, because accessing Your page it works without the console error.
Note that the import ( import * as THREE from “../jsm/three.module.129.Quaternion.js”; ) is a supplemented version of r129. You can and may extend three.js with your own functionalities.
Go to the source:
https://hofk.de/main/discourse.threejs/2021/jsm/three.module.129.Quaternion.js
Search for setFromBasis and you will find the method I added to the quaternions.
If you do not want to change three.js, do it as in the example FlightRouteQuaternion
THREE.Quaternion.prototype.setFromBasis = function( e1, e2, e3 ) { ...
at the beginning.
Enjoy
Hi @hofk …
Thank you very much for the explanations, I will follow your instructions.
Hi @hofk …
The example of Flight Route Quaternion worked fine in r175.
made with CSG subtraction of cylinders
Yet another option of how to build a hollow cylinder. Merging of geometries
Hi @wenrenqiang …
We must increase the length of the cylinders to avoid gaps…
var g1=new THREE.CylinderGeometry(0.22,0.22,0.05,32,32);
g1.rotateX(mp/2);g1.rotateY(mp/2);
var g2=new THREE.CylinderGeometry(0.17,0.17,0.05,32,32);
g2.rotateX(mp/2);g2.rotateY(mp/2);
Please try 0.1 instead of 0.05 and see the result.