Revision 3bf19410
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistySquare1.java | ||
---|---|---|
25 | 25 |
import org.distorted.library.type.Static4D; |
26 | 26 |
|
27 | 27 |
import org.distorted.objectlib.helpers.ObjectFaceShape; |
28 |
import org.distorted.objectlib.main.ObjectControl; |
|
29 | 28 |
import org.distorted.objectlib.main.ObjectType; |
30 | 29 |
import org.distorted.objectlib.helpers.ObjectShape; |
31 | 30 |
import org.distorted.objectlib.scrambling.ScrambleState; |
... | ... | |
39 | 38 |
|
40 | 39 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
41 | 40 |
|
42 |
public TwistySquare1(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream) |
|
41 |
public TwistySquare1(int[] numL, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream)
|
|
43 | 42 |
{ |
44 |
super(numL, meshState, quat, move, scale, stream); |
|
43 |
super(numL, meshState, iconMode, quat, move, scale, stream);
|
|
45 | 44 |
} |
46 | 45 |
|
47 | 46 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
195 | 194 |
{ |
196 | 195 |
if( variant==0 ) |
197 | 196 |
{ |
198 |
float[][] bands = { {0.040f,35,0.2f,0.8f,5,2,1}, {0.020f,35,0.5f,1.0f,5,2,1}, {0.001f,35,0.3f,0.8f,5,2,1} }; |
|
197 |
float h1 = isInIconMode() ? 0.001f : 0.04f; |
|
198 |
float h2 = isInIconMode() ? 0.001f : 0.02f; |
|
199 |
float[][] bands = { {h1,35,0.2f,0.8f,5,2,1}, {h2,35,0.5f,1.0f,5,2,1}, {0.001f,35,0.3f,0.8f,5,2,1} }; |
|
199 | 200 |
int[] bandIndices = { 0,0,1,2,2,2 }; |
200 | 201 |
float[][] corners = { {0.03f,0.05f} }; |
201 | 202 |
int[] cornerIndices = { 0,0,0,0,0,0,0,0 }; |
... | ... | |
205 | 206 |
} |
206 | 207 |
else if( variant==1 ) |
207 | 208 |
{ |
208 |
float[][] bands = { {0.038f,35,0.5f,0.9f, 5,2,1}, {0.001f,35,0.5f,0.9f, 5,2,1} }; |
|
209 |
float height = isInIconMode() ? 0.001f : 0.038f; |
|
210 |
float[][] bands = { {height,35,0.5f,0.9f, 5,2,1}, {0.001f,35,0.5f,0.9f, 5,2,1} }; |
|
209 | 211 |
int[] bandIndices = { 0,0,0,1,1 }; |
210 | 212 |
float[][] corners = { {0.04f,0.15f} }; |
211 | 213 |
int[] cornerIndices = { 0,0,-1,0,0,-1 }; |
... | ... | |
215 | 217 |
} |
216 | 218 |
else |
217 | 219 |
{ |
218 |
float[][] bands = { {0.038f,35,0.9f,1.0f, 5,2,1}, {0.001f,35,0.9f,1.0f, 5,2,1} }; |
|
220 |
float height = isInIconMode() ? 0.001f : 0.038f; |
|
221 |
float[][] bands = { {height,35,0.9f,1.0f, 5,2,1}, {0.001f,35,0.9f,1.0f, 5,2,1} }; |
|
219 | 222 |
int[] bandIndices = { 0,0,0,1,1,1 }; |
220 | 223 |
float[][] corners = { {0.05f,0.13f} }; |
221 | 224 |
int[] cornerIndices = { 0,0,0,-1,0,0,0,-1 }; |
... | ... | |
250 | 253 |
|
251 | 254 |
public float getStickerStroke() |
252 | 255 |
{ |
253 |
return ObjectControl.isInIconMode() ? 0.20f : 0.10f;
|
|
256 |
return isInIconMode() ? 0.20f : 0.10f; |
|
254 | 257 |
} |
255 | 258 |
|
256 | 259 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Mode the 'iconMode' from static variable in ObjectControl to member varaible in TwistyObject (safer)