AppearancePatternAPI¶
Interface AppearancePatternAPI
changeAppearancePattern(
patternId: number,
properties: AppearancePatternProperties,
): AppearancePatternProperties;
createAppearancePattern(properties?: AppearancePatternProperties): number;
getAppearancePatternData(patternId: number): AppearancePatternProperties;
getAppearancePatterns(): number[];
removeAppearancePattern(patternId: number, safe?: boolean): RemoveState;
}
Hierarchy (View Summary)
- AppearancePatternAPI
Methods
change Appearance Pattern
- changeAppearancePattern(
patternId: number,
properties: AppearancePatternProperties,
): AppearancePatternPropertiesChanges one or more properties of an appearance pattern with the specified ID and triggers a AppearancePatternChangedEvent.
Parameters
- patternId: number
The ID of the appearance pattern you want to change.
- properties: AppearancePatternProperties
The properties of the appearance pattern you want change.
Returns AppearancePatternProperties
An object with the changed properties.
- patternId: number
create Appearance Pattern
Creates a new appearance pattern and triggers a AppearancePatternCreatedEvent. The current limit for concurrently defined appearance patterns is 31.
Parameters
Optionalproperties: AppearancePatternPropertiesInitial properties of the created appearance pattern.
Returns number
The ID of the newly created appearance pattern or undefined if the maximum number of appearance patterns has been reached.
get Appearance Pattern Data
Returns the properties of the appearance pattern entity with the specified ID.
Parameters
- patternId: number
The ID of the appearance pattern entity.
Returns AppearancePatternProperties
The properties of the appearance pattern entity.
- patternId: number
get Appearance Patterns
Returns the IDs of all appearance pattern entities in the webvis context.
Returns number[]
The IDs of all available appearance patterns
remove Appearance Pattern
Removes the appearance pattern from the scene and all related snapshots and triggers a AppearancePatternRemovedEvent.
Parameters
- patternId: number
The ID of the appearance pattern.
Optionalsafe: booleanPerforms a safe remove which interrupts the removal process if the appearance pattern is part of one or more snapshots. Default: false
Returns RemoveState
The resulting state of the removal process.
- patternId: number
AppearancePatternAPI
Overview
The AppearancePatternAPI provides a set of methods for creating and managing appearance pattern in a webvis context. It allows you to:
Quick Start
The fastest way to get familiar with the AppearancePatternAPI is by creating an appearance pattern and assigning it to a node. The appearance pattern can then be updated later and removed when it is no longer necessary:
Events
The following events are associated with the MaterialAPI: