Skip to content

Expose asset entries#291

Merged
waynemwashuma merged 2 commits into
wimaengine:devfrom
waynemwashuma:expose-assets-storage
Mar 16, 2026
Merged

Expose asset entries#291
waynemwashuma merged 2 commits into
wimaengine:devfrom
waynemwashuma:expose-assets-storage

Conversation

@waynemwashuma
Copy link
Copy Markdown
Collaborator

@waynemwashuma waynemwashuma commented Mar 16, 2026

Objective

Add a values() method to the Assets and DenseList classes to provide direct access to all stored items in a read only mode,

Solution

  • Assets.values(): Returns an iterable of all asset handles stored in the Assets container.
  • DenseList.values(): Returns a readonly array of all items in the dense list.

Showcase

// Iterate over all assets
for (const asset of assets.values()) {
  console.log(asset);
}

// Access all items in a dense list
const allItems = denseList.values();
console.log(allItems);

Migration guide

No breaking changes.

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@waynemwashuma waynemwashuma self-assigned this Mar 16, 2026
@waynemwashuma waynemwashuma added the type:enhancement New feature or request label Mar 16, 2026
@waynemwashuma waynemwashuma merged commit 82081f1 into wimaengine:dev Mar 16, 2026
7 checks passed
@waynemwashuma waynemwashuma deleted the expose-assets-storage branch March 16, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:asset mod:datastructure This PR/issue affects datastructure package type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant