mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
Every space in its place! (tm)
(whitespace clean up)
This commit is contained in:
parent
ded7a697d9
commit
7a18f0818c
@ -263,8 +263,7 @@ namespace SharpJson
|
|||||||
for (lastIndex = index; lastIndex < json.Length; lastIndex++) {
|
for (lastIndex = index; lastIndex < json.Length; lastIndex++) {
|
||||||
char ch = json[lastIndex];
|
char ch = json[lastIndex];
|
||||||
|
|
||||||
if ((ch < '0' || ch > '9') && ch != '+' && ch != '-'
|
if ((ch < '0' || ch > '9') && ch != '+' && ch != '-' && ch != '.' && ch != 'e' && ch != 'E')
|
||||||
&& ch != '.' && ch != 'e' && ch != 'E')
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,7 +335,8 @@ namespace SharpJson
|
|||||||
json[index + 1] == 'a' &&
|
json[index + 1] == 'a' &&
|
||||||
json[index + 2] == 'l' &&
|
json[index + 2] == 'l' &&
|
||||||
json[index + 3] == 's' &&
|
json[index + 3] == 's' &&
|
||||||
json[index + 4] == 'e') {
|
json[index + 4] == 'e'
|
||||||
|
) {
|
||||||
index += 5;
|
index += 5;
|
||||||
return Token.False;
|
return Token.False;
|
||||||
}
|
}
|
||||||
@ -347,7 +347,8 @@ namespace SharpJson
|
|||||||
if (json[index] == 't' &&
|
if (json[index] == 't' &&
|
||||||
json[index + 1] == 'r' &&
|
json[index + 1] == 'r' &&
|
||||||
json[index + 2] == 'u' &&
|
json[index + 2] == 'u' &&
|
||||||
json[index + 3] == 'e') {
|
json[index + 3] == 'e'
|
||||||
|
) {
|
||||||
index += 4;
|
index += 4;
|
||||||
return Token.True;
|
return Token.True;
|
||||||
}
|
}
|
||||||
@ -358,7 +359,8 @@ namespace SharpJson
|
|||||||
if (json[index] == 'n' &&
|
if (json[index] == 'n' &&
|
||||||
json[index + 1] == 'u' &&
|
json[index + 1] == 'u' &&
|
||||||
json[index + 2] == 'l' &&
|
json[index + 2] == 'l' &&
|
||||||
json[index + 3] == 'l') {
|
json[index + 3] == 'l'
|
||||||
|
) {
|
||||||
index += 4;
|
index += 4;
|
||||||
return Token.Null;
|
return Token.Null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -315,8 +315,7 @@ end
|
|||||||
|
|
||||||
function json.addnewline (state)
|
function json.addnewline (state)
|
||||||
if state.indent then
|
if state.indent then
|
||||||
state.bufferlen = addnewline2 (state.level or 0,
|
state.bufferlen = addnewline2 (state.level or 0, state.buffer, state.bufferlen or #(state.buffer))
|
||||||
state.buffer, state.bufferlen or #(state.buffer))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -452,8 +451,7 @@ function json.encode (value, state)
|
|||||||
state = state or {}
|
state = state or {}
|
||||||
local oldbuffer = state.buffer
|
local oldbuffer = state.buffer
|
||||||
local buffer = oldbuffer or {}
|
local buffer = oldbuffer or {}
|
||||||
local ret, msg = encode2 (value, state.indent, state.level or 0,
|
local ret, msg = encode2 (value, state.indent, state.level or 0, buffer, state.bufferlen or 0, state.tables or {}, state.keyorder)
|
||||||
buffer, state.bufferlen or 0, state.tables or {}, state.keyorder)
|
|
||||||
if not ret then
|
if not ret then
|
||||||
error (msg, 2)
|
error (msg, 2)
|
||||||
elseif oldbuffer then
|
elseif oldbuffer then
|
||||||
|
|||||||
@ -608,7 +608,6 @@ end
|
|||||||
|
|
||||||
Animation.DeformTimeline = {}
|
Animation.DeformTimeline = {}
|
||||||
function Animation.DeformTimeline.new (frameCount)
|
function Animation.DeformTimeline.new (frameCount)
|
||||||
|
|
||||||
local self = Animation.CurveTimeline.new(frameCount)
|
local self = Animation.CurveTimeline.new(frameCount)
|
||||||
self.frames = utils.newNumberArrayZero(frameCount)
|
self.frames = utils.newNumberArrayZero(frameCount)
|
||||||
self.frameVertices = utils.newNumberArrayZero(frameCount)
|
self.frameVertices = utils.newNumberArrayZero(frameCount)
|
||||||
|
|||||||
@ -563,7 +563,7 @@ function SkeletonJson.new (attachmentLoader)
|
|||||||
end
|
end
|
||||||
local frameIndex = 0
|
local frameIndex = 0
|
||||||
for i,valueMap in ipairs(values) do
|
for i,valueMap in ipairs(values) do
|
||||||
timeline:setFrame(frameIndex, valueMap.time, getValue(valueMap, "rotateMix", 1), getValue(valueMap, "translateMix", 1), getValue(valueMap, "scaleMix", 1), getValue(valueMap, "shearMix", 1))
|
timeline:setFrame(frameIndex, valueMap.time, getValue(valueMap, "rotateMix", 1), getValue(valueMap, "translateMix", 1), getValue(valueMap, "scaleMix", 1) getValue(valueMap, "shearMix", 1))
|
||||||
readCurve(valueMap, timeline, frameIndex)
|
readCurve(valueMap, timeline, frameIndex)
|
||||||
frameIndex = frameIndex + 1
|
frameIndex = frameIndex + 1
|
||||||
end
|
end
|
||||||
|
|||||||
@ -44,7 +44,6 @@ module spine {
|
|||||||
abstract setWraps (uWrap: TextureWrap, vWrap: TextureWrap): void;
|
abstract setWraps (uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||||
abstract dispose (): void;
|
abstract dispose (): void;
|
||||||
|
|
||||||
|
|
||||||
public static filterFromString (text: string): TextureFilter {
|
public static filterFromString (text: string): TextureFilter {
|
||||||
switch (text.toLowerCase()) {
|
switch (text.toLowerCase()) {
|
||||||
case "nearest": return TextureFilter.Nearest;
|
case "nearest": return TextureFilter.Nearest;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user