mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 14:14:13 +01:00
Minor improvements to custom textures feature
This commit is contained in:
@@ -22,8 +22,11 @@ to_highlight = example.edges().group_by(Axis.Z)[-1]
|
||||
example_hl = Compound(to_highlight).translate((0, 0, 1e-3)) # To avoid z-fighting
|
||||
example_hl.color = (1, 1, .0, 1)
|
||||
|
||||
# Show it in the frontend with hot-reloading
|
||||
show(example, example_hl)
|
||||
# Show it in the frontend with hot-reloading (texture and other keyword arguments are optional)
|
||||
texture = ( # MIT License Framework7 Line Icons: https://www.svgrepo.com/svg/437552/checkmark-seal
|
||||
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAQAAAAB+tbP6AAAAQ0lEQVQI12P4b3+A4Z/8AYYHBw8w"
|
||||
"HHxwgOH8HyD+AsRPDjDMP+fAYD+fgcESiGfYOTCcqTnAcK4GogakFqQHpBdoBgAbGiPSbdzkhgAAAABJRU5ErkJggg==")
|
||||
show(example, example_hl, texture=texture)
|
||||
|
||||
# %%
|
||||
|
||||
|
||||
Reference in New Issue
Block a user