diff --git a/spine-sfml/cpp/example/testbed.cpp b/spine-sfml/cpp/example/testbed.cpp index aa5767864..3da197883 100644 --- a/spine-sfml/cpp/example/testbed.cpp +++ b/spine-sfml/cpp/example/testbed.cpp @@ -70,11 +70,12 @@ class NullAttachmentLoader : public AttachmentLoader { }; int main(void) { - String atlasFile(""); - String skeletonFile("/Users/badlogic/workspaces/spine-runtimes/spine-haxe/example/assets/vine-pro.json"); + String atlasFile("/Users/badlogic/Desktop/basemodel-male/basemodel-male.atlas"); + String skeletonFile("/Users/badlogic/Desktop/basemodel-male/basemodel-male.skel"); String animation = ""; + String skin = "BasicBody"; - float scale = 1.0f; + float scale = 0.1f; SFMLTextureLoader textureLoader; NullAttachmentLoader nullLoader; Atlas *atlas = atlasFile.length() == 0 ? nullptr : new Atlas(atlasFile, &textureLoader); @@ -106,6 +107,7 @@ int main(void) { drawable.skeleton->updateWorldTransform(); drawable.skeleton->setPosition(320, 590); if (animation.length() > 0) drawable.state->setAnimation(0, animation, true); + if (skin.length() > 0) drawable.skeleton->setSkin(skin); sf::RenderWindow window(sf::VideoMode(640, 640), "Spine SFML - testbed"); window.setFramerateLimit(60); diff --git a/spine-ts/.prettierignore b/spine-ts/.prettierignore new file mode 100644 index 000000000..01b7e33fd --- /dev/null +++ b/spine-ts/.prettierignore @@ -0,0 +1 @@ +**/* \ No newline at end of file diff --git a/spine-ts/spine-phaser/src/SpinePlugin.ts b/spine-ts/spine-phaser/src/SpinePlugin.ts index dcd989301..4e234278b 100644 --- a/spine-ts/spine-phaser/src/SpinePlugin.ts +++ b/spine-ts/spine-phaser/src/SpinePlugin.ts @@ -206,7 +206,7 @@ export class SpinePlugin extends Phaser.Plugins.ScenePlugin { atlas = new TextureAtlas(atlasFile.data); if (this.isWebGL) { let gl = this.gl!; - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); + if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL) gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); for (let atlasPage of atlas.pages) { atlasPage.setTexture(new GLTexture(gl, this.game.textures.get(atlasKey + "!" + atlasPage.name).getSourceImage() as HTMLImageElement | ImageBitmap, false)); } diff --git a/spine-ts/spine-webgl/example/drag-and-drop.html b/spine-ts/spine-webgl/example/drag-and-drop.html index c0fc4308e..bb6c2d0f1 100644 --- a/spine-ts/spine-webgl/example/drag-and-drop.html +++ b/spine-ts/spine-webgl/example/drag-and-drop.html @@ -1,21 +1,27 @@ - - + - - -
- - - - + + +
+ + + + + +
- - - \ No newline at end of file + + diff --git a/spine-ts/tsfmt.json b/spine-ts/tsfmt.json new file mode 100644 index 000000000..990bb18ab --- /dev/null +++ b/spine-ts/tsfmt.json @@ -0,0 +1,24 @@ +{ + "baseIndentSize": 0, + "indentSize": 4, + "tabSize": 4, + "indentStyle": 2, + "newLineCharacter": "\r\n", + "convertTabsToSpaces": false, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterConstructor": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, + "insertSpaceAfterTypeAssertion": false, + "insertSpaceBeforeFunctionParenthesis": true, + "insertSpaceBeforeTypeAnnotation": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false +} \ No newline at end of file