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

Fix errors in sliced_cube.py #751

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ShivamKR12
Copy link

@ShivamKR12 ShivamKR12 commented Jan 28, 2025

Fixes #750

Fix errors in sliced_cube.py and add enhancements.

  • Add a fallback cube model using Mesh to ensure functionality.
  • Add a warning message to notify users about the missing texture.
  • Add checks to verify if the model is loaded successfully before accessing its attributes.
  • Add logging statements to indicate search paths and loading progress.
  • Adjust the scaling logic in the stretch_model function to ensure the fallback model behaves similarly to the intended sliceable_cube model.
  • Add a repeat_factor attribute to the SlicedCube class to handle texture repetition.
  • Implement a highlight function in the SlicedCube class to highlight specific regions of the mesh.

For more details, open the Copilot Workspace session.

Fixes pokepetter#750

Fix errors in `sliced_cube.py` and add enhancements.

* Add a fallback cube model using `Mesh` to ensure functionality.
* Add a warning message to notify users about the missing texture.
* Add checks to verify if the model is loaded successfully before accessing its attributes.
* Add logging statements to indicate search paths and loading progress.
* Adjust the scaling logic in the `stretch_model` function to ensure the fallback model behaves similarly to the intended `sliceable_cube` model.
* Add a `repeat_factor` attribute to the `SlicedCube` class to handle texture repetition.
* Implement a `highlight` function in the `SlicedCube` class to highlight specific regions of the mesh.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/pokepetter/ursina/issues/750?shareId=XXXX-XXXX-XXXX-XXXX).
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.

Errors in sliced_cube.py and Modifications to Fix Them
1 participant