Skip to content

feat(cursor): apply texture from config for obj and stl models#119

Merged
orhun merged 2 commits into
orhun:mainfrom
onuralpszr:feat/cursor-texture
Jul 5, 2026
Merged

feat(cursor): apply texture from config for obj and stl models#119
orhun merged 2 commits into
orhun:mainfrom
onuralpszr:feat/cursor-texture

Conversation

@onuralpszr

@onuralpszr onuralpszr commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This adds a texture option to the cursor model config so a base-color texture can be applied to the cursor model without editing code. Addresses #78.

[cursor.model]
path = "CairoSpinyMouse.obj"
texture = "texture.png"

The path is resolved relative to the config file, the same way path is.

  • config: new texture: Option<PathBuf> field on [cursor.model], resolved relative to the config file.
  • model: decode the image and set it as base_color_texture on the cursor material. Also load UV coordinates from OBJ files, which were previously dropped (a texture has nothing to map to without UVs).
  • systems: thread the image asset store into cursor spawning.
  • config/ratty.toml: documented example.

@onuralpszr onuralpszr force-pushed the feat/cursor-texture branch from d4b9412 to d315cd3 Compare June 30, 2026 21:24
@onuralpszr

Copy link
Copy Markdown
Contributor Author

@orhun friendly ping* also I tested it was able to handle nicely stl/obj + texture you apply (of course proper wrap type picture would make better look but that's using blender etc. type of skills required)

@orhun orhun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nice, thanks!

@orhun orhun merged commit 85e2d9c into orhun:main Jul 5, 2026
9 of 11 checks passed
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