|
@@ -34,13 +34,13 @@ THREE.UVsDebug = function ( geometry, size ) {
|
|
canvas.height = height;
|
|
canvas.height = height;
|
|
|
|
|
|
var ctx = canvas.getContext( '2d' );
|
|
var ctx = canvas.getContext( '2d' );
|
|
- ctx.lineWidth = 2;
|
|
|
|
- ctx.strokeStyle = 'rgba( 0, 0, 0, 1.0 )';
|
|
|
|
|
|
+ ctx.lineWidth = 1;
|
|
|
|
+ ctx.strokeStyle = 'rgb( 63, 63, 63 )';
|
|
ctx.textAlign = 'center';
|
|
ctx.textAlign = 'center';
|
|
|
|
|
|
// paint background white
|
|
// paint background white
|
|
|
|
|
|
- ctx.fillStyle = 'rgba( 255, 255, 255, 1.0 )';
|
|
|
|
|
|
+ ctx.fillStyle = 'rgb( 255, 255, 255 )';
|
|
ctx.fillRect( 0, 0, width, height );
|
|
ctx.fillRect( 0, 0, width, height );
|
|
|
|
|
|
if ( geometry.isGeometry ) {
|
|
if ( geometry.isGeometry ) {
|
|
@@ -129,11 +129,11 @@ THREE.UVsDebug = function ( geometry, size ) {
|
|
|
|
|
|
if ( j === 0 ) {
|
|
if ( j === 0 ) {
|
|
|
|
|
|
- ctx.moveTo( uv.x * width, ( 1 - uv.y ) * height );
|
|
|
|
|
|
+ ctx.moveTo( uv.x * ( width - 2 ) + 0.5, ( 1 - uv.y ) * ( height - 2 ) + 0.5 );
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
- ctx.lineTo( uv.x * width, ( 1 - uv.y ) * height );
|
|
|
|
|
|
+ ctx.lineTo( uv.x * ( width - 2 ) + 0.5, ( 1 - uv.y ) * ( height - 2 ) + 0.5 );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -148,8 +148,8 @@ THREE.UVsDebug = function ( geometry, size ) {
|
|
|
|
|
|
// label the face number
|
|
// label the face number
|
|
|
|
|
|
- ctx.font = '12pt Arial bold';
|
|
|
|
- ctx.fillStyle = 'rgba( 0, 0, 0, 1.0 )';
|
|
|
|
|
|
+ ctx.font = '18px Arial';
|
|
|
|
+ ctx.fillStyle = 'rgb( 63, 63, 63 )';
|
|
ctx.fillText( index, a.x * width, ( 1 - a.y ) * height );
|
|
ctx.fillText( index, a.x * width, ( 1 - a.y ) * height );
|
|
|
|
|
|
if ( a.x > 0.95 ) {
|
|
if ( a.x > 0.95 ) {
|
|
@@ -162,8 +162,8 @@ THREE.UVsDebug = function ( geometry, size ) {
|
|
|
|
|
|
//
|
|
//
|
|
|
|
|
|
- ctx.font = '8pt Arial bold';
|
|
|
|
- ctx.fillStyle = 'rgba( 0, 0, 0, 1.0 )';
|
|
|
|
|
|
+ ctx.font = '12px Arial';
|
|
|
|
+ ctx.fillStyle = 'rgb( 191, 191, 191 )';
|
|
|
|
|
|
// label uv edge orders
|
|
// label uv edge orders
|
|
|
|
|