Abstract
Abstract
cloneOptional
depth: numberYields all unique color values in the branch, or optionally only ones in the node.
Optional
recurse: boolean = trueControls whether or not to yield colors in descendant nodes. Defaults to true.
Generates a color palette that can be used to recolor other nodes based on the colors in this branch.
Controls the behavior of the color sampler. See PaletteMode for more information.
Abstract
getAbstract
getGets a color property for the node based on the
given options. The returned color should equal the color of the visual
effect of the node in-game, if it has a visual effect, except property
modifiers and other forms of randomization are not applied. Nodes without
a visual effect will return null
instead.
This may be useful for generating accurate color previews for nodes.
Optional
opts: NodeColorOptionsLists all resources (textures, models, animations, sounds) used in the node. Useful for finding out what resources must exist for the effect to work correctly, which is often needed when converting from one game to another.
Controls whether resources from descendant
nodes should be listed or not. Defaults to true
.
Abstract
hasRecolors the entire branch, or optionally just this node, by modifying color properties and fields using a given function.
A function used to remap color values. For some easy pre-made recolor functions, see the Recolor namespace.
Optional
recurse: booleanControls whether or not the recoloring should be applied to all descendant nodes. Defaults to true.
Recolors the entire branch, or optionally just this node, to fit a given color palette.
The color palette to apply. This can be generated from existing FXR branches using the generateColorPalette method.
Optional
recurse: booleanControls whether or not the recoloring should be applied to all descendant nodes. Defaults to true.
Remaps all resource IDs in the entire branch.
The function that is used to map the old resource IDs to the new ones.
Controls whether or not the remapping should be applied to all descendant nodes. Defaults to true.
Scales the entire branch by a factor. This updates all sizes, offsets, lengths, and radii of the actions in the branch, except certain multiplicative fields and properties.
The factor to scale the branch with.
Optional
mode?: ScalingModeOptional
recurse?: booleanControls whether or not the scaling should be applied to all descendant nodes. Defaults to true.
Scale the rate of time for the branch, or optionally just the node.
This method's main purpose is to serve as a fallback for changing the rate of time for Dark Souls 3 effects, which doesn't support the rateOfTime property. The rate of time is automatically scaled when writing effects for DS3, you do not need to do this yourself. As such, this method is only useful if you want to scale the rate of time for individual parts of an effect, or if you need the extra options available for this method.
The factor to scale the rate of time by. Setting this to 2 will make the node play twice as fast. Setting it to 0.5 will make it play half as fast.
Optional
options: { recurse?: boolean; scaleTracerDuration?: boolean } = {}Extra options for changing how the scaling is applied to different properties and descendant nodes.
Abstract
serializeOptional
options: FXRSerializeOptionsAbstract
toJSONYields all nodes in this branch, including this node.
Yields all actions in this branch, excluding node actions from nodes with configs, as those are not stored as actions internally.
Controls whether or not to yield actions in descendant nodes. Defaults to true.
Yields all configs in this branch.
Controls whether or not to yield configs in descendant nodes. Defaults to true.
Yields all properties in this branch, excluding properties inside modifiers and properties in the form of PropertyValues in DataActions.
Controls whether or not to yield properties in descendant nodes. Defaults to true.
Static
fromJSON
The base class for all nodes.
A node is a container with actions, configs, and other nodes, and they form the tree structure of the FXR.