Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorak4tzx committed May 15, 2017
1 parent 87c7923 commit eebd2ed
Show file tree
Hide file tree
Showing 5 changed files with 1,772 additions and 1,688 deletions.
13 changes: 11 additions & 2 deletions dyna_sphere.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
var _this = this;

this.benchmark = false;
this.useSphereTri = false;

this.autorot = 0;

this.lastProgress = -1.0;
this.progress = 0.0;
Expand Down Expand Up @@ -206,7 +209,8 @@
dualTriMesh.update(
v[0].clone().setLength(dualTriMesh.radius),
v[1].clone().setLength(dualTriMesh.radius),
v[2].clone().setLength(dualTriMesh.radius)
v[2].clone().setLength(dualTriMesh.radius),
config.useSphereTri
);
} else {
dualTriMesh.init(
Expand All @@ -225,7 +229,9 @@
uv3: { x: uv3p.x, y: uv3p.y },
material: materialB
},
config.nsep
config.nsep,
dualTriMesh.radius,
config.useSphereTri
);
}
};
Expand Down Expand Up @@ -296,6 +302,7 @@
controlsDeviceOri.update();
}
} else {
camera.lon += config.autorot/5;
if (camera.lon > 360) { camera.lon -= 360; }
if (camera.lon < 0) { camera.lon += 360; }
camera.lat = Math.max( - 85, Math.min( 85, camera.lat ) );
Expand Down Expand Up @@ -409,6 +416,8 @@
gui.add(config, 'applyProgress').name("过渡");
gui.add(config, 'benchmark').name("压力测试");
gui.add(config, 'toggleCamera').name("切换相机");
gui.add(config, 'autorot').min(-5).max(+5).step(1).listen().name("自动浏览");
// gui.add(config, 'useSphereTri').name("精细三角面片");
gui.add(config, 'fov').min(10).max(150).step(1).listen().name("视场角").onChange(function(value){
if (config.fov !== camera.fov) {
camera.fov = value;
Expand Down
4 changes: 4 additions & 0 deletions dyna_texture.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@
var _this = this;
this.debug = false;

this.autorot = 0;

this.whiteFrameMaterial = new THREE.MeshBasicMaterial({ color: 0xffffff, wireframe: true, side: THREE.DoubleSide, transparent: true });

this.benchmark = false;
Expand Down Expand Up @@ -272,6 +274,7 @@
controlsDeviceOri.update();
}
} else {
camera.lon += config.autorot/5;
if (camera.lon > 360) { camera.lon -= 360; }
if (camera.lon < 0) { camera.lon += 360; }
camera.lat = Math.max( - 85, Math.min( 85, camera.lat ) );
Expand Down Expand Up @@ -377,6 +380,7 @@
gui.add(config, 'applyProgress').name("过渡");
gui.add(config, 'benchmark').name("压力测试");
gui.add(config, 'toggleCamera').name("切换相机");
gui.add(config, 'autorot').min(-5).max(+5).step(1).listen().name("自动浏览");
gui.add(config, 'fov').min(10).max(150).step(1).listen().name("视场角").onChange(function(value){
if (config.fov !== camera.fov) {
camera.fov = value;
Expand Down
Loading

0 comments on commit eebd2ed

Please sign in to comment.