Skip to content

Commit

Permalink
Fix preview renderer error with no spawn animation
Browse files Browse the repository at this point in the history
🙄
  • Loading branch information
SuperLlama88888 committed Jan 17, 2025
1 parent 767d18f commit f2b9c06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PreviewRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class PreviewRenderer {

let animator = this.viewer.getModel().animator;
let animation = animations["animations"]["animation.armor_stand.hologram.spawn"];
Object.values(animation["bones"]).map(bone => Object.values(bone).forEach(animationChannel => {
Object.values(animation["bones"] ?? {}).map(bone => Object.values(bone).forEach(animationChannel => {
animationChannel[`${animation["animation_length"]}`] = animationChannel[`${max(...Object.keys(animationChannel))}`];
}));
animator.addAnimation("spawn", animations["animations"]["animation.armor_stand.hologram.spawn"]);
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
### About
HoloPrint is a web app that converts MCBE structure files into resource packs showing holograms of builds. It builds off the work of [Structura](https://github.com/RavinMaddHatter/Structura), a similar project. Both Structura and HoloPrint aim to recreate the experience of Java Edition mods like [Litematica](https://github.com/maruohon/litematica) and [Schematica](https://github.com/Lunatrius/Schematica) for Bedrock Edition users through resource packs.

> [!TIP]
> View the [wiki](https://github.com/SuperLlama88888/holoprint/wiki/1.-Usage-instructions) for more detailed instructions!
### Usage
> [!NOTE]
> On Android the Structure Block export button is hidden; please use [this pack](assets/structureBlockButtonAdderPack.mcpack) to add it back.
Expand Down

0 comments on commit f2b9c06

Please sign in to comment.