@galacean/engine-spine 4.2.1-alpha.0 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/main.js +8 -6
  3. package/dist/main.js.map +1 -1
  4. package/dist/miniprogram.js +8 -6
  5. package/dist/module.js +8 -6
  6. package/dist/module.js.map +1 -1
  7. package/package.json +3 -3
  8. package/types/SpineAnimation.d.ts +48 -0
  9. package/types/SpineLoader.d.ts +32 -0
  10. package/types/SpineMaterial.d.ts +6 -0
  11. package/types/SpineRenderer.d.ts +38 -0
  12. package/types/core/MeshGenerator.d.ts +43 -0
  13. package/types/core/SpineMesh.d.ts +11 -0
  14. package/types/renderer/SpineAnimationRenderer.d.ts +1 -1
  15. package/types/spine-core/Animation.d.ts +378 -0
  16. package/types/spine-core/AnimationState.d.ts +365 -0
  17. package/types/spine-core/AnimationStateData.d.ts +23 -0
  18. package/types/spine-core/AssetManager.d.ts +36 -0
  19. package/types/spine-core/AtlasAttachmentLoader.d.ts +23 -0
  20. package/types/spine-core/BlendMode.d.ts +7 -0
  21. package/types/spine-core/Bone.d.ts +110 -0
  22. package/types/spine-core/BoneData.d.ts +44 -0
  23. package/types/spine-core/ConstraintData.d.ts +7 -0
  24. package/types/spine-core/Event.d.ts +16 -0
  25. package/types/spine-core/EventData.d.ts +13 -0
  26. package/types/spine-core/IkConstraint.d.ts +38 -0
  27. package/types/spine-core/IkConstraintData.d.ts +26 -0
  28. package/types/spine-core/PathConstraint.d.ts +46 -0
  29. package/types/spine-core/PathConstraintData.d.ts +52 -0
  30. package/types/spine-core/SharedAssetManager.d.ts +19 -0
  31. package/types/spine-core/Skeleton.d.ts +134 -0
  32. package/types/spine-core/SkeletonBinary.d.ts +49 -0
  33. package/types/spine-core/SkeletonBounds.d.ts +48 -0
  34. package/types/spine-core/SkeletonClipping.d.ts +22 -0
  35. package/types/spine-core/SkeletonData.d.ts +89 -0
  36. package/types/spine-core/SkeletonJson.d.ts +34 -0
  37. package/types/spine-core/Skin.d.ts +43 -0
  38. package/types/spine-core/Slot.d.ts +42 -0
  39. package/types/spine-core/SlotData.d.ts +23 -0
  40. package/types/spine-core/Texture.d.ts +46 -0
  41. package/types/spine-core/TextureAtlas.d.ts +30 -0
  42. package/types/spine-core/TransformConstraint.d.ts +36 -0
  43. package/types/spine-core/TransformConstraintData.d.ts +34 -0
  44. package/types/spine-core/Triangulator.d.ts +14 -0
  45. package/types/spine-core/Updatable.d.ts +9 -0
  46. package/types/spine-core/Utils.d.ts +124 -0
  47. package/types/spine-core/VertexEffect.d.ts +7 -0
  48. package/types/spine-core/attachments/Attachment.d.ts +43 -0
  49. package/types/spine-core/attachments/AttachmentLoader.d.ts +25 -0
  50. package/types/spine-core/attachments/AttachmentType.d.ts +9 -0
  51. package/types/spine-core/attachments/BoundingBoxAttachment.d.ts +12 -0
  52. package/types/spine-core/attachments/ClippingAttachment.d.ts +14 -0
  53. package/types/spine-core/attachments/MeshAttachment.d.ts +46 -0
  54. package/types/spine-core/attachments/PathAttachment.d.ts +19 -0
  55. package/types/spine-core/attachments/PointAttachment.d.ts +20 -0
  56. package/types/spine-core/attachments/RegionAttachment.d.ts +88 -0
  57. package/types/spine-core/polyfills.d.ts +3 -0
  58. package/types/spine-core/vertexeffects/JitterEffect.d.ts +11 -0
  59. package/types/spine-core/vertexeffects/SwirlEffect.d.ts +16 -0
  60. package/types/types.d.ts +4 -0
package/dist/main.js CHANGED
@@ -10918,8 +10918,10 @@ var SubRenderItem = function SubRenderItem() {
10918
10918
  this.buildPrimitive(skeleton, renderer);
10919
10919
  return;
10920
10920
  }
10921
- renderer._vertexBuffer.setData(_vertices);
10922
- renderer._indexBuffer.setData(_indices);
10921
+ if (renderer._vertexBuffer) {
10922
+ renderer._vertexBuffer.setData(_vertices);
10923
+ renderer._indexBuffer.setData(_indices);
10924
+ }
10923
10925
  };
10924
10926
  _proto.addSeparateSlot = function addSeparateSlot(slotName) {
10925
10927
  this._separateSlots.set(slotName, slotName);
@@ -10991,7 +10993,7 @@ var SpineMaterial = /*#__PURE__*/ function(Material) {
10991
10993
  return SpineMaterial;
10992
10994
  }(engine.Material);
10993
10995
  SpineMaterial._spineVS = "\n uniform mat4 renderer_MVPMat;\n\n attribute vec3 POSITION;\n attribute vec2 TEXCOORD_0;\n attribute vec4 COLOR_0;\n \n varying vec2 v_uv;\n varying vec4 v_color;\n \n void main()\n {\n gl_Position = renderer_MVPMat * vec4(POSITION, 1.0);\n \n v_uv = TEXCOORD_0;\n v_color = COLOR_0;\n }\n ";
10994
- SpineMaterial._spineFS = "\n uniform sampler2D material_SpineTexture;\n\n varying vec2 v_uv;\n varying vec4 v_color;\n \n void main()\n {\n vec4 baseColor = texture2D(material_SpineTexture, v_uv);\n gl_FragColor = baseColor * v_color;\n }\n ";
10996
+ SpineMaterial._spineFS = "\n #include <common>\n uniform sampler2D material_SpineTexture;\n\n varying vec2 v_uv;\n varying vec4 v_color;\n \n void main()\n {\n vec4 baseColor = texture2DSRGB(material_SpineTexture, v_uv);\n gl_FragColor = baseColor * sRGBToLinear(v_color);\n }\n ";
10995
10997
 
10996
10998
  /**
10997
10999
  * Spine animation renderer, capable of rendering spine animations and providing functions for animation and skeleton manipulation.
@@ -11000,8 +11002,8 @@ SpineMaterial._spineFS = "\n uniform sampler2D material_SpineTexture;\n\n
11000
11002
  function SpineAnimationRenderer(entity) {
11001
11003
  var _this;
11002
11004
  _this = Renderer.call(this, entity) || this, /**
11003
- * The spacing between z layers.
11004
- */ _this.zSpacing = 0.01, /**
11005
+ * The spacing between z layers in world units.
11006
+ */ _this.zSpacing = 0.001, /**
11005
11007
  * Whether to use premultiplied alpha mode for rendering.
11006
11008
  * When enabled, vertex color values are multiplied by the alpha channel.
11007
11009
  * @remarks
@@ -11632,7 +11634,7 @@ for(var key in RendererObject){
11632
11634
  for(var key1 in LoaderObject){
11633
11635
  engine.Loader.registerClass(key1, LoaderObject[key1]);
11634
11636
  }
11635
- var version = "4.2.1-alpha.0";
11637
+ var version = "4.2.2";
11636
11638
  console.log("Galacean spine version: " + version);
11637
11639
 
11638
11640
  exports.AlphaTimeline = AlphaTimeline;