-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Spine 4.0 #1
Comments
Just did a diff between the 3.8 and 4.0: https://github.com/korlibs/korge-next/tree/master/korge-spine/original |
On the jvm, reading the json in Spine format version fun fromPrimitiveTree(value: Any?, name: String? = null): SpineJsonValue = when (value) {
null -> SpineJsonValue(ValueType.NULL)
is String -> SpineJsonValue(value)
is Boolean -> SpineJsonValue(value)
is Number -> SpineJsonValue(value.toDouble(), value.toString())
is List<*> -> SpineJsonValue(ValueType.ARRAY, value.map { fromPrimitiveTree(it) })
is Map<*, *> -> SpineJsonValue(ValueType.OBJECT, value.map { fromPrimitiveTree(it.value, it.key as String) })
else -> TODO()
} ⚡ NotImplementedError
The code hasn't chaged here, so maybe it has something to do with the newer Kotlin version. |
Can you provide a sample file I could include in the repo as a regression test and to check it? |
Can you use the Duke-json.zip from the first post. And the Duke-Spine.zip contains the Spine project file. Or do you think we should avoid it |
I found out... the Duke is OpenSource!
https://www.oracle.com/java/duke/ |
Reading a a json (4.0) or binary Spine 4.0.61 file doesn't work.
Tested with sample code out of KorGE samples/spine.
Duke-Spine.zip
Duke-json.zip
Duke-atlas.zip
Workaround
As a workaround it's possible to export the animation as json with version 3.8. But this has some drawbacks. For example the animation will not support bezier curves and the KorGE plugin won't render a preview animation.
⚡ Error reading skeleton file.
⚡Error reading animation: wink
The text was updated successfully, but these errors were encountered: