Project

General

Profile

« Previous | Next » 

Revision f7f5771f

Added by Leszek Koltunski 6 months ago

Bump Jing works now.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyMirrorJing.java
43 43
  private static final float JING_F = 0.48f;
44 44

  
45 45
  private static final int[] FACE_COLORS = new int[] { COLOR_WHITE };
46
  private static final float[] MIRROR_VEC = { 0.0f, 0.0f, 0.0f };
46
  private static final float[] MIRROR_VEC = { 0.06f, 0.07f, 0.08f };
47 47

  
48 48
  private int[][] mEdges;
49 49
  private int[][] mBasicAngle;
......
270 270
    {
271 271
    float[][] pos = getPositions();
272 272
    float[] position = pos[variant];
273
    float[][] center = computeVertexEffectCenter(variant);
274
    float[] cent = center[0];
275 273

  
276 274
    float[] ret = new float[3];
277 275

  
278
    float A = 0.1f;
276
    float A = 0.9f;
279 277

  
280
    ret[0] = position[0] + A*cent[0];
281
    ret[1] = position[1] + A*cent[1];
282
    ret[2] = position[2] + A*cent[2];
278
    ret[0] = A*position[0];
279
    ret[1] = A*position[1];
280
    ret[2] = A*position[2];
283 281

  
284 282
    return ret;
285 283
    }
......
320 318
    if( variant<4 )
321 319
      {
322 320
      int N = 5;
323
      int E = 2;
321
      int E = 1;
324 322
      float height = isInIconMode() ? 0.001f : 0.02f;
325 323
      float[][] bands = { {height,35,0.3f,0.5f,N,E,E}, {0.001f,35,0.3f,0.5f,N,E,E} };
326 324
      return new ObjectFaceShape(bands,indices,null);
......
328 326
    else if( variant<10 )
329 327
      {
330 328
      int N = 5;
331
      int E = 1;
329
      int E = 0;
332 330
      float height = isInIconMode() ? 0.001f : 0.02f;
333
      float[][] bands = { {height,35,0.3f,0.5f,N,E,E}, {0.001f,35,0.3f,0.5f,3,0,0} };
331
      float[][] bands = { {height,35,0.3f,0.5f,N,E,E}, {0.001f,35,0.3f,0.5f,N,E,E} };
334 332
      return new ObjectFaceShape(bands,indices,null);
335 333
      }
336 334
    else
......
349 347
    {
350 348
    float A;
351 349

  
352
         if( variant< 4 ) A = 0.4f;
353
    else if( variant<10 ) A = 1.0f;
354
    else                  A = 0.9f;
350
         if( variant< 4 ) A = -0.4f;
351
    else if( variant<10 ) A = -1.0f;
352
    else                  A = -0.9f;
355 353

  
356 354
    float[][] positions = getPositions();
357 355
    float[] p = positions[variant];
......
370 368
    int[] indices      = FactoryShape.computeVertexEffectsIndices(vertices, pos[variant], getFaceAxis(), getDist() );
371 369

  
372 370
    float S,R;
373
         if( variant< 4 ) { S = 0.03f; R=0.15f; }
374
    else if( variant<10 ) { S = 0.03f; R=0.15f; }
375
    else                  { S = 0.03f; R=0.15f; }
371
         if( variant< 4 ) { S = 0.05f; R=0.15f; }
372
    else if( variant<10 ) { S = 0.05f; R=0.15f; }
373
    else                  { S = 0.05f; R=0.15f; }
376 374

  
377
    float[][] corners  = new float[][]{{S,R}};
375
    float[][] corners = {{S,R}};
378 376

  
379 377
    return FactoryCubit.generateVertexEffect(vertices,corners,indices,centers,indices);
380 378
    }

Also available in: Unified diff