Skip to content

Commit

Permalink
Move focus to selected object
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Noah committed Apr 28, 2021
1 parent 08232f6 commit e76f779
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/renderer/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ export class Renderer{

if(PHI > 90){
PHI = 90;
}else if(PHI < 0){
PHI = 0;
}else if(PHI < -90){
PHI = -90;
}
};

Expand Down Expand Up @@ -178,6 +178,7 @@ export class Renderer{
const modelMatrix = math.multiplyArrayOfMatrices([
math.rotateXMatrix(-PHI),
math.rotateYMatrix(-THETA),
[1,0,0,0, 0,1,0,0, 0,0,1,0, -this.axisPosition[0],-this.axisPosition[2],this.axisPosition[1],1]
]);

this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT);
Expand Down

0 comments on commit e76f779

Please sign in to comment.