mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 10:17:02 -06:00
Effect › Distort › Glass… offered only its four built-in textures. The
reference app's Texture menu also has Load Texture, which takes an
image file as the glass surface.
The Glass dialog now has a Load Texture… button. It reads a PNG, JPEG,
GIF, WebP, TIFF, BMP, PSD or PSB file within the pixel allowance the
renderer draws images in, and the Texture menu gains Loaded Texture.
The effect stores the image's gray levels in `textureImage` as a
grayscale PNG in base64, so the document saves the texture with the
effect, and copies of the effect carry it. effect.apply and
effect.setParams take `textureImage` as {path}, {name, dataBase64} or
the stored string; any other value is an error.
The texture lies one image pixel per point at Scaling 100%, centered on
the object and repeated. Each pixel's luma is the surface's height,
from 0 for black to 1 pt for white, and a transparent pixel counts as
middle gray. A Glass without `textureImage` draws and saves as before.
Docs: docs/mcp.md (Glass textures), docs/effects-parity.md,
docs/gaps.md, docs/target-app-parity.md.
24 lines
620 B
TOML
24 lines
620 B
TOML
[package]
|
|
name = "vectorcraft-effects"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "VectorCraft live effects evaluated to geometry"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
vectorcraft-geom = { workspace = true }
|
|
vectorcraft-three-d = { workspace = true }
|
|
vectorcraft-doc = { workspace = true }
|
|
vectorcraft-pathops = { workspace = true }
|
|
vectorcraft-text = { workspace = true }
|
|
vectorcraft-plugins = { workspace = true }
|
|
image = { workspace = true }
|
|
kurbo = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
vectorcraft-color = { workspace = true }
|