First Release of Claw3D (#11)

Co-authored-by: iamlukethedev <iamlukethedev@users.noreply.github.com>
This commit is contained in:
Luke The Dev
2026-03-19 23:14:04 -05:00
committed by GitHub
parent 5ea96b2650
commit 4fa4f13558
431 changed files with 105438 additions and 14 deletions
+22
View File
@@ -0,0 +1,22 @@
async function main() {
const THREE = await import("three");
// Earth rotation order is default XYZ.
// The beacon's local position.
const beaconLocal = new THREE.Vector3(-0.42, 1.32, -1.47).normalize();
// The camera's position during dive.
const cameraPos = new THREE.Vector3(0, 0.5, 2.05).normalize();
// We want to rotate beaconLocal to cameraPos.
// The required quaternion.
const q = new THREE.Quaternion().setFromUnitVectors(beaconLocal, cameraPos);
// Convert to Euler so we can damp x and y.
const e = new THREE.Euler().setFromQuaternion(q, "XYZ");
console.log("Target Euler:");
console.log("x:", e.x, "y:", e.y, "z:", e.z);
}
void main();