diff options
1 files changed, 2 insertions, 1 deletions
| -rw-r--r-- | Year 2/Computer Graphics Fundamentals/Homework 2/mannequin.html | 3 |
diff --git a/Year 2/Computer Graphics Fundamentals/Homework 2/mannequin.html b/Year 2/Computer Graphics Fundamentals/Homework 2/mannequin.html index ccd9936..b7de230 100644 --- a/Year 2/Computer Graphics Fundamentals/Homework 2/mannequin.html +++ b/Year 2/Computer Graphics Fundamentals/Homework 2/mannequin.html @@ -207,7 +207,7 @@ B : fixPostureY(instruction[3]),
cpos : instruction[1].position.clone(),
npos : (instruction.length < 5 || !instruction[4]) ? null : vecSum(instruction[1].position, arrToVec(instruction[4])),
- crot : instruction[1].rotation.clone(),
+ crot : null,
nrot : (instruction.length < 6 || !instruction[5]) ? null : vecMultScal(arrToVec(instruction[5]), Math.PI / 2),
});
}
@@ -230,6 +230,7 @@ if (!mo.iscamera) {
if (!mo.A) mo.A = fixPostureY(mo.mannequin.posture);
+ if (!mo.crot) mo.crot = mo.mannequin.rotation.clone();
if (mo.B)
mo.mannequin.posture = Mannequin.blend(mo.A, mo.B, blendPer);
if (mo.npos)
|
