style.imageByProperty
imageByProperty(property: string, options?: ImageMappingOptions): Promise<void>Use a node property's value as a texture image URL for each node.
Only nodes whose property value is a non-empty string receive an image
command. All SetNodeImage commands are wrapped in a single labeled
transaction — one undo step. Emits "style:changed".
property | string | Name of the node property containing the image URL. |
options | ImageMappingOptions | Optional category filter. |
Returns: Promise<void>
Example
await api.style.imageByProperty("avatarUrl");