Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit7cc44d228654856d7b6c81060f850ded4edc9d3f (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-12-10 19:35:01 +0200
Committer
 Syndamia <kamen@syndamia.com>
2022-12-10 19:35:01 +0200
Files12eb597fb66be00aff75b58519dd30c1aca54383
uni-projects-7cc44d228654856d7b6c81060f850ded4edc9d3f.tar
uni-projects-7cc44d228654856d7b6c81060f850ded4edc9d3f.tar.gz
uni-projects-7cc44d228654856d7b6c81060f850ded4edc9d3f.zip
Parentad491e40f524e9c267970081fb4afbbee9fd696d (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.html3
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)