From e813373a41aa5ed0b536dd1bd89545f9d0260560 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 18 Nov 2022 22:21:03 +0200 Subject: [OKG/HWK2] Added Koichi --- .../Homework 2/mannequin.html | 35 +++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Year 2/Computer Graphics Fundamentals/Homework 2/mannequin.html b/Year 2/Computer Graphics Fundamentals/Homework 2/mannequin.html index 2b18a32..3af4905 100644 --- a/Year 2/Computer Graphics Fundamentals/Homework 2/mannequin.html +++ b/Year 2/Computer Graphics Fundamentals/Homework 2/mannequin.html @@ -222,8 +222,41 @@ return kira; } - scene.add(newJotaro()); + function newKoichi() { + const suitC = thc(0x2f5951); + const skinC = thc(0xe0cbbc); + const shoeC = thc(0x919177); + + Mannequin.colors = [ + skinC, // head + shoeC, // shoes + suitC, // pelvis + suitC, // joints + suitC, // limbs + suitC, // torso + ]; + + var koichi = new Male(0.76); + koichi.position.y = 26; + koichi.r_wrist.recolor(skinC); + koichi.l_wrist.recolor(skinC); + koichi.r_fingers.recolor(skinC); + koichi.l_fingers.recolor(skinC); + koichi.r_fingers.tips.recolor(skinC); + koichi.l_fingers.tips.recolor(skinC); + + var hair = new THREE.Mesh(new THREE.SphereGeometry(3.6, 10, 32, 0, 2 * Math.PI, 0, Math.PI / 2), + new THREE.MeshPhongMaterial({ color: 0xb4b7ae, flatShading: 1 })); + hair.position.y = 3.9; + hair.position.x = -0.4; + koichi.head.attach(hair); + + return koichi; + } + + // scene.add(newJotaro()); // scene.add(newKira()); + scene.add(newKoichi()); // тук си направете човечетата и статичните елементи по позите // ... -- cgit v1.3.1-26-gb76a