mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
12 KiB
12 KiB
3.6
AS3
- Breaking changes
- Removed
Bone.worldToLocalRotationXandBone.worldToLocalRotationY. Replaced byBone.worldToLocalRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Made
Bonefields_a,_b,_c,_d,_worldXand_worldYpublic, removed underscore prefix. - Removed
VertexAttachment.computeWorldVerticesoverload, changedVertexAttachment.computeWorldVertices2toVertexAttachment.computeWorldVertices, addedstrideparameter. - Removed
RegionAttachment.verticesfield. The vertices array is provided toRegionAttachment.computeWorldVerticesby the API user now. - Removed
RegionAttachment.updateWorldVertices, addedRegionAttachment.computeWorldVertices. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the providedworldVerticesarray, starting atoffset, then moving bystridearray elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer. - Replaced
r,g,b,afields with instances of newColorclass inRegionAttachment,MeshAttachment,Skeleton,SkeletonData,SlotandSlotData. - Additions
- Added
Skeleton.getBoundsfrom reference implementation. - Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData - Added
Bone.localToWorldRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimelineand additional fields onSlotandSlotData. - Added
PointAttachment, additional methodnewPointAttachmentinAttachmentLoaderinterface.
Starling
- Fixed renderer to work with 3.6 changes.
- Added support for two color tinting.
C
- Breaking changes
spVertexAttachment_computeWorldVerticesandspRegionAttachment_computeWorldVerticeSnow take new parameters to make it possible to directly output the calculated vertex positions to a vertex buffer. Removes the need for additional copies in the backends' respective renderers.- Removed
spBoundingBoxAttachment_computeWorldVertices, superseded byspVertexAttachment_computeWorldVertices. - Removed
spPathAttachment_computeWorldVerticesandspPathAttachment_computeWorldVertices1, superseded byspVertexAttachment_computeWorldVertices. - Removed
sp_MeshAttachment_computeWorldVertices, superseded byspVertexAttachment_computeWorldVertices. - Removed
spBone_worldToLocalRotationXandspBone_worldToLocalRotationY. Replaced byspBone_worldToLocalRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Replaced
r,g,b,afields with instances of newspColorstruct inspRegionAttachment,spMeshAttachment,spSkeleton,spSkeletonData,spSlotandspSlotData. - Additions
- Added support for local and relative transform constraint calculation, including additional fields in
spTransformConstraintData. - Added
spPointAttachment, additional methodspAtlasAttachmentLoadeR_newPointAttachment. - Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData - Added
spBone_localToWorldRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
spTwoColorTimelineand additional fields onspSlotandspSlotData. - Added
userDatafield tospTrackEntry, so users can expose data inspAnimationStatecallbacks. - Modified kvec.h used by SkeletonBinary.c to use Spine's MALLOC/FREE macros. That way there's only one place to inject custom allocators (extension.h) commit
Cocos2d-X
- Fixed renderer to work with 3.6 changes
- Optimized rendering by removing all per-frame allocation in
SkeletonRenderer, resulting in 15% performance increase for large numbers of skeletons being rendered per frame. - Added support for two color tinting. Tinting is enabled/disabled per
SkeletonRenderer/SkeletonAnimationinstance. UseSkeletonRenderer::setTwoColorTint(). Note that two color tinting requires the use of a non-standard shader and vertex format. This means that skeletons rendered with two color tinting will break batching. However, skeletons with two color tinting enabled and rendered after each other will be batched. - Updated example to use Cocos2d-x 3.14.1.
Cocos2d-Objc
- Fixed renderer to work with 3.6 changes
SFML
- Fixed renderer to work with 3.6 changes. Sadly, two color tinting does not work, as the vertex format in SFML is fixed.
Unreal Engine 4
- Fixed renderer to work with 3.6 changes
C#
- Breaking changes
MeshAttachment.parentMeshis now a private field to enforce using the.ParentMeshsetter property in external code. TheMeshAttachment.ParentMeshproperty is an appropriate replacement wherever.parentMeshwas used.
Unity
- Fixed renderer to work with 3.6 changes.
- Two color tinting is currently supported via extra UV2 and UV3 mesh vertex streams. To use Two color tinting, you need to:
- switch on "Tint Black" under "Advanced...",
- use the new
Spine/Skeleton Tint Blackshader, or your own shader that treats the UV2 and UV3 streams similarly. SkeletonAnimatornow has autoreset set to true by default. Old prefabs and scene values will have been serialized to whatever value it was previously. This change only applies to new instances of SkeletonAnimator.- Old triangle-winding code has been removed from
SkeletonRenderer. Please use shaders that have backface culling off. - The code in the example scripts have been switched over to using properties instead of fields. This is in anticipation of both users who want to move the Spine folders to the Unity Plugins folder (compiled as a different assembly), and of Unity 2017's ability to manually define different assemblies.
- Warnings and conditionals checking for specific Unity 5.2-and-below incompatibility have been removed.
AtasRegionAttacherandSpriteAttacherare now part ofExample Modules, to reflect that they are meant to be used as sample code rather than production.- In the unitypackage, the "spine-csharp" and "spine-unity" folders are now inside a "Spine" folder. This change will only affect fresh imports. Importing the unitypackage to update Spine-Unity in your project will update the appropriate files wherever you have moved them.
Lua
- Breaking changes
- Removed
Bone:worldToLocalRotationXandBone:worldToLocalRotationY. Replaced byBone:worldToLocalRotation(rotation given relative to x-axis, counter-clockwise, in degrees). VertexAttachment:computeWorldVerticesnow takes offsets and stride to allow compositing vertices directly in a vertex buffer to be send to the GPU. The compositing is now performed in the backends' respective renderers. This also affects the subclassesMeshAttachment,BoundingBoxAttachmentandPathAttachment.- Removed
RegionAttachment:updateWorldVertices, addedRegionAttachment:computeWorldVertices, which takes offsets and stride to allow compositing vertices directly in a vertex buffer to be send to the GPU. The compositing is now performed in the backends' respective renderers. - Removed
MeshAttachment.worldVerticesfield. Computation is now performed in each backends' respective renderer. Theuvcoordinates are now stored inMeshAttachment.uvs. - Removed
RegionAttachment.verticesfield. Computation is now performed in each backends respective renderer. Theuvcoordinates for each vertex are now stored in theRegionAttachment.uvsfield. - Additions
- Added
Bone:localToWorldRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimelineand additional fields onSlotandSlotData. - Added
PointAttachment, additional methodnewPointAttachmentinAttachmentLoaderinterface. - Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData
Love2D
- Fixed renderer to work with 3.6 changes
- Added support for two color tinting. Enable it via
SkeletonRenderer.new(true).
Corona
- Fixed renderer to work with 3.6 changes. Sadly, two color tinting is not supported, as Corona doesn't let us change the vertex format needed and its doesn't allow to modify shaders in the way needed for two color tinting
Typescript/Javascript
- Breaking changes
Skeleton.getBoundstakes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.- Removed
Bone.worldToLocalRotationXandBone.worldToLocalRotationY. Replaced byBone.worldToLocalRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Removed
VertexAttachment.computeWorldVerticesoverload, changedVertexAttachment.computeWorldVerticesWithtoVertexAttachment.computeWorldVertices, addedstrideparameter. - Removed
RegionAttachment.verticesfield. The vertices array is provided toRegionAttachment.computeWorldVerticesby the API user now. - Removed
RegionAttachment.updateWorldVertices, addedRegionAttachment.computeWorldVertices. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the providedworldVerticesarray, starting atoffset, then moving bystridearray elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer. - Additions
- Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData - Added
Bone.localToWorldRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimelineand additional fields onSlotandSlotData. - Added
PointAttachment, additional methodnewPointAttachmentinAttachmentLoaderinterface.
WebGL backend
- Fixed renderer to work with 3.6 changes.
- Added support for two color tinting.
- Improved performance by using
DYNAMIC_DRAWfor vertex buffer objects and fixing bug that copied to much data to the GPU each frame inPolygonBatcher/Mesh. - Added two color tinting support, enabled by default. You can disable it via the constructors of
SceneRenderer,SkeletonRendererandPolygonBatcher. Note that you will need to use a shader created viaShader.newTwoColoredTexturedShadershader withSkeletonRendererandPolygonBatcherif two color tinting is enabled.
Canvas backend
- Fixed renderer to work for 3.6 changes. Sadly, we can't support two color tinting via the Canvas API.
- Added support for shearing and non-uniform scaling inherited from parent bones.
- Added support for alpha tinting.
Three.js backend
- Fixed renderer to work with 3.6 changes. Two color tinting is not supported.
Widget backend
- Fixed renderer to work for 3.6 changes. Supports two color tinting (see webgl backend changes for details).
- Added fields
atlasContentandjsonContenttoWidgetConfigurationallowing you to directly pass the contents of the.atlasand.jsonfile without having to do a request. SeeREADME.mdand the example for details.