diff options
| Commit | 7cc44d228654856d7b6c81060f850ded4edc9d3f (patch) | |
|---|---|---|
| Author | 2022-12-10 19:35:01 +0200 | |
| Committer | 2022-12-10 19:35:01 +0200 | |
| Files | 12eb597fb66be00aff75b58519dd30c1aca54383 | |
| uni-projects-7cc44d228654856d7b6c81060f850ded4edc9d3f.tar uni-projects-7cc44d228654856d7b6c81060f850ded4edc9d3f.tar.gz uni-projects-7cc44d228654856d7b6c81060f850ded4edc9d3f.zip | ||
| Parent | ad491e40f524e9c267970081fb4afbbee9fd696d (diff) | |
[OKG/HWK2] Current rotation is null and is set on execution time
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)
|
