Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie committed Jun 6, 2024
1 parent 239fbbc commit c9f04a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/Spine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export class Spine extends Container implements View
{
if (attachment instanceof MeshAttachment || attachment instanceof RegionAttachment)
{
const cacheData = this.getCachedData(slot, attachment);
const cacheData = this._getCachedData(slot, attachment);

if (attachment instanceof RegionAttachment)
{
Expand Down Expand Up @@ -529,7 +529,8 @@ export class Spine extends Container implements View
}
}

getCachedData(slot: Slot, attachment: RegionAttachment | MeshAttachment): AttachmentCacheData
/** @internal */
_getCachedData(slot: Slot, attachment: RegionAttachment | MeshAttachment): AttachmentCacheData
{
const key = `${slot.data.index}-${attachment.name}`;

Expand Down Expand Up @@ -695,7 +696,7 @@ export class Spine extends Container implements View

if (attachment && (attachment instanceof RegionAttachment || attachment instanceof MeshAttachment))
{
const cacheData = this.getCachedData(slot, attachment);
const cacheData = this._getCachedData(slot, attachment);

bounds.addVertexData(cacheData.vertices, 0, cacheData.vertices.length);
}
Expand Down
4 changes: 2 additions & 2 deletions src/SpinePipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class SpinePipe implements RenderPipe<Spine>

if (attachment instanceof RegionAttachment || attachment instanceof MeshAttachment)
{
const cacheData = spine.getCachedData(slot, attachment);
const cacheData = spine._getCachedData(slot, attachment);
const batchableSpineSlot = gpuSpine.slotBatches[cacheData.id] ||= new BatchableSpineSlot();

if (!cacheData.clipped || (cacheData.clipped && cacheData.clippedData.vertices.length > 0))
Expand Down Expand Up @@ -146,7 +146,7 @@ export class SpinePipe implements RenderPipe<Spine>

if (attachment instanceof RegionAttachment || attachment instanceof MeshAttachment)
{
const batchableSpineSlot = gpuSpine.slotBatches[spine.getCachedData(slot, attachment).id];
const batchableSpineSlot = gpuSpine.slotBatches[spine._getCachedData(slot, attachment).id];

batchableSpineSlot.batcher.updateElement(batchableSpineSlot);
}
Expand Down

0 comments on commit c9f04a4

Please sign in to comment.