mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
Clean up.
This commit is contained in:
parent
1254b06a91
commit
c5cf1155a0
@ -53,8 +53,8 @@ public class SkeletonRenderer implements Disposable {
|
||||
|
||||
private boolean premultipliedAlpha;
|
||||
private final FloatArray vertices = new FloatArray(32);
|
||||
private ImmediateModeRenderer renderer;
|
||||
private final SkeletonClipping clipper = new SkeletonClipping();
|
||||
private ImmediateModeRenderer renderer;
|
||||
|
||||
public void draw (Batch batch, Skeleton skeleton) {
|
||||
boolean premultipliedAlpha = this.premultipliedAlpha;
|
||||
@ -136,7 +136,7 @@ public class SkeletonRenderer implements Disposable {
|
||||
float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a;
|
||||
Array<Slot> drawOrder = skeleton.drawOrder;
|
||||
for (int i = 0, n = drawOrder.size; i < n; i++) {
|
||||
final int vertexSize = clipper.isClipping() ? 2 : 5;
|
||||
int vertexSize = clipper.isClipping() ? 2 : 5;
|
||||
Slot slot = drawOrder.get(i);
|
||||
Attachment attachment = slot.attachment;
|
||||
if (attachment instanceof RegionAttachment) {
|
||||
@ -238,8 +238,8 @@ public class SkeletonRenderer implements Disposable {
|
||||
float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a;
|
||||
Array<Slot> drawOrder = skeleton.drawOrder;
|
||||
for (int i = 0, n = drawOrder.size; i < n; i++) {
|
||||
final int vertexSize = clipper.isClipping() ? 2 : 6;
|
||||
Slot slot = drawOrder.get(i);
|
||||
int vertexSize = clipper.isClipping() ? 2 : 6;
|
||||
Attachment attachment = slot.attachment;
|
||||
if (attachment instanceof RegionAttachment) {
|
||||
RegionAttachment region = (RegionAttachment)attachment;
|
||||
|
||||
@ -53,7 +53,8 @@ public class VertexAttachment extends Attachment {
|
||||
* Runtimes Guide.
|
||||
* @param start The index of the first {@link #getVertices()} value to transform. Each vertex has 2 values, x and y.
|
||||
* @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - <code>start</code>.
|
||||
* @param worldVertices The output world vertices. Must have a length >= <code>offset</code> + <code>count</code>.
|
||||
* @param worldVertices The output world vertices. Must have a length >= <code>offset</code> + <code>count</code> *
|
||||
* <code>stride</code> / 2.
|
||||
* @param offset The <code>worldVertices</code> index to begin writing values.
|
||||
* @param stride The number of <code>worldVertices</code> entries between the value pairs written. */
|
||||
public void computeWorldVertices (Slot slot, int start, int count, float[] worldVertices, int offset, int stride) {
|
||||
@ -142,8 +143,8 @@ public class VertexAttachment extends Attachment {
|
||||
this.vertices = vertices;
|
||||
}
|
||||
|
||||
/** The maximum length required of the <code>worldVertices</code> passed to
|
||||
* {@link #computeWorldVertices(Slot, int, int, float[], int, int)}. */
|
||||
/** The maximum number of world vertex values that can be output by
|
||||
* {@link #computeWorldVertices(Slot, int, int, float[], int, int)} using the <code>count</code> parameter. */
|
||||
public int getWorldVerticesLength () {
|
||||
return worldVerticesLength;
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ public class SkeletonClipping {
|
||||
return clipAttachment != null;
|
||||
}
|
||||
|
||||
public void clipTriangles (float[] vertices, int verticesLength, short[] triangles, int trianglesLength, float uvs[],
|
||||
public void clipTriangles (float[] vertices, int verticesLength, short[] triangles, int trianglesLength, float[] uvs,
|
||||
float light, float dark, boolean twoColor) {
|
||||
|
||||
Clipper clipper = this.clipper;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user