Project

General

Profile

« Previous | Next » 

Revision 8f5116ec

Added by Leszek Koltunski 2 months ago

Major improvement for the FactorySticker: now all changes to border thickness & size of corners should work.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java
34 34
    }
35 35

  
36 36
///////////////////////////////////////////////////////////////////////////////////////////////////
37
// make the 'center' sticker artificially smaller, so that we paint over the area in the center of the face.
38 37

  
39 38
  @Override
40
  public void adjustStickerCoords()
39
  protected float[][][] getStickerRadii()
41 40
    {
42 41
    int[] numLayers = getNumLayers();
43
    int index = numLayers[0]==3 ? 0:3;
44
    float CENTER_CORR = 0.9f;
42
    float R = 0.18f;
43
    float L = 0.50f;
44
    float[][] t1 = {{ R,L,R,R }};
45
    float[][] t2 = {{ R,R,R,R }};
45 46

  
46
    mStickerCoords[index][0][1][0] *= CENTER_CORR;
47
    mStickerCoords[index][0][1][1] *= CENTER_CORR;
47
    if( numLayers[0]==3 ) return new float[][][] { t1 };
48
    else                  return new float[][][] { t2,t2,t2,t1 };
48 49
    }
49 50

  
50 51
///////////////////////////////////////////////////////////////////////////////////////////////////
......
532 533
    }
533 534

  
534 535
///////////////////////////////////////////////////////////////////////////////////////////////////
536
// we override getStickerRadii() anyway
535 537

  
536 538
  public float getStickerRadius()
537 539
    {
538
    return 0.18f;
540
    return 0.0f;
539 541
    }
540 542

  
541 543
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff