Skip to content

Commit

Permalink
performance improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFloyd committed Aug 13, 2020
1 parent 0d4b6aa commit 0b3651a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,8 @@ Ammo().then((Ammo) => {

allSkillsSection(-50, 0.025, 20, 40, 40, boxTexture.allSkills);
allSkillsSection(61, 0.025, 13, 30, 60, inputText.activities);
//allSkillsSection(9, 0.025, 54, 7, 3.5, boxTexture.skrillex);
//allSkillsSection(10, 0.01, 45, 15, 15, boxTexture.edmText);
allSkillsSection(9, 0.025, 54, 7, 3.5, boxTexture.skrillex);
allSkillsSection(10, 0.01, 45, 15, 15, boxTexture.edmText);

//lensflare
createLensFlare(50, -50, -800, 200, 200, boxTexture.lensFlareMain);
Expand Down
10 changes: 10 additions & 0 deletions src/resources/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ export function rotateCamera(ballPosition) {
camera.position.y = ballPosition.position.y + 50;
camera.position.z = ballPosition.position.z + 40;
camera.lookAt(ballPosition.position);
} else if (
ballPosition.position.x > -1 &&
ballPosition.position.x < 20 &&
ballPosition.position.z > 33 &&
ballPosition.position.z < 56
) {
camera.position.x = ballPosition.position.x;
camera.position.y = ballPosition.position.y + 50;
camera.position.z = ballPosition.position.z + 40;
camera.lookAt(ballPosition.position);
} else if (ballPosition.position.z > 50) {
camera.position.x = ballPosition.position.x;
camera.position.y = ballPosition.position.y + 10;
Expand Down

0 comments on commit 0b3651a

Please sign in to comment.