-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoit
More file actions
executable file
·46 lines (38 loc) · 1.39 KB
/
doit
File metadata and controls
executable file
·46 lines (38 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /usr/bin/env node
// -*-mode: js2-*-
var sprintf = require('sprintf');
var THREE = require('./libs/threejs/three.js');
var qinterp = require('./qinterp.js');
var debug = require('./debug.js');
// this.matrix.compose( this.position, this.quaternion, this.scale );
// mm=0.9995,-0.0306,0.0050,0.0760,0.0307,0.9989,-0.0356,0.0413,-0.0039,0.0358,0.9994,-0.0946,0.0000,0.0000,0.0000,1.0000
// mm=3.7258,0.2155,1.3968,2.2948,-0.3303,3.9620,0.2696,-0.8353,-1.3743,-0.3679,3.7222,-7.1421,0.0000,0.0000,0.0000,1.0000
var m0 = new THREE.Matrix4();
m0.set(0.9995,-0.0306,0.0050,0.0760,0.0307,0.9989,-0.0356,0.0413,-0.0039,0.0358,0.9994,-0.0946,0.0000,0.0000,0.0000,1.0000);
var m1 = new THREE.Matrix4();
m1.set(3.7258,0.2155,1.3968,2.2948,-0.3303,3.9620,0.2696,-0.8353,-1.3743,-0.3679,3.7222,-7.1421,0.0000,0.0000,0.0000,1.0000);
var intp = qinterp.matrix4Interpolator(m0, m1);
debug.showMatrix('m0', m0);
debug.showMatrix('m', intp(0.5));
debug.showMatrix('m1', m1);
// var d0 = decompose(m0);
// var d1 = decompose(m1);
//
// var di = lerp(d0, d1, 1);
//
// console.log(d0);
// console.log(di);
// console.log(d1);
//
// // //q0.setFromRotationMatrix(m0);
// // //p0.setFromMatrixPosition(m0);
// // //s0.setFromMatrixScale(m0);
// //
// // console.log(q0);
// // console.log(p0);
// // console.log(s0);
// //
// // var m00 = new THREE.Matrix4();
// // m00.compose(p0,q0,s0);
// //
// // debug.showMatrix('m00', m00);