Skip to content
EN

Interface: SvgVectorDisplayOptions ​

Inputs for createVectorDisplay. Most app code should use suity.vector nodes instead of calling this directly.

Properties ​

PropertyTypeDescription
svgTextstringRaw SVG text.
renderMode?stringauto (default), vector (prefer Graphics) or texture (always raster).
anchorX?numberHorizontal anchor in 0..1 (default 0.5).
anchorY?numberVertical anchor in 0..1 (default 0.5).
tint?string-
parts?Record<string, string>Part id/data-part -> tint color.
partVariants?Record<string, string>Part id -> variant id (data-variant group).
partAssets?Record<string, string>Part id -> external SVG asset; fitted into the original part bounds.
partsHidden?SvgPartsHiddenPart id -> true map, or the legacy string array.
resolution?number0 = device pixel ratio; positive values force the raster scale.
loadTexture() => Promise<Texture<TextureSource<any>>>Loads a texture for the whole SVG (texture mode/fallback).
loadSvgRaster?(svgText) => Promise<Texture<TextureSource<any>>>Optional raster fallback loader for unsupported SVG elements.
releaseSvgRaster?(svgText) => voidReleases a raster texture acquired from loadSvgRaster.
loadPartDisplay?(reference) => Promise<Container<ContainerChild> | null>Resolves an external part asset into a Pixi container.

Suity 开发者文档 · API 由 TypeDoc 从声明文件生成