Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: item & maps in frame rendering #243

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

Conversation

Phoenix616
Copy link

This is my WIP of rendering of item frames and especially maps in them. Opening this as a draft PR just to show my current state as a I wont be able to work on this for the next two weeks due to the holidays.

What works:

  • Map rendering (but not updating or markers)
  • Item Frame model

What doesn't work:

  • Item Frame textures, these are loaded from block textures and I'm unsure how to properly access the block texture atlas in an entity model
  • Positioning of the Item Frame entity is weird. This seems to be because Mineflayer only uses absolute numbers for the positions but item frames expect floats for their position as far as I can tell. This leads to the frames being inside block/hovering above them
  • Markers on maps

Copy link

codesandbox bot commented Dec 20, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@zardoy
Copy link
Owner

zardoy commented Dec 21, 2024

Wow, I'm kind of impressed. Very cool, seems you understand the code base very well :)

Will make sure to answer your questions in a few days

transparent: true,
alphaTest: 0.1
})
loadTexture(imageData, texture => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will texture be removed when the map entity is removed? from the current code it doesn't seem so, would be great if you could test:

  • in console type: viewer.renderer.info.memory.textures - this number should not increase after removing / re-adding, thanks

@Phoenix616 Phoenix616 force-pushed the pr/itemframe-maps branch 3 times, most recently from 266eb20 to 3db17c5 Compare January 9, 2025 22:50
@zardoy zardoy marked this pull request as ready for review January 16, 2025 02:27
@zardoy zardoy changed the title Item frame rendering feat: item & maps in frame rendering Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants