Easy to Use
Everything is written to be as intuitive to use as possible, through consistent design.
From 7af7f295985095a20e45a0102a573853a76632c2 Mon Sep 17 00:00:00 2001
From: thepaperpilot 404 • LayerTreeNodeOptions: An object that configures a LayerTreeNode profectus/src/data/common.tsx:175 • ResetButtonOptions: An object that configures a ResetButton profectus/src/data/common.tsx:33 • Section: An option object for a modifier display as a single section. * profectus/src/data/common.tsx:240 Ƭ GenericLayerTreeNode: A type that matches any valid LayerTreeNode object. profectus/src/data/common.tsx:200 Ƭ GenericResetButton: A type that matches any valid ResetButton object. profectus/src/data/common.tsx:83 Ƭ LayerTreeNode< A tree node that is associated with a given layer, and which opens the layer when clicked. profectus/src/data/common.tsx:192 Ƭ ResetButton< A button that is used to control a conversion. It will show how much can be converted currently, and can show when that amount will go up, as well as handle only being clickable when a sufficient amount of currency can be gained. Assumes this button is associated with a specific node on a tree, and triggers that tree's reset propagation. profectus/src/data/common.tsx:70 ▸ colorText( Creates an HTML string for a span that writes some given text in a given color. profectus/src/data/common.tsx:383 ▸ createCollapsibleAchievements( Creates a collapsible display of a list of achievements profectus/src/data/common.tsx:391 ▸ createCollapsibleModifierSections( Takes an array of modifier "sections", and creates a JSXFunction that can render all those sections, and allow each section to be collapsed. Also returns a list of persistent refs that are used to control which sections are currently collapsed. [ profectus/src/data/common.tsx:264 ▸ createFormulaPreview( Utility function for displaying the result of a formula such that it will, when told to, preview how the formula's result will change. Requires a formula with a single variable inside. profectus/src/data/common.tsx:461 ▸ createLayerTreeNode< Lazily creates a tree node that's associated with a specific layer, with the given options. profectus/src/data/common.tsx:212 ▸ createResetButton< Lazily creates a reset button with the given options. profectus/src/data/common.tsx:98 ▸ estimateTime( Utility function for getting an ETA for when a target will be reached by a resource with a known (and assumed consistent) gain. • A computed ref whose value is true whenever the game is over. profectus/src/data/projEntry.tsx:88 ▸ fixOldSave( Given a player save data object being loaded with a different version, update the save data object to match the structure of the current version. profectus/src/data/projEntry.tsx:98 ▸ getInitialLayers( Given a player save data object being loaded, return a list of layers that should currently be enabled. If your project does not use dynamic layers, this should just return all layers. • Themes: An enum of all available themes and their internal IDs. The keys are their display names. profectus/src/data/themes.ts:73 • Theme: An object representing a theme the player can use to change the look of the game. profectus/src/data/themes.ts:24 • ThemeVars: A object of all CSS variables determined by the current theme. profectus/src/data/themes.ts:2 • default: A dictionary of all available themes. • AchievementDisplay: Modes for only displaying some achievements. profectus/src/features/achievements/achievement.tsx:51 • AchievementOptions: An object that configures an Achievement. profectus/src/features/achievements/achievement.tsx:62 • BaseAchievement: The properties that are added onto a processed AchievementOptions to create an Achievement. profectus/src/features/achievements/achievement.tsx:98 Ƭ Achievement< An object that represents a feature with requirements that is passively earned upon meeting certain requirements. profectus/src/features/achievements/achievement.tsx:114 Ƭ GenericAchievement: A type that matches any valid Achievement object. profectus/src/features/achievements/achievement.tsx:128 • A symbol used to identify Achievement features. profectus/src/features/achievements/achievement.tsx:48 ▸ createAchievement< Lazily creates an achievement with the given options. profectus/src/features/achievements/achievement.tsx:140 • ActionOptions: An object that configures an Action. profectus/src/features/action.tsx:42 • BaseAction: The properties that are added onto a processed ActionOptions to create an Action. profectus/src/features/action.tsx:56 Ƭ Action< An object that represents a feature that can be clicked upon, and then has a cooldown before it can be clicked again. profectus/src/features/action.tsx:76 Ƭ GenericAction: A type that matches any valid Action object. profectus/src/features/action.tsx:92 • A symbol used to identify Action features. profectus/src/features/action.tsx:37 ▸ createAction< Lazily creates an action with the given options. • BarOptions: An object that configures a Bar. profectus/src/features/bars/bar.ts:29 • BaseBar: The properties that are added onto a processed BarOptions to create a Bar. profectus/src/features/bars/bar.ts:61 Ƭ Bar< An object that represents a feature that displays some sort of progress or completion or resource with a cap. profectus/src/features/bars/bar.ts:73 Ƭ GenericBar: A type that matches any valid Bar object. profectus/src/features/bars/bar.ts:93 • A symbol used to identify Bar features. profectus/src/features/bars/bar.ts:24 ▸ createBar< Lazily creates a bar with the given options. profectus/src/features/bars/bar.ts:104 • ProgressDisplay: Ways to display progress of an action with a duration. profectus/src/features/boards/board.ts:41 • Shape: Node shapes. profectus/src/features/boards/board.ts:47 • BaseBoard: The properties that are added onto a processed BoardOptions to create a Board. profectus/src/features/boards/board.ts:254 • BaseBoardNodeAction: The properties that are added onto a processed BoardNodeActionOptions to create an BoardNodeAction. profectus/src/features/boards/board.ts:201 • BaseNodeType: The properties that are added onto a processed NodeTypeOptions to create a NodeType. profectus/src/features/boards/board.ts:134 • BoardNode: An object representing a node on the board. profectus/src/features/boards/board.ts:53 • BoardNodeActionOptions: An object that configures a BoardNodeAction. profectus/src/features/boards/board.ts:179 • BoardNodeLink: An object representing a link between two nodes on the board. profectus/src/features/boards/board.ts:65 • BoardOptions: An object that configures a Board. profectus/src/features/boards/board.ts:230 • NodeLabel: An object representing a label for a node. profectus/src/features/boards/board.ts:74 • NodeTypeOptions: An object that configures a NodeType. profectus/src/features/boards/board.ts:90 Ƭ Board< An object that represents a feature that is a zoomable, pannable board with various nodes upon it. profectus/src/features/boards/board.ts:280 Ƭ BoardData: The persistent data for a board. profectus/src/features/boards/board.ts:81 Ƭ BoardNodeAction< An object that represents an action that can be taken upon a node. profectus/src/features/boards/board.ts:206 Ƭ GenericBoard: A type that matches any valid Board object. profectus/src/features/boards/board.ts:295 Ƭ GenericBoardNodeAction: A type that matches any valid BoardNodeAction object. profectus/src/features/boards/board.ts:219 Ƭ GenericNodeType: A type that matches any valid NodeType object. profectus/src/features/boards/board.ts:163 Ƭ NodeComputable< A type representing a computable value for a node on the board. Used for node types to return different values based on the given node and the state of the board. profectus/src/features/boards/board.ts:36 Ƭ NodeType< An object that represents a type of node that can appear on a board. It will handle getting properties and callbacks for every node of that type. profectus/src/features/boards/board.ts:140 • A symbol used to identify Board features. profectus/src/features/boards/board.ts:31 ▸ createBoard< Lazily creates a board with the given options. profectus/src/features/boards/board.ts:308 ▸ getNodeProperty< Gets the value of a property for a specified node. profectus/src/features/boards/board.ts:607 ▸ getUniqueNodeID( Utility to get an ID for a node that is guaranteed unique. profectus/src/features/boards/board.ts:621 • BaseChallenge: The properties that are added onto a processed ChallengeOptions to create a Challenge. profectus/src/features/challenges/challenge.tsx:92 • ChallengeOptions: An object that configures a Challenge. profectus/src/features/challenges/challenge.tsx:46 Ƭ Challenge< An object that represents a feature that can be entered and exited, and have one or more completions with scaling requirements. profectus/src/features/challenges/challenge.tsx:121 Ƭ GenericChallenge: A type that matches any valid Challenge object. profectus/src/features/challenges/challenge.tsx:137 • A symbol used to identify Challenge features. profectus/src/features/challenges/challenge.tsx:41 ▸ createActiveChallenge( Utility for taking an array of challenges where only one may be active at a time, and giving a ref to the one currently active (or null if none are active) profectus/src/features/challenges/challenge.tsx:345 ▸ createChallenge< Lazily creates a challenge with the given options. profectus/src/features/challenges/challenge.tsx:151 ▸ isAnyChallengeActive( Utility for reporting if any challenge in a list is currently active. Intended for preventing entering a challenge if another is already active. profectus/src/features/challenges/challenge.tsx:355 ▸ setupAutoComplete( This will automatically complete a challenge when it's requirements are met. profectus/src/features/challenges/challenge.tsx:325 • BaseClickable: The properties that are added onto a processed ClickableOptions to create an Clickable. profectus/src/features/clickables/clickable.ts:61 • ClickableOptions: An object that configures a Clickable. profectus/src/features/clickables/clickable.ts:29 Ƭ Clickable< An object that represents a feature that can be clicked or held down. profectus/src/features/clickables/clickable.ts:73 Ƭ GenericClickable: A type that matches any valid Clickable object. profectus/src/features/clickables/clickable.ts:86 • A symbol used to identify Clickable features. profectus/src/features/clickables/clickable.ts:24 ▸ createClickable< Lazily creates a clickable with the given options. profectus/src/features/clickables/clickable.ts:98 ▸ setupAutoClick( Utility to auto click a clickable whenever it can be. profectus/src/features/clickables/clickable.ts:192 • BaseConversion: The properties that are added onto a processed ConversionOptions to create a Conversion. profectus/src/features/conversion.ts:79 • ConversionOptions: An object that configures a Conversion. profectus/src/features/conversion.ts:17 Ƭ Conversion< An object that converts one Resource into another at a given rate. profectus/src/features/conversion.ts:87 Ƭ GenericConversion: A type that matches any valid Conversion object. profectus/src/features/conversion.ts:101 ▸ createConversion< Lazily creates a conversion with the given options. You typically shouldn't use this function directly. Instead use one of the other conversion constructors, which will then call this. profectus/src/features/conversion.ts:120 ▸ createCumulativeConversion< Creates a conversion that simply adds to the gainResource amount upon converting. This is similar to the behavior of "normal" layers in The Modding Tree. This is equivalent to just calling createConversion directly. profectus/src/features/conversion.ts:204 ▸ createIndependentConversion< Creates a conversion that will replace the gainResource amount with the new amount upon converting. This is similar to the behavior of "static" layers in The Modding Tree. profectus/src/features/conversion.ts:215 ▸ setupPassiveGeneration( This will automatically increase the value of conversion.gainResource without lowering the value of the input resource. It will by default perform 100% of a conversion's currentGain per second. If you use a ref for the rate you can set it's value to 0 when passive generation should be disabled.PAGE NOT FOUND
But if you don't change your direction, and if you keep looking, you may end up where you are heading.
Layer Component ​
Props ​
Name Type index
*number
display
*processedPropType<CoercableComponent>(Object, String, Function)
minimizedDisplay
processedPropType<CoercableComponent>(Object, String, Function)
minimized
*Ref<boolean>
name
*processedPropType<string>(String)
color
processedPropType<string>(String)
minimizable
processedPropType<boolean>(Boolean)
nodes
*Ref<Record<string, FeatureNode | undefined>>
Events ​
Name setMinimized
Module: data/common ​
Interfaces ​
LayerTreeNodeOptions ​
Object
Name Type Description append?
Computable
<boolean
>Whether or not to append the layer to the tabs list. If set to false, then the tree node will instead always remove all tabs to its right and then add the layer tab. Defaults to true. canClick?
Computable
<boolean
>Whether or not this tree node can be clicked. classes?
Computable
<Record
<string
, boolean
>>Dictionary of CSS classes to apply to this feature. color
Computable
<string
>The color to display this tree node as display?
Computable
<CoercableComponent
>The content to display in the tree node. Defaults to the layer's ID glowColor?
Computable
<string
>The color of the glow effect shown to notify the user there's something to do with this node. layerID
string
The ID of the layer this tree node is associated with mark?
Computable
<string
| boolean
>Shows a marker on the corner of the feature. onClick?
( e?
: MouseEvent
| TouchEvent
) => void
A function that is called when the tree node is clicked. onHold?
VoidFunction
A function that is called when the tree node is held down. reset?
GenericReset
A reset object attached to this node, used for propagating resets through the tree. style?
Computable
<StyleValue
>CSS to apply to this feature. visibility?
Computable
<boolean
| Visibility
>Whether this tree node should be visible. Defined in ​
ResetButtonOptions ​
Object
Name Type Description canClick?
Computable
<boolean
>Whether or not this button can currently be clicked. Defaults to checking the current gain amount is greater than minimumGain classes?
Computable
<Record
<string
, boolean
>>Dictionary of CSS classes to apply to this feature. conversion
GenericConversion
The conversion the button uses to calculate how much resources will be gained on click display?
Computable
<CoercableComponent
>The content to display on the button. By default, this includes the reset description, and amount of currency to be gained. mark?
Computable
<string
| boolean
>Shows a marker on the corner of the feature. minimumGain?
Computable
<DecimalSource
>When canClick is left to its default, minimumGain is used to only enable the reset button when a sufficient amount of currency to gain is available. onClick?
( e?
: MouseEvent
| TouchEvent
) => void
A function that is called when the clickable is clicked. onHold?
VoidFunction
A function that is called when the clickable is held down. resetDescription?
Computable
<string
>Text to display on low conversion amounts, describing what "resetting" is in this context. Defaults to "Reset for ". resetTime?
Persistent
<DecimalSource
>A persistent ref to track how much time has passed since the last time this tree node was reset. showNextAt?
Computable
<boolean
>Whether or not to show how much currency would be required to make the gain amount increase. small?
boolean
Toggles a smaller design for the feature. style?
Computable
<StyleValue
>CSS to apply to this feature. tree
GenericTree
The tree this reset button is apart of treeNode
GenericTreeNode
The specific tree node associated with this reset button visibility?
Computable
<boolean
| Visibility
>Whether this clickable should be visible. Defined in ​
Section ​
Object
Name Type Description base?
Computable
<DecimalSource
>The base value being modified. * baseText?
Computable
<CoercableComponent
>The label to call the base amount. Defaults to "Base". * modifier
WithRequired
<Modifier
, "description"
>The modifier to be displaying in this section. * smallerIsBetter?
boolean
Determines if numbers larger or smaller than the base should be displayed as red. subtitle?
Computable
<string
>A subtitle for this modifier, e.g. to explain the context for the modifier. * title
Computable
<string
>The header for this modifier. * unit?
string
The unit of measurement for the base. * visible?
Computable
<boolean
>Whether or not this section should be currently visible to the player. * Defined in ​
Type Aliases ​
GenericLayerTreeNode ​
Replace
<LayerTreeNode
<LayerTreeNodeOptions
>, { append?
: ProcessedComputable
<boolean
> ; display
: ProcessedComputable
<CoercableComponent
> }>Defined in ​
GenericResetButton ​
Replace
<GenericClickable
& ResetButton
<ResetButtonOptions
>, { canClick
: ProcessedComputable
<boolean
> ; display
: ProcessedComputable
<CoercableComponent
> ; minimumGain
: ProcessedComputable
<DecimalSource
> ; resetDescription
: ProcessedComputable
<string
> ; showNextAt
: ProcessedComputable
<boolean
> }>Defined in ​
LayerTreeNode ​
T
>: Replace
<TreeNode
<T
>, { append
: GetComputableType
<T
["append"
]> ; display
: GetComputableTypeWithDefault
<T
["display"
], T
["layerID"
]> }>Type parameters ​
Name Type T
extends LayerTreeNodeOptions
Defined in ​
ResetButton ​
T
>: Replace
<Clickable
<T
>, { canClick
: GetComputableTypeWithDefault
<T
["canClick"
], Ref
<boolean
>> ; display
: GetComputableTypeWithDefault
<T
["display"
], Ref
<JSX.Element
>> ; minimumGain
: GetComputableTypeWithDefault
<T
["minimumGain"
], 1
> ; onClick
: (event?
: MouseEvent
| TouchEvent
) => void
; resetDescription
: GetComputableTypeWithDefault
<T
["resetDescription"
], Ref
<string
>> ; showNextAt
: GetComputableTypeWithDefault
<T
["showNextAt"
], true
> }>Type parameters ​
Name Type T
extends ResetButtonOptions
Defined in ​
Functions ​
colorText ​
textToColor
, color?
): JSX.Element
Parameters ​
Name Type Default value Description textToColor
string
undefined
The content to change the color of color
string
"var(--accent2)"
The color to change the content to look like. Defaults to the current theme's accent 2 variable. Returns ​
JSX.Element
Defined in ​
createCollapsibleAchievements ​
achievements
): Object
Parameters ​
Name Type Description achievements
Record
<string
, GenericAchievement
>A dictionary of the achievements to display, inserted in the order from easiest to hardest Returns ​
Object
Name Type collapseAchievements
Persistent
<boolean
>display
JSXFunction
Defined in ​
createCollapsibleModifierSections ​
sectionsFunc
): [JSXFunction
, Persistent
<Record
<number
, boolean
>>]Parameters ​
Name Type Description sectionsFunc
() => Section
[]A function that returns the sections to display. Returns ​
JSXFunction
, Persistent
<Record
<number
, boolean
>>]Defined in ​
createFormulaPreview ​
formula
, showPreview
, previewAmount?
): JSXFunction
Parameters ​
Name Type Default value Description formula
GenericFormula
undefined
The formula to display the result of. showPreview
Computable
<boolean
>undefined
Whether or not to preview how the formula's result will change. previewAmount
Computable
<DecimalSource
>1
The amount to add to the current formula's variable amount to preview the change in result. Returns ​
Defined in ​
createLayerTreeNode ​
T
>(optionsFunc
): LayerTreeNode
<T
>Type parameters ​
Name Type T
extends LayerTreeNodeOptions
Parameters ​
Name Type Description optionsFunc
OptionsFunc
<T
>A function that returns the options object for this tree node. Returns ​
Defined in ​
createResetButton ​
T
>(optionsFunc
): ResetButton
<T
>Type parameters ​
Name Type T
extends ClickableOptions
& ResetButtonOptions
Parameters ​
Name Type Description optionsFunc
OptionsFunc
<T
>A function that returns the options object for this reset button. Returns ​
ResetButton
<T
>Defined in ​
estimateTime ​
resource
, rate
, target
): ComputedRef
<string
>Parameters ​
Name Type Description resource
Resource
<DecimalSource
>The resource that will be increasing over time. rate
Computable
<DecimalSource
>The rate at which the resource is increasing. target
Computable
<DecimalSource
>The target amount of the resource to estimate the duration until. Returns ​
ComputedRef
<string
>Defined in ​
Module: data/projEntry ​
Variables ​
hasWon ​
Const
hasWon: ComputedRef
<boolean
>Defined in ​
Functions ​
fixOldSave ​
oldVersion
, player
): void
Parameters ​
Name Type Description oldVersion
undefined
| string
The version of the save being loaded in player
Partial
<Player
>The save data being loaded in Returns ​
void
Defined in ​
getInitialLayers ​
player
): GenericLayer
[]Parameters ​
Name Type player
Partial
<Player
>Returns ​
Defined in ​
Module: data/themes ​
Enumerations ​
Themes ​
Object
Name Type Aqua
"aqua"
Classic
"classic"
Nordic
"nordic"
Paper
"paper"
Defined in ​
Interfaces ​
Theme ​
Object
Name Type Description floatingTabs
boolean
Whether or not tabs should "float" in the center of their container. mergeAdjacent
boolean
Whether or not adjacent features should merge together - removing the margin between them, and only applying the border radius to the first and last elements in the row or column. showPin
boolean
Whether or not to show a pin icon on pinned tooltips. variables
ThemeVars
The values of the theme's CSS variables. Defined in ​
ThemeVars ​
Object
Name Type --accent1
string
--accent2
string
--accent3
string
--background
string
--border-radius
string
--bought
string
--danger
string
--feature-foreground
string
--feature-margin
string
--foreground
string
--highlighted
string
--link
string
--locked
string
--modal-border
string
--outline
string
--points
string
--raised-background
string
--tooltip-background
string
Defined in ​
Variables ​
default ​
Record
<Themes
, Theme
>Defined in ​
Module: features/achievements/achievement ​
Enumerations ​
AchievementDisplay ​
Object
Name Type All
"all"
Configurable
"configurable"
Incomplete
"incomplete"
None
"none"
Defined in ​
Interfaces ​
AchievementOptions ​
Object
Name Type Description classes?
Computable
<Record
<string
, boolean
>>Dictionary of CSS classes to apply to this feature. display?
Computable
<CoercableComponent
| { effectDisplay?
: CoercableComponent
; optionsDisplay?
: CoercableComponent
; requirement?
: CoercableComponent
}>The display to use for this achievement. image?
Computable
<string
>An image to display as the background for this achievement. mark?
Computable
<string
| boolean
>Shows a marker on the corner of the feature. onComplete?
VoidFunction
A function that is called when the achievement is completed. requirements?
Requirements
The requirement(s) to earn this achievement. Can be left null if using complete. showPopups?
Computable
<boolean
>Whether or not to display a notification popup when this achievement is earned. small?
Computable
<boolean
>Toggles a smaller design for the feature. style?
Computable
<StyleValue
>CSS to apply to this feature. visibility?
Computable
<boolean
| Visibility
>Whether this achievement should be visible. Defined in ​
BaseAchievement ​
Object
Name Type Description [Component]
GenericComponent
The Vue component used to render this feature. [GatherProps]
() => Record
<string
, unknown
>A function to gather the props the vue component requires for this feature. complete
VoidFunction
A function to complete this achievement. earned
Persistent
<boolean
>Whether or not this achievement has been earned. id
string
An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. type
typeof AchievementType
A symbol that helps identify features of the same type. Defined in ​
Type Aliases ​
Achievement ​
T
>: Replace
<T
& BaseAchievement
, { classes
: GetComputableType
<T
["classes"
]> ; display
: GetComputableType
<T
["display"
]> ; image
: GetComputableType
<T
["image"
]> ; mark
: GetComputableType
<T
["mark"
]> ; showPopups
: GetComputableTypeWithDefault
<T
["showPopups"
], true
> ; style
: GetComputableType
<T
["style"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>Type parameters ​
Name Type T
extends AchievementOptions
Defined in ​
GenericAchievement ​
Replace
<Achievement
<AchievementOptions
>, { showPopups
: ProcessedComputable
<boolean
> ; visibility
: ProcessedComputable
<Visibility
| boolean
> }>Defined in ​
Variables ​
AchievementType ​
Const
AchievementType: typeof AchievementType
Defined in ​
Functions ​
createAchievement ​
T
>(optionsFunc?
, ...decorators
): Achievement
<T
>Type parameters ​
Name Type T
extends AchievementOptions
Parameters ​
Name Type Description optionsFunc?
OptionsFunc
<T
, BaseAchievement
, GenericAchievement
>Achievement options. ...decorators
GenericDecorator
[]- Returns ​
Achievement
<T
>Defined in ​
Components ​
Achievement Component ​
Props ​
Name Type visibility
*processedPropType<Visibility | boolean>(Number, Boolean)
display
processedPropType<UnwrapRef<GenericAchievement["display"]>>(Object, String, Function)
earned
*processedPropType<boolean>(Boolean)
requirements
processedPropType<Requirements>(Object, Array)
image
processedPropType<string>(String)
style
processedPropType<StyleValue>(String, Object, Array)
classes
processedPropType<Record<string, boolean>>(Object)
mark
processedPropType<boolean | string>(Boolean, String)
small
processedPropType<boolean>(Boolean)
id
*string
Module: features/action ​
Interfaces ​
ActionOptions ​
Object
Name Type Description autoStart?
Computable
<boolean
>Whether or not the action should perform automatically when the cooldown is finished. barOptions?
Partial
<BarOptions
>A pass-through to the Bar used to display the cooldown progress for the action. canClick?
Computable
<boolean
>Whether or not the clickable may be clicked. classes?
Computable
<Record
<string
, boolean
>>Dictionary of CSS classes to apply to this feature. display?
Computable
<CoercableComponent
| { description
: CoercableComponent
; title?
: CoercableComponent
}>The display to use for this clickable. duration
Computable
<DecimalSource
>The cooldown during which the action cannot be performed again, in seconds. mark?
Computable
<string
| boolean
>Shows a marker on the corner of the feature. onClick
( amount
: DecimalSource
) => void
A function that is called when the action is clicked. small?
boolean
Toggles a smaller design for the feature. style?
Computable
<StyleValue
>CSS to apply to this feature. visibility?
Computable
<boolean
| Visibility
>Whether this clickable should be visible. Defined in ​
BaseAction ​
Object
Name Type Description [Component]
GenericComponent
The Vue component used to render this feature. [GatherProps]
() => Record
<string
, unknown
>A function to gather the props the vue component requires for this feature. id
string
An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. isHolding
Ref
<boolean
>Whether or not the player is holding down the action. Actions will be considered clicked as soon as the cooldown completes when being held down. progress
Ref
<DecimalSource
>The current amount of progress through the cooldown. progressBar
GenericBar
The bar used to display the current cooldown progress. type
typeof ActionType
A symbol that helps identify features of the same type. update
( diff
: number
) => void
Update the cooldown the specified number of seconds Defined in ​
Type Aliases ​
Action ​
T
>: Replace
<T
& BaseAction
, { autoStart
: GetComputableTypeWithDefault
<T
["autoStart"
], false
> ; canClick
: GetComputableTypeWithDefault
<T
["canClick"
], true
> ; classes
: GetComputableType
<T
["classes"
]> ; display
: JSXFunction
; duration
: GetComputableType
<T
["duration"
]> ; mark
: GetComputableType
<T
["mark"
]> ; onClick
: VoidFunction
; style
: GetComputableType
<T
["style"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>Type parameters ​
Name Type T
extends ActionOptions
Defined in ​
GenericAction ​
Replace
<Action
<ActionOptions
>, { autoStart
: ProcessedComputable
<boolean
> ; canClick
: ProcessedComputable
<boolean
> ; visibility
: ProcessedComputable
<Visibility
| boolean
> }>Defined in ​
Variables ​
ActionType ​
Const
ActionType: typeof ActionType
Defined in ​
Functions ​
createAction ​
T
>(optionsFunc?
, ...decorators
): Action
<T
>Type parameters ​
Name Type T
extends ActionOptions
<T
>Parameters ​
Name Type Description optionsFunc?
OptionsFunc
<T
, BaseAction
, GenericAction
>Action options. ...decorators
GenericDecorator
[]- Returns ​
Action
<T
>Defined in ​
Module: features/bars/bar ​
Interfaces ​
BarOptions ​
Object
Name Type Description baseStyle?
Computable
<StyleValue
>CSS to apply to the bar's base. borderStyle?
Computable
<StyleValue
>CSS to apply to the bar's border. classes?
Computable
<Record
<string
, boolean
>>Dictionary of CSS classes to apply to this feature. direction
Computable
<Direction
>The direction in which the bar progresses. display?
Computable
<CoercableComponent
>The display to use for this bar. fillStyle?
Computable
<StyleValue
>CSS to apply to the bar's fill. height
Computable
<number
>The height of the bar. mark?
Computable
<string
| boolean
>Shows a marker on the corner of the feature. progress
Computable
<DecimalSource
>The progress value of the bar, from 0 to 1. style?
Computable
<StyleValue
>CSS to apply to this feature. textStyle?
Computable
<StyleValue
>CSS to apply to the bar's text. visibility?
Computable
<boolean
| Visibility
>Whether this bar should be visible. width
Computable
<number
>The width of the bar. Defined in ​
BaseBar ​
Object
Name Type Description [Component]
GenericComponent
The Vue component used to render this feature. [GatherProps]
() => Record
<string
, unknown
>A function to gather the props the vue component requires for this feature. id
string
An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. type
typeof BarType
A symbol that helps identify features of the same type. Defined in ​
Type Aliases ​
Bar ​
T
>: Replace
<T
& BaseBar
, { baseStyle
: GetComputableType
<T
["baseStyle"
]> ; borderStyle
: GetComputableType
<T
["borderStyle"
]> ; classes
: GetComputableType
<T
["classes"
]> ; direction
: GetComputableType
<T
["direction"
]> ; display
: GetComputableType
<T
["display"
]> ; fillStyle
: GetComputableType
<T
["fillStyle"
]> ; height
: GetComputableType
<T
["height"
]> ; mark
: GetComputableType
<T
["mark"
]> ; progress
: GetComputableType
<T
["progress"
]> ; style
: GetComputableType
<T
["style"
]> ; textStyle
: GetComputableType
<T
["textStyle"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> ; width
: GetComputableType
<T
["width"
]> }>Type parameters ​
Name Type T
extends BarOptions
Defined in ​
GenericBar ​
Replace
<Bar
<BarOptions
>, { visibility
: ProcessedComputable
<Visibility
| boolean
> }>Defined in ​
Variables ​
BarType ​
Const
BarType: typeof BarType
Defined in ​
Functions ​
createBar ​
T
>(optionsFunc
, ...decorators
): Bar
<T
>Type parameters ​
Name Type T
extends BarOptions
Parameters ​
Name Type Description optionsFunc
OptionsFunc
<T
, BaseBar
, GenericBar
>Bar options. ...decorators
GenericDecorator
[]- Returns ​
Bar
<T
>Defined in ​
Components ​
Bar Component ​
Props ​
Name Type progress
*processedPropType<DecimalSource>(String, Object, Number)
width
*processedPropType<number>(Number)
height
*processedPropType<number>(Number)
direction
*processedPropType<Direction>(String)
display
processedPropType<CoercableComponent>(Object, String, Function)
visibility
*processedPropType<Visibility | boolean>(Number, Boolean)
style
processedPropType<StyleValue>(Object, String, Array)
classes
processedPropType<Record<string, boolean>>(Object)
borderStyle
processedPropType<StyleValue>(Object, String, Array)
textStyle
processedPropType<StyleValue>(Object, String, Array)
baseStyle
processedPropType<StyleValue>(Object, String, Array)
fillStyle
processedPropType<StyleValue>(Object, String, Array)
mark
processedPropType<boolean | string>(Boolean, String)
id
*string
Module: features/boards/board ​
Enumerations ​
ProgressDisplay ​
Object
Name Type Fill
"Fill"
Outline
"Outline"
Defined in ​
Shape ​
Object
Name Type Circle
"Circle"
Diamond
"Triangle"
Defined in ​
Interfaces ​
BaseBoard ​
Object
Name Type Description [Component]
GenericComponent
The Vue component used to render this feature. [GatherProps]
() => Record
<string
, unknown
>A function to gather the props the vue component requires for this feature. draggingNode
Ref
<null
| BoardNode
>The currently being dragged node, if any. id
string
An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. mousePosition
Ref
<null
| { x
: number
; y
: number
}>The current mouse position, if over the board. nodes
Ref
<BoardNode
[]>All the nodes currently on the board. placeInAvailableSpace
( node
: BoardNode
, radius?
: number
, direction?
: Direction
) => void
Places a node in the nearest empty space in the given direction with the specified space around it. receivingNode
Ref
<null
| BoardNode
>If dragging a node, the node it's currently being hovered over, if any. selectedAction
Ref
<null
| GenericBoardNodeAction
>The currently selected action, if any. selectedNode
Ref
<null
| BoardNode
>The currently selected node, if any. type
typeof BoardType
A symbol that helps identify features of the same type. Defined in ​
BaseBoardNodeAction ​
Object
Name Type links?
Ref
<BoardNodeLink
[]>Defined in ​
BaseNodeType ​
Object
Name Type Description nodes
Ref
<BoardNode
[]>The nodes currently on the board of this type. Defined in ​
BoardNode ​
Object
Name Type id
number
pinned?
boolean
position
{ x
: number
; y
: number
}position.x
number
position.y
number
state?
State
type
string
Defined in ​
BoardNodeActionOptions ​
Object
Name Type Description confirmationLabel?
NodeComputable
<NodeLabel
, []>The confirmation label that appears under the action. fillColor?
NodeComputable
<string
, []>The fill color of the action. icon
NodeComputable
<string
, []>The icon to display for the action. id
string
A unique identifier for the action. links?
NodeComputable
<BoardNodeLink
[], []>An array of board node links associated with the action. They appear when the action is focused. onClick
( node
: BoardNode
) => void
A function that is called when the action is clicked. tooltip
NodeComputable
<NodeLabel
, []>The tooltip text to display for the action. visibility?
NodeComputable
<boolean
| Visibility
, []>Whether this action should be visible. Defined in ​
BoardNodeLink ​
Object
Name Type Description accent-height?
Numberish
- accumulate?
"none"
| "sum"
- additive?
"sum"
| "replace"
- alignment-baseline?
"alphabetic"
| "hanging"
| "ideographic"
| "mathematical"
| "auto"
| "baseline"
| "before-edge"
| "text-before-edge"
| "middle"
| "central"
| "after-edge"
| "text-after-edge"
| "inherit"
- allowReorder?
"no"
| "yes"
- alphabetic?
Numberish
- amplitude?
Numberish
- arabic-form?
"initial"
| "medial"
| "terminal"
| "isolated"
- aria-activedescendant?
string
Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. aria-atomic?
Booleanish
Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. aria-autocomplete?
"none"
| "inline"
| "list"
| "both"
Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. aria-busy?
Booleanish
Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. aria-checked?
Booleanish
| "mixed"
Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. See
- aria-pressed - aria-selected.aria-colcount?
Numberish
Defines the total number of columns in a table, grid, or treegrid. See
aria-colindex.aria-colindex?
Numberish
Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. See
- aria-colcount - aria-colspan.aria-colspan?
Numberish
Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. See
- aria-colindex - aria-rowspan.aria-controls?
string
Identifies the element (or elements) whose contents or presence are controlled by the current element. See
aria-owns.aria-current?
"time"
| Booleanish
| "page"
| "step"
| "location"
| "date"
Indicates the element that represents the current item within a container or set of related elements. aria-describedby?
string
Identifies the element (or elements) that describes the object. See
aria-labelledbyaria-details?
string
Identifies the element that provides a detailed, extended description for the object. See
aria-describedby.aria-disabled?
Booleanish
Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. See
- aria-hidden - aria-readonly.aria-dropeffect?
"none"
| "copy"
| "execute"
| "link"
| "move"
| "popup"
Indicates what functions can be performed when a dragged object is released on the drop target. Deprecated
in ARIA 1.1aria-errormessage?
string
Identifies the element that provides an error message for the object. See
- aria-invalid - aria-describedby.aria-expanded?
Booleanish
Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. aria-flowto?
string
Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. aria-grabbed?
Booleanish
Indicates an element's "grabbed" state in a drag-and-drop operation. Deprecated
in ARIA 1.1aria-haspopup?
"tree"
| Booleanish
| "menu"
| "listbox"
| "grid"
| "dialog"
Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. aria-hidden?
Booleanish
Indicates whether the element is exposed to an accessibility API. See
aria-disabled.aria-invalid?
Booleanish
| "grammar"
| "spelling"
Indicates the entered value does not conform to the format expected by the application. See
aria-errormessage.aria-keyshortcuts?
string
Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. aria-label?
string
Defines a string value that labels the current element. See
aria-labelledby.aria-labelledby?
string
Identifies the element (or elements) that labels the current element. See
aria-describedby.aria-level?
Numberish
Defines the hierarchical level of an element within a structure. aria-live?
"off"
| "assertive"
| "polite"
Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. aria-modal?
Booleanish
Indicates whether an element is modal when displayed. aria-multiline?
Booleanish
Indicates whether a text box accepts multiple lines of input or only a single line. aria-multiselectable?
Booleanish
Indicates that the user may select more than one item from the current selectable descendants. aria-orientation?
"horizontal"
| "vertical"
Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. aria-owns?
string
Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See
aria-controls.aria-placeholder?
string
Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. aria-posinset?
Numberish
Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See
aria-setsize.aria-pressed?
Booleanish
| "mixed"
Indicates the current "pressed" state of toggle buttons. See
- aria-checked - aria-selected.aria-readonly?
Booleanish
Indicates that the element is not editable, but is otherwise operable. See
aria-disabled.aria-relevant?
"additions"
| "additions text"
| "all"
| "removals"
| "text"
Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See
aria-atomic.aria-required?
Booleanish
Indicates that user input is required on the element before a form may be submitted. aria-roledescription?
string
Defines a human-readable, author-localized description for the role of an element. aria-rowcount?
Numberish
Defines the total number of rows in a table, grid, or treegrid. See
aria-rowindex.aria-rowindex?
Numberish
Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. See
- aria-rowcount - aria-rowspan.aria-rowspan?
Numberish
Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. See
- aria-rowindex - aria-colspan.aria-selected?
Booleanish
Indicates the current "selected" state of various widgets. See
- aria-checked - aria-pressed.aria-setsize?
Numberish
Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See
aria-posinset.aria-sort?
"none"
| "ascending"
| "descending"
| "other"
Indicates if items in a table or grid are sorted in ascending or descending order. aria-valuemax?
Numberish
Defines the maximum allowed value for a range widget. aria-valuemin?
Numberish
Defines the minimum allowed value for a range widget. aria-valuenow?
Numberish
Defines the current value for a range widget. See
aria-valuetext.aria-valuetext?
string
Defines the human readable text alternative of aria-valuenow for a range widget. ascent?
Numberish
- attributeName?
string
- attributeType?
string
- autoReverse?
Numberish
- azimuth?
Numberish
- baseFrequency?
Numberish
- baseProfile?
Numberish
- baseline-shift?
Numberish
- bbox?
Numberish
- begin?
Numberish
- bias?
Numberish
- by?
Numberish
- calcMode?
Numberish
- cap-height?
Numberish
- class?
any
SVG Styling Attributes See
https://www.w3.org/TR/SVG/styling.html#ElementSpecificStylingclip?
Numberish
- clip-path?
string
- clip-rule?
Numberish
- clipPathUnits?
Numberish
- color?
string
- color-interpolation?
Numberish
- color-interpolation-filters?
"auto"
| "inherit"
| "sRGB"
| "linearRGB"
- color-profile?
Numberish
- color-rendering?
Numberish
- contentScriptType?
Numberish
- contentStyleType?
Numberish
- cursor?
Numberish
- cx?
Numberish
- cy?
Numberish
- d?
string
- decelerate?
Numberish
- descent?
Numberish
- diffuseConstant?
Numberish
- direction?
Numberish
- display?
Numberish
- divisor?
Numberish
- dominant-baseline?
Numberish
- dur?
Numberish
- dx?
Numberish
- dy?
Numberish
- edgeMode?
Numberish
- elevation?
Numberish
- enable-background?
Numberish
- end?
Numberish
- endNode
BoardNode
- exponent?
Numberish
- externalResourcesRequired?
Numberish
- fill?
string
- fill-opacity?
Numberish
- fill-rule?
"inherit"
| "nonzero"
| "evenodd"
- filter?
string
- filterRes?
Numberish
- filterUnits?
Numberish
- flood-color?
Numberish
- flood-opacity?
Numberish
- focusable?
Numberish
- font-family?
string
- font-size?
Numberish
- font-size-adjust?
Numberish
- font-stretch?
Numberish
- font-style?
Numberish
- font-variant?
Numberish
- font-weight?
Numberish
- format?
Numberish
- from?
Numberish
- fx?
Numberish
- fy?
Numberish
- g1?
Numberish
- g2?
Numberish
- glyph-name?
Numberish
- glyph-orientation-horizontal?
Numberish
- glyph-orientation-vertical?
Numberish
- glyphRef?
Numberish
- gradientTransform?
string
- gradientUnits?
string
- hanging?
Numberish
- height?
Numberish
- horiz-adv-x?
Numberish
- horiz-origin-x?
Numberish
- href?
string
- id?
string
- ideographic?
Numberish
- image-rendering?
Numberish
- in?
string
- in2?
Numberish
- innerHTML?
string
- intercept?
Numberish
- k?
Numberish
- k1?
Numberish
- k2?
Numberish
- k3?
Numberish
- k4?
Numberish
- kernelMatrix?
Numberish
- kernelUnitLength?
Numberish
- kerning?
Numberish
- keyPoints?
Numberish
- keySplines?
Numberish
- keyTimes?
Numberish
- lang?
string
- lengthAdjust?
Numberish
- letter-spacing?
Numberish
- lighting-color?
Numberish
- limitingConeAngle?
Numberish
- local?
Numberish
- marker-end?
string
- marker-mid?
string
- marker-start?
string
- markerHeight?
Numberish
- markerUnits?
Numberish
- markerWidth?
Numberish
- mask?
string
- maskContentUnits?
Numberish
- maskUnits?
Numberish
- mathematical?
Numberish
- max?
Numberish
- media?
string
- method?
string
- min?
Numberish
- mode?
Numberish
- name?
string
- numOctaves?
Numberish
- offset?
Numberish
- offsetEnd?
Position
- offsetStart?
Position
- onAbort?
( payload
: Event
) => void
- onAnimationend?
( payload
: AnimationEvent
) => void
- onAnimationiteration?
( payload
: AnimationEvent
) => void
- onAnimationstart?
( payload
: AnimationEvent
) => void
- onAuxclick?
( payload
: MouseEvent
) => void
- onBeforeinput?
( payload
: Event
) => void
- onBlur?
( payload
: FocusEvent
) => void
- onCanplay?
( payload
: Event
) => void
- onCanplaythrough?
( payload
: Event
) => void
- onChange?
( payload
: Event
) => void
- onClick?
( payload
: MouseEvent
) => void
- onCompositionend?
( payload
: CompositionEvent
) => void
- onCompositionstart?
( payload
: CompositionEvent
) => void
- onCompositionupdate?
( payload
: CompositionEvent
) => void
- onContextmenu?
( payload
: MouseEvent
) => void
- onCopy?
( payload
: ClipboardEvent
) => void
- onCut?
( payload
: ClipboardEvent
) => void
- onDblclick?
( payload
: MouseEvent
) => void
- onDrag?
( payload
: DragEvent
) => void
- onDragend?
( payload
: DragEvent
) => void
- onDragenter?
( payload
: DragEvent
) => void
- onDragexit?
( payload
: DragEvent
) => void
- onDragleave?
( payload
: DragEvent
) => void
- onDragover?
( payload
: DragEvent
) => void
- onDragstart?
( payload
: DragEvent
) => void
- onDrop?
( payload
: DragEvent
) => void
- onDurationchange?
( payload
: Event
) => void
- onEmptied?
( payload
: Event
) => void
- onEncrypted?
( payload
: Event
) => void
- onEnded?
( payload
: Event
) => void
- onError?
( payload
: Event
) => void
- onFocus?
( payload
: FocusEvent
) => void
- onFocusin?
( payload
: FocusEvent
) => void
- onFocusout?
( payload
: FocusEvent
) => void
- onInput?
( payload
: Event
) => void
- onInvalid?
( payload
: Event
) => void
- onKeydown?
( payload
: KeyboardEvent
) => void
- onKeypress?
( payload
: KeyboardEvent
) => void
- onKeyup?
( payload
: KeyboardEvent
) => void
- onLoad?
( payload
: Event
) => void
- onLoadeddata?
( payload
: Event
) => void
- onLoadedmetadata?
( payload
: Event
) => void
- onLoadstart?
( payload
: Event
) => void
- onMousedown?
( payload
: MouseEvent
) => void
- onMouseenter?
( payload
: MouseEvent
) => void
- onMouseleave?
( payload
: MouseEvent
) => void
- onMousemove?
( payload
: MouseEvent
) => void
- onMouseout?
( payload
: MouseEvent
) => void
- onMouseover?
( payload
: MouseEvent
) => void
- onMouseup?
( payload
: MouseEvent
) => void
- onPaste?
( payload
: ClipboardEvent
) => void
- onPause?
( payload
: Event
) => void
- onPlay?
( payload
: Event
) => void
- onPlaying?
( payload
: Event
) => void
- onPointercancel?
( payload
: PointerEvent
) => void
- onPointerdown?
( payload
: PointerEvent
) => void
- onPointerenter?
( payload
: PointerEvent
) => void
- onPointerleave?
( payload
: PointerEvent
) => void
- onPointermove?
( payload
: PointerEvent
) => void
- onPointerout?
( payload
: PointerEvent
) => void
- onPointerover?
( payload
: PointerEvent
) => void
- onPointerup?
( payload
: PointerEvent
) => void
- onProgress?
( payload
: Event
) => void
- onRatechange?
( payload
: Event
) => void
- onReset?
( payload
: Event
) => void
- onScroll?
( payload
: UIEvent
) => void
- onSeeked?
( payload
: Event
) => void
- onSeeking?
( payload
: Event
) => void
- onSelect?
( payload
: Event
) => void
- onStalled?
( payload
: Event
) => void
- onSubmit?
( payload
: Event
) => void
- onSuspend?
( payload
: Event
) => void
- onTimeupdate?
( payload
: Event
) => void
- onTouchcancel?
( payload
: TouchEvent
) => void
- onTouchend?
( payload
: TouchEvent
) => void
- onTouchmove?
( payload
: TouchEvent
) => void
- onTouchstart?
( payload
: TouchEvent
) => void
- onTransitionend?
( payload
: TransitionEvent
) => void
- onTransitionstart?
( payload
: TransitionEvent
) => void
- onVolumechange?
( payload
: Event
) => void
- onWaiting?
( payload
: Event
) => void
- onWheel?
( payload
: WheelEvent
) => void
- opacity?
Numberish
- operator?
Numberish
- order?
Numberish
- orient?
Numberish
- orientation?
Numberish
- origin?
Numberish
- overflow?
Numberish
- overline-position?
Numberish
- overline-thickness?
Numberish
- paint-order?
Numberish
- panose-1?
Numberish
- pathLength?
Numberish
- patternContentUnits?
string
- patternTransform?
Numberish
- patternUnits?
string
- pointer-events?
Numberish
- points?
string
- pointsAtX?
Numberish
- pointsAtY?
Numberish
- pointsAtZ?
Numberish
- preserveAlpha?
Numberish
- preserveAspectRatio?
string
- primitiveUnits?
Numberish
- pulsing?
boolean
- r?
Numberish
- radius?
Numberish
- refX?
Numberish
- refY?
Numberish
- renderingIntent?
Numberish
- repeatCount?
Numberish
- repeatDur?
Numberish
- requiredExtensions?
Numberish
- requiredFeatures?
Numberish
- restart?
Numberish
- result?
string
- role?
string
- rotate?
Numberish
- rx?
Numberish
- ry?
Numberish
- scale?
Numberish
- seed?
Numberish
- shape-rendering?
Numberish
- slope?
Numberish
- spacing?
Numberish
- specularConstant?
Numberish
- specularExponent?
Numberish
- speed?
Numberish
- spreadMethod?
string
- startNode
BoardNode
- startOffset?
Numberish
- stdDeviation?
Numberish
- stemh?
Numberish
- stemv?
Numberish
- stitchTiles?
Numberish
- stop-color?
string
- stop-opacity?
Numberish
- strikethrough-position?
Numberish
- strikethrough-thickness?
Numberish
- string?
Numberish
- stroke
string
- stroke-dasharray?
Numberish
- stroke-dashoffset?
Numberish
- stroke-linecap?
"inherit"
| "butt"
| "round"
| "square"
- stroke-linejoin?
"inherit"
| "round"
| "miter"
| "bevel"
- stroke-miterlimit?
Numberish
- stroke-opacity?
Numberish
- stroke-width?
Numberish
- strokeWidth
number
- style?
string
| CSSProperties
- surfaceScale?
Numberish
- systemLanguage?
Numberish
- tabindex?
Numberish
- tableValues?
Numberish
- target?
string
- targetX?
Numberish
- targetY?
Numberish
- text-anchor?
string
- text-decoration?
Numberish
- text-rendering?
Numberish
- textLength?
Numberish
- to?
Numberish
- transform?
string
- type?
string
- u1?
Numberish
- u2?
Numberish
- underline-position?
Numberish
- underline-thickness?
Numberish
- unicode?
Numberish
- unicode-bidi?
Numberish
- unicode-range?
Numberish
- unitsPer-em?
Numberish
- v-alphabetic?
Numberish
- v-hanging?
Numberish
- v-ideographic?
Numberish
- v-mathematical?
Numberish
- values?
string
- vector-effect?
Numberish
- version?
string
- vert-adv-y?
Numberish
- vert-origin-x?
Numberish
- vert-origin-y?
Numberish
- viewBox?
string
- viewTarget?
Numberish
- visibility?
Numberish
- width?
Numberish
- widths?
Numberish
- word-spacing?
Numberish
- writing-mode?
Numberish
- x?
Numberish
- x-height?
Numberish
- x1?
Numberish
- x2?
Numberish
- xChannelSelector?
string
- xlinkActuate?
string
- xlinkArcrole?
string
- xlinkHref?
string
- xlinkRole?
string
- xlinkShow?
string
- xlinkTitle?
string
- xlinkType?
string
- xmlns?
string
- y?
Numberish
- y1?
Numberish
- y2?
Numberish
- yChannelSelector?
string
- z?
Numberish
- zoomAndPan?
string
- Defined in ​
BoardOptions ​
Object
Name Type Description classes?
Computable
<Record
<string
, boolean
>>Dictionary of CSS classes to apply to this feature. height?
Computable
<string
>The height of the board. Defaults to 100% links?
Computable
<null
| BoardNodeLink
[]>An array of board node links to display. startNodes
() => Omit
<BoardNode
, "id"
>[]A function that returns an array of initial board nodes, without IDs. state?
Computable
<BoardData
>The persistent state of the board. style?
Computable
<StyleValue
>CSS to apply to this feature. types
Record
<string
, NodeTypeOptions
>A dictionary of node types that can appear on the board. visibility?
Computable
<boolean
| Visibility
>Whether this board should be visible. width?
Computable
<string
>The width of the board. Defaults to 100% Defined in ​
NodeLabel ​
Object
Name Type color?
string
pulsing?
boolean
text
string
Defined in ​
NodeTypeOptions ​
Object
Name Type Description actionDistance?
NodeComputable
<number
, []>The distance between the center of the node and its actions. actions?
BoardNodeActionOptions
[]The list of action options for the node. canAccept?
NodeComputable
<boolean
, [BoardNode
]>Whether the node can accept another node being dropped upon it. classes?
NodeComputable
<Record
<string
, boolean
>, []>Dictionary of CSS classes to apply to this node. draggable?
NodeComputable
<boolean
, []>Whether the node is draggable or not. fillColor?
NodeComputable
<string
, []>The fill color of the node. label?
NodeComputable
<null
| NodeLabel
, []>An optional label for the node. onClick?
( node
: BoardNode
) => void
A function that is called when the node is clicked. onDrop?
( node
: BoardNode
, otherNode
: BoardNode
) => void
A function that is called when a node is dropped onto this node. outlineColor?
NodeComputable
<string
, []>The outline color of the node. progress?
NodeComputable
<number
, []>The progress value of the node. progressColor?
NodeComputable
<string
, []>The color of the progress indicator. progressDisplay?
NodeComputable
<ProgressDisplay
, []>How the progress should be displayed on the node. shape
NodeComputable
<Shape
, []>The shape of the node. size
NodeComputable
<number
, []>The size of the node - diameter for circles, width and height for squares. style?
NodeComputable
<StyleValue
, []>CSS to apply to this node. title
NodeComputable
<string
, []>The title to display for the node. titleColor?
NodeComputable
<string
, []>The color of the title text. update?
( node
: BoardNode
, diff
: number
) => void
A function that is called for each node of this type every tick. Defined in ​
Type Aliases ​
Board ​
T
>: Replace
<T
& BaseBoard
, { classes
: GetComputableType
<T
["classes"
]> ; height
: GetComputableType
<T
["height"
]> ; links
: GetComputableTypeWithDefault
<T
["links"
], Ref
<BoardNodeLink
[] | null
>> ; state
: GetComputableTypeWithDefault
<T
["state"
], Persistent
<BoardData
>> ; style
: GetComputableType
<T
["style"
]> ; types
: Record
<string
, GenericNodeType
> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> ; width
: GetComputableType
<T
["width"
]> }>Type parameters ​
Name Type T
extends BoardOptions
Defined in ​
BoardData ​
Object
Type declaration ​
Name Type nodes
BoardNode
[]selectedAction
string
| null
selectedNode
number
| null
Defined in ​
BoardNodeAction ​
T
>: Replace
<T
& BaseBoardNodeAction
, { confirmationLabel
: GetComputableTypeWithDefault
<T
["confirmationLabel"
], NodeLabel
> ; fillColor
: GetComputableType
<T
["fillColor"
]> ; icon
: GetComputableType
<T
["icon"
]> ; links
: GetComputableType
<T
["links"
]> ; tooltip
: GetComputableType
<T
["tooltip"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>Type parameters ​
Name Type T
extends BoardNodeActionOptions
Defined in ​
GenericBoard ​
Replace
<Board
<BoardOptions
>, { links
: ProcessedComputable
<BoardNodeLink
[] | null
> ; state
: ProcessedComputable
<BoardData
> ; visibility
: ProcessedComputable
<Visibility
| boolean
> }>Defined in ​
GenericBoardNodeAction ​
Replace
<BoardNodeAction
<BoardNodeActionOptions
>, { confirmationLabel
: NodeComputable
<NodeLabel
> ; visibility
: NodeComputable
<Visibility
| boolean
> }>Defined in ​
GenericNodeType ​
Replace
<NodeType
<NodeTypeOptions
>, { actionDistance
: NodeComputable
<number
> ; canAccept
: NodeComputable
<boolean
, [BoardNode
]> ; draggable
: NodeComputable
<boolean
> ; progressColor
: NodeComputable
<string
> ; progressDisplay
: NodeComputable
<ProgressDisplay
> ; shape
: NodeComputable
<Shape
> ; size
: NodeComputable
<number
> }>Defined in ​
NodeComputable ​
T
, S
>: Computable
<T
> | (node
: BoardNode
, ...args
: S
) => T
Type parameters ​
Name Type T
T
S
extends unknown
[] = []Defined in ​
NodeType ​
T
>: Replace
<T
& BaseNodeType
, { actionDistance
: GetComputableTypeWithDefault
<T
["actionDistance"
], number
> ; actions?
: GenericBoardNodeAction
[] ; canAccept
: GetComputableTypeWithDefault
<T
["canAccept"
], false
> ; classes
: GetComputableType
<T
["classes"
]> ; draggable
: GetComputableTypeWithDefault
<T
["draggable"
], false
> ; fillColor
: GetComputableType
<T
["fillColor"
]> ; label
: GetComputableType
<T
["label"
]> ; outlineColor
: GetComputableType
<T
["outlineColor"
]> ; progress
: GetComputableType
<T
["progress"
]> ; progressColor
: GetComputableTypeWithDefault
<T
["progressColor"
], "none"
> ; progressDisplay
: GetComputableTypeWithDefault
<T
["progressDisplay"
], Fill
> ; shape
: GetComputableTypeWithDefault
<T
["shape"
], Circle
> ; size
: GetComputableTypeWithDefault
<T
["size"
], 50
> ; style
: GetComputableType
<T
["style"
]> ; title
: GetComputableType
<T
["title"
]> ; titleColor
: GetComputableType
<T
["titleColor"
]> }>Type parameters ​
Name Type T
extends NodeTypeOptions
Defined in ​
Variables ​
BoardType ​
Const
BoardType: typeof BoardType
Defined in ​
Functions ​
createBoard ​
T
>(optionsFunc
): Board
<T
>Type parameters ​
Name Type T
extends BoardOptions
Parameters ​
Name Type Description optionsFunc
OptionsFunc
<T
, BaseBoard
, GenericBoard
>Board options. Returns ​
Board
<T
>Defined in ​
getNodeProperty ​
T
, S
>(property
, node
, ...args
): T
Type parameters ​
Name Type T
T
S
extends unknown
[]Parameters ​
Name Type Description property
NodeComputable
<T
, S
>The property to find the value of node
BoardNode
The node to get the property of ...args
S
- Returns ​
T
Defined in ​
getUniqueNodeID ​
board
): number
Parameters ​
Name Type Description board
GenericBoard
The board feature to generate an ID for Returns ​
number
Defined in ​
Components ​
Board Component ​
Props ​
Name Type nodes
*Ref
types
*Record
state
*Ref
visibility
*ProcessedComputable
width
ProcessedComputable
height
ProcessedComputable
style
ProcessedComputable
classes
ProcessedComputable
links
*Ref
selectedAction
*Ref
selectedNode
*Ref
draggingNode
*Ref
receivingNode
*Ref
mousePosition
*Ref
setReceivingNode
*TSFunctionType
setDraggingNode
*TSFunctionType
BoardLink Component ​
Props ​
Name Type link
*BoardNodeLink
BoardNodeAction Component ​
Props ​
Name Type node
*BoardNode
nodeType
*GenericNodeType
actions
GenericBoardNodeAction[]
isSelected
*boolean
selectedAction
*GenericBoardNodeAction | null
Events ​
Name clickAction
BoardNode Component ​
Props ​
Name Type node
*BoardNode
nodeType
*GenericNodeType
dragging
*BoardNode | null
dragged
{
x: number;
y: number;
}hasDragged
boolean
receivingNode
boolean
selectedNode
*BoardNode | null
selectedAction
*GenericBoardNodeAction | null
Events ​
Name mouseDown
endDragging
clickAction
Module: features/challenges/challenge ​
Interfaces ​
BaseChallenge ​
Object
Name Type Description [Component]
GenericComponent
The Vue component used to render this feature. [GatherProps]
() => Record
<string
, unknown
>A function to gather the props the vue component requires for this feature. active
Persistent
<boolean
>Whether or not this challenge is currently active. canComplete
Ref
<DecimalSource
>The current amount of times this challenge can be completed. complete
( remainInChallenge?
: boolean
) => void
A function to complete this challenge. completed
Ref
<boolean
>Whether or not this challenge has been completed. completions
Persistent
<DecimalSource
>The current number of times this challenge has been completed. id
string
An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. maxed
Ref
<boolean
>Whether or not this challenge's completion count is at its limit. toggle
VoidFunction
A function to enter or leave the challenge. type
typeof ChallengeType
A symbol that helps identify features of the same type. Defined in ​
ChallengeOptions ​
Object
Name Type Description canStart?
Computable
<boolean
>Whether this challenge can be started. classes?
Computable
<Record
<string
, boolean
>>Dictionary of CSS classes to apply to this feature. completionLimit?
Computable
<DecimalSource
>The maximum number of times the challenge can be completed. display?
Computable
<CoercableComponent
| { description
: CoercableComponent
; effectDisplay?
: CoercableComponent
; goal?
: CoercableComponent
; reward?
: CoercableComponent
; title?
: CoercableComponent
}>The display to use for this challenge. mark?
Computable
<string
| boolean
>Shows a marker on the corner of the feature. maximize?
Computable
<boolean
>Whether or not completing this challenge should grant multiple completions if requirements met. Requires requirements to be a requirement or array of requirements with Requirement.canMaximize true. onComplete?
VoidFunction
A function that is called when the challenge is completed. onEnter?
VoidFunction
A function that is called when the challenge is entered. onExit?
VoidFunction
A function that is called when the challenge is exited. requirements
Requirements
The requirement(s) to complete this challenge. reset?
GenericReset
The reset function for this challenge. style?
Computable
<StyleValue
>CSS to apply to this feature. visibility?
Computable
<boolean
| Visibility
>Whether this challenge should be visible. Defined in ​
Type Aliases ​
Challenge ​
T
>: Replace
<T
& BaseChallenge
, { canStart
: GetComputableTypeWithDefault
<T
["canStart"
], true
> ; classes
: GetComputableType
<T
["classes"
]> ; completionLimit
: GetComputableTypeWithDefault
<T
["completionLimit"
], 1
> ; display
: GetComputableType
<T
["display"
]> ; mark
: GetComputableTypeWithDefault
<T
["mark"
], Ref
<boolean
>> ; maximize
: GetComputableType
<T
["maximize"
]> ; requirements
: GetComputableType
<T
["requirements"
]> ; style
: GetComputableType
<T
["style"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>Type parameters ​
Name Type T
extends ChallengeOptions
Defined in ​
GenericChallenge ​
Replace
<Challenge
<ChallengeOptions
>, { canStart
: ProcessedComputable
<boolean
> ; completionLimit
: ProcessedComputable
<DecimalSource
> ; mark
: ProcessedComputable
<boolean
> ; visibility
: ProcessedComputable
<Visibility
| boolean
> }>Defined in ​
Variables ​
ChallengeType ​
Const
ChallengeType: typeof ChallengeType
Defined in ​
Functions ​
createActiveChallenge ​
challenges
): Ref
<GenericChallenge
| null
>Parameters ​
Name Type Description challenges
GenericChallenge
[]The list of challenges that are mutually exclusive Returns ​
Ref
<GenericChallenge
| null
>Defined in ​
createChallenge ​
T
>(optionsFunc
, ...decorators
): Challenge
<T
>Type parameters ​
Name Type T
extends ChallengeOptions
Parameters ​
Name Type Description optionsFunc
OptionsFunc
<T
, BaseChallenge
, GenericChallenge
>Challenge options. ...decorators
GenericDecorator
[]- Returns ​
Challenge
<T
>Defined in ​
isAnyChallengeActive ​
challenges
): Ref
<boolean
>Parameters ​
Name Type Description challenges
GenericChallenge
[] | Ref
<null
| GenericChallenge
>List of challenges that are mutually exclusive Returns ​
Ref
<boolean
>Defined in ​
setupAutoComplete ​
challenge
, autoActive?
, exitOnComplete?
): WatchStopHandle
Parameters ​
Name Type Default value Description challenge
GenericChallenge
undefined
The challenge to auto-complete autoActive
Computable
<boolean
>true
Whether or not auto-completing should currently occur exitOnComplete
boolean
true
Whether or not to exit the challenge after auto-completion Returns ​
WatchStopHandle
Defined in ​
Components ​
Challenge Component ​
Props ​
Name Type active
*processedPropType<boolean>(Boolean)
maxed
*processedPropType<boolean>(Boolean)
canComplete
*processedPropType<boolean>(Boolean)
display
processedPropType<UnwrapRef<GenericChallenge["display"]>>(
String,
Object,
Function
)requirements
processedPropType<Requirements>(Object, Array)
visibility
*processedPropType<Visibility | boolean>(Number, Boolean)
style
processedPropType<StyleValue>(String, Object, Array)
classes
processedPropType<Record<string, boolean>>(Object)
completed
*processedPropType<boolean>(Boolean)
canStart
*processedPropType<boolean>(Boolean)
mark
processedPropType<boolean | string>(Boolean, String)
id
*string
toggle
*VoidFunction
Module: features/clickables/clickable ​
Interfaces ​
BaseClickable ​
Object
Name Type Description [Component]
GenericComponent
The Vue component used to render this feature. [GatherProps]
() => Record
<string
, unknown
>A function to gather the props the vue component requires for this feature. id
string
An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. type
typeof ClickableType
A symbol that helps identify features of the same type. Defined in ​
ClickableOptions ​
Object
Name Type Description canClick?
Computable
<boolean
>Whether or not the clickable may be clicked. classes?
Computable
<Record
<string
, boolean
>>Dictionary of CSS classes to apply to this feature. display?
Computable
<CoercableComponent
| { description
: CoercableComponent
; title?
: CoercableComponent
}>The display to use for this clickable. mark?
Computable
<string
| boolean
>Shows a marker on the corner of the feature. onClick?
( e?
: MouseEvent
| TouchEvent
) => void
A function that is called when the clickable is clicked. onHold?
VoidFunction
A function that is called when the clickable is held down. small?
boolean
Toggles a smaller design for the feature. style?
Computable
<StyleValue
>CSS to apply to this feature. visibility?
Computable
<boolean
| Visibility
>Whether this clickable should be visible. Defined in ​
Type Aliases ​
Clickable ​
T
>: Replace
<T
& BaseClickable
, { canClick
: GetComputableTypeWithDefault
<T
["canClick"
], true
> ; classes
: GetComputableType
<T
["classes"
]> ; display
: GetComputableType
<T
["display"
]> ; mark
: GetComputableType
<T
["mark"
]> ; style
: GetComputableType
<T
["style"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>Type parameters ​
Name Type T
extends ClickableOptions
Defined in ​
GenericClickable ​
Replace
<Clickable
<ClickableOptions
>, { canClick
: ProcessedComputable
<boolean
> ; visibility
: ProcessedComputable
<Visibility
| boolean
> }>Defined in ​
Variables ​
ClickableType ​
Const
ClickableType: typeof ClickableType
Defined in ​
Functions ​
createClickable ​
T
>(optionsFunc?
, ...decorators
): Clickable
<T
>Type parameters ​
Name Type T
extends ClickableOptions
Parameters ​
Name Type Description optionsFunc?
OptionsFunc
<T
, BaseClickable
, GenericClickable
>Clickable options. ...decorators
GenericDecorator
[]- Returns ​
Clickable
<T
>Defined in ​
setupAutoClick ​
layer
, clickable
, autoActive?
): Unsubscribe
Parameters ​
Name Type Default value Description layer
BaseLayer
undefined
The layer the clickable is apart of clickable
GenericClickable
undefined
The clicker to click automatically autoActive
Computable
<boolean
>true
Whether or not the clickable should currently be auto-clicking Returns ​
Unsubscribe
Defined in ​
Components ​
Clickable Component ​
Props ​
Name Type display
*processedPropType<UnwrapRef<GenericClickable["display"]>>(
Object,
String,
Function
)visibility
*processedPropType<Visibility | boolean>(Number, Boolean)
style
processedPropType<StyleValue>(Object, String, Array)
classes
processedPropType<Record<string, boolean>>(Object)
onClick
(e?: MouseEvent | TouchEvent) => void
onHold
VoidFunction
canClick
*processedPropType<boolean>(Boolean)
small
boolean
mark
processedPropType<boolean | string>(Boolean, String)
id
*string
Module: features/conversion ​
Interfaces ​
BaseConversion ​
Object
Name Type Description convert
VoidFunction
The function that performs the actual conversion. Defined in ​
ConversionOptions ​
Object
Name Type Description actualGain?
Computable
<DecimalSource
>The absolute amount the output resource will be changed by. Typically this will be set for you in a conversion constructor. This will differ from currentGain in the cases where the conversion isn't just adding the converted amount to the output resource. baseResource
Resource
<DecimalSource
>The input Resource for this conversion. buyMax?
Computable
<boolean
>Whether or not to cap the amount of the output resource gained by converting at 1. Defaults to true. convert?
VoidFunction
The function that performs the actual conversion from baseResource to gainResource. Typically this will be set for you in a conversion constructor. currentAt?
Computable
<DecimalSource
>The amount of the input resource currently being required in order to produce the currentGain. That is, if it went below this value then currentGain would decrease. Typically this will be set for you in a conversion constructor. currentGain?
Computable
<DecimalSource
>How much of the output resource the conversion can currently convert for. Typically this will be set for you in a conversion constructor. formula
( variable
: InvertibleIntegralFormula
) => InvertibleFormula
The formula used to determine how much gainResource should be earned by this converting. The passed value will be a Formula representing the baseResource variable. gainResource
Resource
<DecimalSource
>The output Resource for this conversion. i.e. the resource being generated. nextAt?
Computable
<DecimalSource
>The amount of the input resource required to make currentGain increase. Typically this will be set for you in a conversion constructor. onConvert?
( amountGained
: DecimalSource
) => void
A callback that happens after a conversion has been completed. Receives the amount gained via conversion. This will not be called whenever using currentGain without calling convert (e.g. passive generation) spend?
( amountGained
: DecimalSource
) => void
The function that spends the baseResource as part of the conversion. Defaults to setting the baseResource amount to 0. Defined in ​
Type Aliases ​
Conversion ​
T
>: Replace
<T
& BaseConversion
, { actualGain
: GetComputableTypeWithDefault
<T
["actualGain"
], Ref
<DecimalSource
>> ; buyMax
: GetComputableTypeWithDefault
<T
["buyMax"
], true
> ; currentAt
: GetComputableTypeWithDefault
<T
["currentAt"
], Ref
<DecimalSource
>> ; currentGain
: GetComputableTypeWithDefault
<T
["currentGain"
], Ref
<DecimalSource
>> ; formula
: InvertibleFormula
; nextAt
: GetComputableTypeWithDefault
<T
["nextAt"
], Ref
<DecimalSource
>> ; spend
: undefined
extends T
["spend"
] ? (amountGained
: DecimalSource
) => void
: T
["spend"
] }>Type parameters ​
Name Type T
extends ConversionOptions
Defined in ​
GenericConversion ​
Replace
<Conversion
<ConversionOptions
>, { actualGain
: ProcessedComputable
<DecimalSource
> ; buyMax
: ProcessedComputable
<boolean
> ; currentAt
: ProcessedComputable
<DecimalSource
> ; currentGain
: ProcessedComputable
<DecimalSource
> ; nextAt
: ProcessedComputable
<DecimalSource
> ; spend
: (amountGained
: DecimalSource
) => void
}>Defined in ​
Functions ​
createConversion ​
T
>(optionsFunc
, ...decorators
): Conversion
<T
>See
Type parameters ​
Name Type T
extends ConversionOptions
Parameters ​
Name Type Description optionsFunc
OptionsFunc
<T
, BaseConversion
, GenericConversion
>Conversion options. ...decorators
GenericDecorator
[]- Returns ​
Conversion
<T
>Defined in ​
createCumulativeConversion ​
S
>(optionsFunc
): Conversion
<S
>Type parameters ​
Name Type S
extends ConversionOptions
Parameters ​
Name Type Description optionsFunc
OptionsFunc
<S
, BaseConversion
, GenericConversion
>Conversion options. Returns ​
Conversion
<S
>Defined in ​
createIndependentConversion ​
S
>(optionsFunc
): Conversion
<S
>Type parameters ​
Name Type S
extends ConversionOptions
Parameters ​
Name Type Description optionsFunc
OptionsFunc
<S
, BaseConversion
, GenericConversion
>Converison options. Returns ​
Conversion
<S
>Defined in ​
setupPassiveGeneration ​
layer
, conversion
, rate?
, cap?
): void
Parameters ​
Name Type Default value Description layer
BaseLayer
undefined
The layer this passive generation will be associated with. Typically this
when calling this function from inside a layer's options function.conversion
GenericConversion
undefined
The conversion that will determine how much generation there is. rate
Computable
<DecimalSource
>1
A multiplier to multiply against the conversion's currentGain. cap
Computable
<DecimalSource
>Decimal.dInf
A value that should not be passed via passive generation. Returns ​
void
Defined in ​
Defined in ​
-
• Visibility: Object
Enum for what the visibility of a feature or component should be
Name | Type | Description |
---|---|---|
Hidden | 1 | The feature or component should not appear but still take up space |
None | 2 | The feature or component should not appear not take up space |
Visible | 0 | The feature or component should be visible |
profectus/src/features/feature.ts:61
Ƭ CoercableComponent: string
| DefineComponent
| JSXFunction
Any value that can be coerced into (or is) a vue component
profectus/src/features/feature.ts:25
Ƭ GenericComponent: DefineComponent
<any
, any
, any
>
A type that refers to any vue component
profectus/src/features/feature.ts:35
Ƭ JSXFunction: () => JSX.Element
& { [DoNotCache]
: true
}
A type referring to a function that returns JSX and is marked that it shouldn't be wrapped in a ComputedRef
See
profectus/src/features/feature.ts:21
Ƭ OptionsFunc<T
, R
, S
>: (obj
: R
) => OptionsObject
<T
, R
, S
>
Name | Type |
---|---|
T | T |
R | unknown |
S | R |
â–¸ (obj
): OptionsObject
<T
, R
, S
>
Utility function for a function that returns an object of a given type, with "this" bound to what the type will eventually be processed into. Intended for making lazily evaluated objects.
Name | Type |
---|---|
obj | R |
OptionsObject
<T
, R
, S
>
profectus/src/features/feature.ts:45
Ƭ OptionsObject<T
, R
, S
>: T
& Partial
<R
> & ThisType
<T
& S
>
Name | Type |
---|---|
T | T |
R | unknown |
S | R |
profectus/src/features/feature.ts:47
Ƭ Replace<T
, S
>: S
& Omit
<T
, keyof S
>
Utility type that is S, with any properties from T that aren't already present in S
Name |
---|
T |
S |
profectus/src/features/feature.ts:38
Ƭ StyleValue: string
| CSSProperties
| (string
| CSSProperties
)[]
Any value that can be passed into an HTML element's style attribute. Note that Profectus uses its own StyleValue and CSSProperties that are extended, in order to have additional properties added to them, such as variable CSS variables.
profectus/src/features/feature.ts:31
• Const
Component: typeof Component
A symbol to use as a key for a vue component a feature can be rendered with
See
profectus/src/features/feature.ts:10
• Const
GatherProps: typeof GatherProps
A symbol to use as a key for a prop gathering function that a feature can use to send to its component
See
profectus/src/features/feature.ts:15
â–¸ excludeFeatures(obj
, ...types
): unknown
[]
Traverses an object and returns all features that are not any of the given types. Features are any object with a "type" property that has a symbol value.
Name | Type | Description |
---|---|---|
obj | Record <string , unknown > | The object to traverse |
...types | symbol [] | The feature types that will be skipped over |
unknown
[]
profectus/src/features/feature.ts:130
â–¸ findFeatures(obj
, ...types
): unknown
[]
Traverses an object and returns all features of the given type(s)
Name | Type | Description |
---|---|---|
obj | Record <string , unknown > | The object to traverse |
...types | symbol [] | The feature types that will be searched for |
unknown
[]
profectus/src/features/feature.ts:105
â–¸ getUniqueID(prefix?
): string
Gets a unique ID to give to each feature, used for any sort of system that needs to identify elements in the DOM rather than references to the feature itself. (For example, branches) IDs are guaranteed unique, but NOT persistent - they likely will change between updates.
Name | Type | Default value | Description |
---|---|---|---|
prefix | string | "feature-" | A string to prepend to the id to make it more readable in the inspector tools |
string
profectus/src/features/feature.ts:56
â–¸ isHidden(visibility
): boolean
Name | Type |
---|---|
visibility | ProcessedComputable <boolean | Visibility > |
profectus/src/features/feature.ts:75
â–¸ isVisible(visibility
): boolean
Name | Type |
---|---|
visibility | ProcessedComputable <boolean | Visibility > |
profectus/src/features/feature.ts:70
â–¸ jsx(func
): JSXFunction
Takes a function and marks it as JSX so it won't get auto-wrapped into a ComputedRef. The function may also return empty string as empty JSX tags cause issues.
Name | Type |
---|---|
func | () => "" | Element |
profectus/src/features/feature.ts:84
â–¸ setDefault<T
, K
>(object
, key
, value
): asserts object is Exclude<T, K> & Required<Pick<T, K>>
Utility function to set a property on an object if and only if it doesn't already exist
Name | Type |
---|---|
T | T |
K | extends string | number | symbol |
Name | Type |
---|---|
object | T |
key | K |
value | T [K ] |
asserts object is Exclude<T, K> & Required<Pick<T, K>>
• BaseGrid: Object
The properties that are added onto a processed BoardOptions to create a Board.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
cellState | Persistent <Record <string | number , State >> | The persistent state of this grid, which is a dictionary of cell states. |
cells | Record <string | number , GridCell > | A dictionary of cells within this grid. |
getID | (id : string | number , state : State ) => string | Get the auto-generated ID for identifying a specific cell of this grid that appears in the DOM. Will not persist between refreshes or updates. |
getState | (id : string | number ) => State | Get the persistent state of the given cell. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
setState | (id : string | number , state : State ) => void | Set the persistent state of the given cell. |
type | typeof GridType | A symbol that helps identify features of the same type. |
profectus/src/features/grids/grid.ts:254
• GridCell: Object
Represents a cell within a grid. These properties will typically be accessed via a cell proxy that calls functions on the grid to get the properties for a specific cell.
See
createGridProxy
Name | Type | Description |
---|---|---|
canClick | boolean | Whether this cell can be clicked. |
classes? | Record <string , boolean > | Dictionary of CSS classes to apply to this feature. |
display | CoercableComponent | The main text that appears in the display. |
id | string | A unique identifier for the grid cell. |
onClick? | (e? : MouseEvent | TouchEvent ) => void | A function that is called when the cell is clicked. |
onHold? | VoidFunction | A function that is called when the cell is held down. |
startState | State | The initial persistent state of this cell. |
state | State | The persistent state of this cell. |
style? | StyleValue | CSS to apply to this feature. |
title? | CoercableComponent | A header to appear at the top of the display. |
visibility | boolean | Visibility | Whether this cell should be visible. |
profectus/src/features/grids/grid.ts:196
• GridOptions: Object
An object that configures a Grid.
Name | Type | Description |
---|---|---|
cols | Computable <number > | The number of columns in the grid. |
getCanClick? | CellComputable <boolean > | A computable to determine if a cell can be clicked. |
getClasses? | CellComputable <Record <string , boolean >> | A computable to get the CSS classes for a cell. |
getDisplay | CellComputable <CoercableComponent > | A computable to get the display component for a cell. |
getStartState | Computable <State > | (id : string | number ) => State | A computable to get the initial persistent state of a cell. |
getStyle? | CellComputable <StyleValue > | A computable to get the CSS styles for a cell. |
getTitle? | CellComputable <CoercableComponent > | A computable to get the title component for a cell. |
getVisibility? | CellComputable <boolean | Visibility > | A computable to determine the visibility of a cell. |
onClick? | (id : string | number , state : State , e? : MouseEvent | TouchEvent ) => void | A function that is called when a cell is clicked. |
onHold? | (id : string | number , state : State ) => void | A function that is called when a cell is held down. |
rows | Computable <number > | The number of rows in the grid. |
visibility? | Computable <boolean | Visibility > | Whether this grid should be visible. |
profectus/src/features/grids/grid.ts:224
Ƭ CellComputable<T
>: Computable
<T
> | (id
: string
| number
, state
: State
) => T
A type representing a computable value for a cell in the grid.
Name |
---|
T |
profectus/src/features/grids/grid.ts:28
Ƭ GenericGrid: Replace
<Grid
<GridOptions
>, { getCanClick
: ProcessedComputable
<boolean
> ; getVisibility
: ProcessedComputable
<Visibility
| boolean
> ; visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid Grid object.
profectus/src/features/grids/grid.ts:293
Ƭ Grid<T
>: Replace
<T
& BaseGrid
, { cols
: GetComputableType
<T
["cols"
]> ; getCanClick
: GetComputableTypeWithDefault
<T
["getCanClick"
], true
> ; getClasses
: GetComputableType
<T
["getClasses"
]> ; getDisplay
: GetComputableType
<T
["getDisplay"
]> ; getStartState
: GetComputableType
<T
["getStartState"
]> ; getStyle
: GetComputableType
<T
["getStyle"
]> ; getTitle
: GetComputableType
<T
["getTitle"
]> ; getVisibility
: GetComputableTypeWithDefault
<T
["getVisibility"
], Visible
> ; rows
: GetComputableType
<T
["rows"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
An object that represents a feature that is a grid of cells that all behave according to the same rules.
Name | Type |
---|---|
T | extends GridOptions |
profectus/src/features/grids/grid.ts:276
• Const
GridType: typeof GridType
A symbol used to identify Grid features.
profectus/src/features/grids/grid.ts:25
â–¸ createGrid<T
>(optionsFunc
): Grid
<T
>
Lazily creates a grid with the given options.
Name | Type |
---|---|
T | extends GridOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseGrid , GenericGrid > | Grid options. |
Grid
<T
>
profectus/src/features/grids/grid.ts:306
Name | Type |
---|---|
visibility * | processedPropType<Visibility | boolean>(Number, Boolean) |
onClick | (e?: MouseEvent | TouchEvent) => void |
onHold | VoidFunction |
display * | processedPropType<CoercableComponent>(Object, String, Function) |
title | processedPropType<CoercableComponent>(Object, String, Function) |
style | processedPropType<StyleValue>(String, Object, Array) |
canClick * | processedPropType<boolean>(Boolean) |
id * | string |
Name | Type |
---|---|
visibility * | processedPropType<Visibility | boolean>(Number, Boolean) |
rows * | processedPropType<number>(Number) |
cols * | processedPropType<number>(Number) |
cells * | processedPropType<Record<string, GridCell>>(Object) |
• BaseHotkey: Object
The properties that are added onto a processed HotkeyOptions to create an Hotkey.
Name | Type | Description |
---|---|---|
type | typeof HotkeyType | A symbol that helps identify features of the same type. |
profectus/src/features/hotkey.tsx:40
• HotkeyOptions: Object
An object that configures a Hotkey.
Name | Type | Description |
---|---|---|
description | Computable <string > | The description of this hotkey, to display in the settings. |
enabled? | Computable <boolean > | Whether or not this hotkey is currently enabled. |
key | string | The key tied to this hotkey |
onPress | VoidFunction | What to do upon pressing the key. |
profectus/src/features/hotkey.tsx:26
Ƭ GenericHotkey: Replace
<Hotkey
<HotkeyOptions
>, { enabled
: ProcessedComputable
<boolean
> }>
A type that matches any valid Hotkey object.
profectus/src/features/hotkey.tsx:55
Ƭ Hotkey<T
>: Replace
<T
& BaseHotkey
, { description
: GetComputableType
<T
["description"
]> ; enabled
: GetComputableTypeWithDefault
<T
["enabled"
], true
> }>
An object that represents a hotkey shortcut that performs an action upon a key sequence being pressed.
Name | Type |
---|---|
T | extends HotkeyOptions |
profectus/src/features/hotkey.tsx:46
• Const
HotkeyType: typeof HotkeyType
A symbol used to identify Hotkey features.
profectus/src/features/hotkey.tsx:21
• Const
hotkeys: Record
<string
, GenericHotkey
| undefined
>
A dictionary of all hotkeys.
profectus/src/features/hotkey.tsx:19
â–¸ createHotkey<T
>(optionsFunc
): Hotkey
<T
>
Lazily creates a hotkey with the given options.
Name | Type |
---|---|
T | extends HotkeyOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseHotkey , GenericHotkey > | Hotkey options. |
Hotkey
<T
>
• BaseInfobox: Object
The properties that are added onto a processed InfoboxOptions to create an Infobox.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
collapsed | Persistent <boolean > | Whether or not this infobox is collapsed. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
type | typeof InfoboxType | A symbol that helps identify features of the same type. |
profectus/src/features/infoboxes/infobox.ts:50
• InfoboxOptions: Object
An object that configures an Infobox.
Name | Type | Description |
---|---|---|
bodyStyle? | Computable <StyleValue > | CSS to apply to the body of the infobox. |
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
color? | Computable <string > | The background color of the Infobox. |
display | Computable <CoercableComponent > | The main text that appears in the display. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
title | Computable <CoercableComponent > | A header to appear at the top of the display. |
titleStyle? | Computable <StyleValue > | CSS to apply to the title of the infobox. |
visibility? | Computable <boolean | Visibility > | Whether this clickable should be visible. |
profectus/src/features/infoboxes/infobox.ts:28
Ƭ GenericInfobox: Replace
<Infobox
<InfoboxOptions
>, { visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid Infobox object.
profectus/src/features/infoboxes/infobox.ts:79
Ƭ Infobox<T
>: Replace
<T
& BaseInfobox
, { bodyStyle
: GetComputableType
<T
["bodyStyle"
]> ; classes
: GetComputableType
<T
["classes"
]> ; color
: GetComputableType
<T
["color"
]> ; display
: GetComputableType
<T
["display"
]> ; style
: GetComputableType
<T
["style"
]> ; title
: GetComputableType
<T
["title"
]> ; titleStyle
: GetComputableType
<T
["titleStyle"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
An object that represents a feature that displays information in a collapsible way.
Name | Type |
---|---|
T | extends InfoboxOptions |
profectus/src/features/infoboxes/infobox.ts:64
• Const
InfoboxType: typeof InfoboxType
A symbol used to identify Infobox features.
profectus/src/features/infoboxes/infobox.ts:23
â–¸ createInfobox<T
>(optionsFunc
): Infobox
<T
>
Lazily creates an infobox with the given options.
Name | Type |
---|---|
T | extends InfoboxOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseInfobox , GenericInfobox > | Infobox options. |
Infobox
<T
>
profectus/src/features/infoboxes/infobox.ts:90
Name | Type |
---|---|
visibility * | processedPropType<Visibility | boolean>(Number, Boolean) |
display * | processedPropType<CoercableComponent>(Object, String, Function) |
title * | processedPropType<CoercableComponent>(Object, String, Function) |
color | processedPropType<string>(String) |
collapsed * | Ref<boolean> |
style | processedPropType<StyleValue>(Object, String, Array) |
titleStyle | processedPropType<StyleValue>(Object, String, Array) |
bodyStyle | processedPropType<StyleValue>(Object, String, Array) |
classes | processedPropType<Record<string, boolean>>(Object) |
id * | string |
• BaseLinks: Object
The properties that are added onto a processed LinksOptions to create an Links.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
type | typeof LinksType | A symbol that helps identify features of the same type. |
profectus/src/features/links/links.ts:30
• Link: Object
Represents a link between two nodes. It will be displayed as an SVG line, and can take any appropriate properties for an SVG line element.
Name | Type | Description |
---|---|---|
accent-height? | Numberish | - |
accumulate? | "none" | "sum" | - |
additive? | "sum" | "replace" | - |
alignment-baseline? | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "inherit" | - |
allowReorder? | "no" | "yes" | - |
alphabetic? | Numberish | - |
amplitude? | Numberish | - |
arabic-form? | "initial" | "medial" | "terminal" | "isolated" | - |
aria-activedescendant? | string | Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. |
aria-atomic? | Booleanish | Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. |
aria-autocomplete? | "none" | "inline" | "list" | "both" | Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. |
aria-busy? | Booleanish | Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. |
aria-checked? | Booleanish | "mixed" | Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. See - aria-pressed - aria-selected. |
aria-colcount? | Numberish | Defines the total number of columns in a table, grid, or treegrid. See aria-colindex. |
aria-colindex? | Numberish | Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. See - aria-colcount - aria-colspan. |
aria-colspan? | Numberish | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. See - aria-colindex - aria-rowspan. |
aria-controls? | string | Identifies the element (or elements) whose contents or presence are controlled by the current element. See aria-owns. |
aria-current? | "time" | Booleanish | "page" | "step" | "location" | "date" | Indicates the element that represents the current item within a container or set of related elements. |
aria-describedby? | string | Identifies the element (or elements) that describes the object. See aria-labelledby |
aria-details? | string | Identifies the element that provides a detailed, extended description for the object. See aria-describedby. |
aria-disabled? | Booleanish | Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. See - aria-hidden - aria-readonly. |
aria-dropeffect? | "none" | "copy" | "execute" | "link" | "move" | "popup" | Indicates what functions can be performed when a dragged object is released on the drop target. Deprecated in ARIA 1.1 |
aria-errormessage? | string | Identifies the element that provides an error message for the object. See - aria-invalid - aria-describedby. |
aria-expanded? | Booleanish | Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. |
aria-flowto? | string | Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. |
aria-grabbed? | Booleanish | Indicates an element's "grabbed" state in a drag-and-drop operation. Deprecated in ARIA 1.1 |
aria-haspopup? | "tree" | Booleanish | "menu" | "listbox" | "grid" | "dialog" | Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. |
aria-hidden? | Booleanish | Indicates whether the element is exposed to an accessibility API. See aria-disabled. |
aria-invalid? | Booleanish | "grammar" | "spelling" | Indicates the entered value does not conform to the format expected by the application. See aria-errormessage. |
aria-keyshortcuts? | string | Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. |
aria-label? | string | Defines a string value that labels the current element. See aria-labelledby. |
aria-labelledby? | string | Identifies the element (or elements) that labels the current element. See aria-describedby. |
aria-level? | Numberish | Defines the hierarchical level of an element within a structure. |
aria-live? | "off" | "assertive" | "polite" | Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. |
aria-modal? | Booleanish | Indicates whether an element is modal when displayed. |
aria-multiline? | Booleanish | Indicates whether a text box accepts multiple lines of input or only a single line. |
aria-multiselectable? | Booleanish | Indicates that the user may select more than one item from the current selectable descendants. |
aria-orientation? | "horizontal" | "vertical" | Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. |
aria-owns? | string | Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See aria-controls. |
aria-placeholder? | string | Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. |
aria-posinset? | Numberish | Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See aria-setsize. |
aria-pressed? | Booleanish | "mixed" | Indicates the current "pressed" state of toggle buttons. See - aria-checked - aria-selected. |
aria-readonly? | Booleanish | Indicates that the element is not editable, but is otherwise operable. See aria-disabled. |
aria-relevant? | "additions" | "additions text" | "all" | "removals" | "text" | Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See aria-atomic. |
aria-required? | Booleanish | Indicates that user input is required on the element before a form may be submitted. |
aria-roledescription? | string | Defines a human-readable, author-localized description for the role of an element. |
aria-rowcount? | Numberish | Defines the total number of rows in a table, grid, or treegrid. See aria-rowindex. |
aria-rowindex? | Numberish | Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. See - aria-rowcount - aria-rowspan. |
aria-rowspan? | Numberish | Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. See - aria-rowindex - aria-colspan. |
aria-selected? | Booleanish | Indicates the current "selected" state of various widgets. See - aria-checked - aria-pressed. |
aria-setsize? | Numberish | Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See aria-posinset. |
aria-sort? | "none" | "ascending" | "descending" | "other" | Indicates if items in a table or grid are sorted in ascending or descending order. |
aria-valuemax? | Numberish | Defines the maximum allowed value for a range widget. |
aria-valuemin? | Numberish | Defines the minimum allowed value for a range widget. |
aria-valuenow? | Numberish | Defines the current value for a range widget. See aria-valuetext. |
aria-valuetext? | string | Defines the human readable text alternative of aria-valuenow for a range widget. |
ascent? | Numberish | - |
attributeName? | string | - |
attributeType? | string | - |
autoReverse? | Numberish | - |
azimuth? | Numberish | - |
baseFrequency? | Numberish | - |
baseProfile? | Numberish | - |
baseline-shift? | Numberish | - |
bbox? | Numberish | - |
begin? | Numberish | - |
bias? | Numberish | - |
by? | Numberish | - |
calcMode? | Numberish | - |
cap-height? | Numberish | - |
class? | any | SVG Styling Attributes See https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling |
clip? | Numberish | - |
clip-path? | string | - |
clip-rule? | Numberish | - |
clipPathUnits? | Numberish | - |
color? | string | - |
color-interpolation? | Numberish | - |
color-interpolation-filters? | "auto" | "inherit" | "sRGB" | "linearRGB" | - |
color-profile? | Numberish | - |
color-rendering? | Numberish | - |
contentScriptType? | Numberish | - |
contentStyleType? | Numberish | - |
cursor? | Numberish | - |
cx? | Numberish | - |
cy? | Numberish | - |
d? | string | - |
decelerate? | Numberish | - |
descent? | Numberish | - |
diffuseConstant? | Numberish | - |
direction? | Numberish | - |
display? | Numberish | - |
divisor? | Numberish | - |
dominant-baseline? | Numberish | - |
dur? | Numberish | - |
dx? | Numberish | - |
dy? | Numberish | - |
edgeMode? | Numberish | - |
elevation? | Numberish | - |
enable-background? | Numberish | - |
end? | Numberish | - |
endNode | { id : string } | - |
endNode.id | string | - |
exponent? | Numberish | - |
externalResourcesRequired? | Numberish | - |
fill? | string | - |
fill-opacity? | Numberish | - |
fill-rule? | "inherit" | "nonzero" | "evenodd" | - |
filter? | string | - |
filterRes? | Numberish | - |
filterUnits? | Numberish | - |
flood-color? | Numberish | - |
flood-opacity? | Numberish | - |
focusable? | Numberish | - |
font-family? | string | - |
font-size? | Numberish | - |
font-size-adjust? | Numberish | - |
font-stretch? | Numberish | - |
font-style? | Numberish | - |
font-variant? | Numberish | - |
font-weight? | Numberish | - |
format? | Numberish | - |
from? | Numberish | - |
fx? | Numberish | - |
fy? | Numberish | - |
g1? | Numberish | - |
g2? | Numberish | - |
glyph-name? | Numberish | - |
glyph-orientation-horizontal? | Numberish | - |
glyph-orientation-vertical? | Numberish | - |
glyphRef? | Numberish | - |
gradientTransform? | string | - |
gradientUnits? | string | - |
hanging? | Numberish | - |
height? | Numberish | - |
horiz-adv-x? | Numberish | - |
horiz-origin-x? | Numberish | - |
href? | string | - |
id? | string | - |
ideographic? | Numberish | - |
image-rendering? | Numberish | - |
in? | string | - |
in2? | Numberish | - |
innerHTML? | string | - |
intercept? | Numberish | - |
k? | Numberish | - |
k1? | Numberish | - |
k2? | Numberish | - |
k3? | Numberish | - |
k4? | Numberish | - |
kernelMatrix? | Numberish | - |
kernelUnitLength? | Numberish | - |
kerning? | Numberish | - |
keyPoints? | Numberish | - |
keySplines? | Numberish | - |
keyTimes? | Numberish | - |
lang? | string | - |
lengthAdjust? | Numberish | - |
letter-spacing? | Numberish | - |
lighting-color? | Numberish | - |
limitingConeAngle? | Numberish | - |
local? | Numberish | - |
marker-end? | string | - |
marker-mid? | string | - |
marker-start? | string | - |
markerHeight? | Numberish | - |
markerUnits? | Numberish | - |
markerWidth? | Numberish | - |
mask? | string | - |
maskContentUnits? | Numberish | - |
maskUnits? | Numberish | - |
mathematical? | Numberish | - |
max? | Numberish | - |
media? | string | - |
method? | string | - |
min? | Numberish | - |
mode? | Numberish | - |
name? | string | - |
numOctaves? | Numberish | - |
offset? | Numberish | - |
offsetEnd? | Position | - |
offsetStart? | Position | - |
onAbort? | (payload : Event ) => void | - |
onAnimationend? | (payload : AnimationEvent ) => void | - |
onAnimationiteration? | (payload : AnimationEvent ) => void | - |
onAnimationstart? | (payload : AnimationEvent ) => void | - |
onAuxclick? | (payload : MouseEvent ) => void | - |
onBeforeinput? | (payload : Event ) => void | - |
onBlur? | (payload : FocusEvent ) => void | - |
onCanplay? | (payload : Event ) => void | - |
onCanplaythrough? | (payload : Event ) => void | - |
onChange? | (payload : Event ) => void | - |
onClick? | (payload : MouseEvent ) => void | - |
onCompositionend? | (payload : CompositionEvent ) => void | - |
onCompositionstart? | (payload : CompositionEvent ) => void | - |
onCompositionupdate? | (payload : CompositionEvent ) => void | - |
onContextmenu? | (payload : MouseEvent ) => void | - |
onCopy? | (payload : ClipboardEvent ) => void | - |
onCut? | (payload : ClipboardEvent ) => void | - |
onDblclick? | (payload : MouseEvent ) => void | - |
onDrag? | (payload : DragEvent ) => void | - |
onDragend? | (payload : DragEvent ) => void | - |
onDragenter? | (payload : DragEvent ) => void | - |
onDragexit? | (payload : DragEvent ) => void | - |
onDragleave? | (payload : DragEvent ) => void | - |
onDragover? | (payload : DragEvent ) => void | - |
onDragstart? | (payload : DragEvent ) => void | - |
onDrop? | (payload : DragEvent ) => void | - |
onDurationchange? | (payload : Event ) => void | - |
onEmptied? | (payload : Event ) => void | - |
onEncrypted? | (payload : Event ) => void | - |
onEnded? | (payload : Event ) => void | - |
onError? | (payload : Event ) => void | - |
onFocus? | (payload : FocusEvent ) => void | - |
onFocusin? | (payload : FocusEvent ) => void | - |
onFocusout? | (payload : FocusEvent ) => void | - |
onInput? | (payload : Event ) => void | - |
onInvalid? | (payload : Event ) => void | - |
onKeydown? | (payload : KeyboardEvent ) => void | - |
onKeypress? | (payload : KeyboardEvent ) => void | - |
onKeyup? | (payload : KeyboardEvent ) => void | - |
onLoad? | (payload : Event ) => void | - |
onLoadeddata? | (payload : Event ) => void | - |
onLoadedmetadata? | (payload : Event ) => void | - |
onLoadstart? | (payload : Event ) => void | - |
onMousedown? | (payload : MouseEvent ) => void | - |
onMouseenter? | (payload : MouseEvent ) => void | - |
onMouseleave? | (payload : MouseEvent ) => void | - |
onMousemove? | (payload : MouseEvent ) => void | - |
onMouseout? | (payload : MouseEvent ) => void | - |
onMouseover? | (payload : MouseEvent ) => void | - |
onMouseup? | (payload : MouseEvent ) => void | - |
onPaste? | (payload : ClipboardEvent ) => void | - |
onPause? | (payload : Event ) => void | - |
onPlay? | (payload : Event ) => void | - |
onPlaying? | (payload : Event ) => void | - |
onPointercancel? | (payload : PointerEvent ) => void | - |
onPointerdown? | (payload : PointerEvent ) => void | - |
onPointerenter? | (payload : PointerEvent ) => void | - |
onPointerleave? | (payload : PointerEvent ) => void | - |
onPointermove? | (payload : PointerEvent ) => void | - |
onPointerout? | (payload : PointerEvent ) => void | - |
onPointerover? | (payload : PointerEvent ) => void | - |
onPointerup? | (payload : PointerEvent ) => void | - |
onProgress? | (payload : Event ) => void | - |
onRatechange? | (payload : Event ) => void | - |
onReset? | (payload : Event ) => void | - |
onScroll? | (payload : UIEvent ) => void | - |
onSeeked? | (payload : Event ) => void | - |
onSeeking? | (payload : Event ) => void | - |
onSelect? | (payload : Event ) => void | - |
onStalled? | (payload : Event ) => void | - |
onSubmit? | (payload : Event ) => void | - |
onSuspend? | (payload : Event ) => void | - |
onTimeupdate? | (payload : Event ) => void | - |
onTouchcancel? | (payload : TouchEvent ) => void | - |
onTouchend? | (payload : TouchEvent ) => void | - |
onTouchmove? | (payload : TouchEvent ) => void | - |
onTouchstart? | (payload : TouchEvent ) => void | - |
onTransitionend? | (payload : TransitionEvent ) => void | - |
onTransitionstart? | (payload : TransitionEvent ) => void | - |
onVolumechange? | (payload : Event ) => void | - |
onWaiting? | (payload : Event ) => void | - |
onWheel? | (payload : WheelEvent ) => void | - |
opacity? | Numberish | - |
operator? | Numberish | - |
order? | Numberish | - |
orient? | Numberish | - |
orientation? | Numberish | - |
origin? | Numberish | - |
overflow? | Numberish | - |
overline-position? | Numberish | - |
overline-thickness? | Numberish | - |
paint-order? | Numberish | - |
panose-1? | Numberish | - |
pathLength? | Numberish | - |
patternContentUnits? | string | - |
patternTransform? | Numberish | - |
patternUnits? | string | - |
pointer-events? | Numberish | - |
points? | string | - |
pointsAtX? | Numberish | - |
pointsAtY? | Numberish | - |
pointsAtZ? | Numberish | - |
preserveAlpha? | Numberish | - |
preserveAspectRatio? | string | - |
primitiveUnits? | Numberish | - |
r? | Numberish | - |
radius? | Numberish | - |
refX? | Numberish | - |
refY? | Numberish | - |
renderingIntent? | Numberish | - |
repeatCount? | Numberish | - |
repeatDur? | Numberish | - |
requiredExtensions? | Numberish | - |
requiredFeatures? | Numberish | - |
restart? | Numberish | - |
result? | string | - |
role? | string | - |
rotate? | Numberish | - |
rx? | Numberish | - |
ry? | Numberish | - |
scale? | Numberish | - |
seed? | Numberish | - |
shape-rendering? | Numberish | - |
slope? | Numberish | - |
spacing? | Numberish | - |
specularConstant? | Numberish | - |
specularExponent? | Numberish | - |
speed? | Numberish | - |
spreadMethod? | string | - |
startNode | { id : string } | - |
startNode.id | string | - |
startOffset? | Numberish | - |
stdDeviation? | Numberish | - |
stemh? | Numberish | - |
stemv? | Numberish | - |
stitchTiles? | Numberish | - |
stop-color? | string | - |
stop-opacity? | Numberish | - |
strikethrough-position? | Numberish | - |
strikethrough-thickness? | Numberish | - |
string? | Numberish | - |
stroke? | string | - |
stroke-dasharray? | Numberish | - |
stroke-dashoffset? | Numberish | - |
stroke-linecap? | "inherit" | "butt" | "round" | "square" | - |
stroke-linejoin? | "inherit" | "round" | "miter" | "bevel" | - |
stroke-miterlimit? | Numberish | - |
stroke-opacity? | Numberish | - |
stroke-width? | Numberish | - |
style? | string | CSSProperties | - |
surfaceScale? | Numberish | - |
systemLanguage? | Numberish | - |
tabindex? | Numberish | - |
tableValues? | Numberish | - |
target? | string | - |
targetX? | Numberish | - |
targetY? | Numberish | - |
text-anchor? | string | - |
text-decoration? | Numberish | - |
text-rendering? | Numberish | - |
textLength? | Numberish | - |
to? | Numberish | - |
transform? | string | - |
type? | string | - |
u1? | Numberish | - |
u2? | Numberish | - |
underline-position? | Numberish | - |
underline-thickness? | Numberish | - |
unicode? | Numberish | - |
unicode-bidi? | Numberish | - |
unicode-range? | Numberish | - |
unitsPer-em? | Numberish | - |
v-alphabetic? | Numberish | - |
v-hanging? | Numberish | - |
v-ideographic? | Numberish | - |
v-mathematical? | Numberish | - |
values? | string | - |
vector-effect? | Numberish | - |
version? | string | - |
vert-adv-y? | Numberish | - |
vert-origin-x? | Numberish | - |
vert-origin-y? | Numberish | - |
viewBox? | string | - |
viewTarget? | Numberish | - |
visibility? | Numberish | - |
width? | Numberish | - |
widths? | Numberish | - |
word-spacing? | Numberish | - |
writing-mode? | Numberish | - |
x? | Numberish | - |
x-height? | Numberish | - |
x1? | Numberish | - |
x2? | Numberish | - |
xChannelSelector? | string | - |
xlinkActuate? | string | - |
xlinkArcrole? | string | - |
xlinkHref? | string | - |
xlinkRole? | string | - |
xlinkShow? | string | - |
xlinkTitle? | string | - |
xlinkType? | string | - |
xmlns? | string | - |
y? | Numberish | - |
y1? | Numberish | - |
y2? | Numberish | - |
yChannelSelector? | string | - |
z? | Numberish | - |
zoomAndPan? | string | - |
profectus/src/features/links/links.ts:14
• LinksOptions: Object
An object that configures a Links.
Name | Type | Description |
---|---|---|
links | Computable <Link []> | The list of links to display. |
profectus/src/features/links/links.ts:22
Ƭ GenericLinks: Replace
<Links
<LinksOptions
>, { links
: ProcessedComputable
<Link
[]> }>
A type that matches any valid Links object.
profectus/src/features/links/links.ts:48
Ƭ Links<T
>: Replace
<T
& BaseLinks
, { links
: GetComputableType
<T
["links"
]> }>
An object that represents a list of links between nodes, which are the elements in the DOM for any renderable feature.
Name | Type |
---|---|
T | extends LinksOptions |
profectus/src/features/links/links.ts:40
• Const
LinksType: typeof LinksType
A symbol used to identify Links features.
profectus/src/features/links/links.ts:11
â–¸ createLinks<T
>(optionsFunc
): Links
<T
>
Lazily creates links with the given options.
Name | Type |
---|---|
T | extends LinksOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseLinks , GenericLinks > | Links options. |
Links
<T
>
profectus/src/features/links/links.ts:59
Name | Type |
---|---|
link * | Link |
startNode * | FeatureNode |
endNode * | FeatureNode |
boundingRect * | DOMRect | undefined |
Name | Type |
---|---|
links | Link[] |
• BaseParticles: Object
The properties that are added onto a processed ParticlesOptions to create an Particles.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
addEmitter | (config : EmitterConfigV3 ) => Promise <Emitter > | A function to asynchronously add an emitter to the canvas. The returned emitter can then be positioned as appropriate and started. See Particles |
app | Ref <null | Application > | The Pixi.JS Application powering this particles canvas. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
type | typeof ParticlesType | A symbol that helps identify features of the same type. |
profectus/src/features/particles/particles.tsx:31
• ParticlesOptions: Object
An object that configures Particles.
Name | Type | Description |
---|---|---|
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
onContainerResized? | (boundingRect : DOMRect ) => void | A function that is called when the particles canvas is resized. |
onHotReload? | VoidFunction | A function that is called whenever the particles element is reloaded during development. For restarting particle effects. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
profectus/src/features/particles/particles.tsx:17
Ƭ GenericParticles: Particles
<ParticlesOptions
>
A type that matches any valid Particles object.
profectus/src/features/particles/particles.tsx:63
Ƭ Particles<T
>: Replace
<T
& BaseParticles
, { classes
: GetComputableType
<T
["classes"
]> ; style
: GetComputableType
<T
["style"
]> }>
An object that represents a feature that display particle effects on the screen. The config should typically be gotten by designing the effect using the online particle effect editor and passing it into the upgradeConfig from @pixi/particle-emitter.
Name | Type |
---|---|
T | extends ParticlesOptions |
profectus/src/features/particles/particles.tsx:54
• Const
ParticlesType: typeof ParticlesType
A symbol used to identify Particles features.
profectus/src/features/particles/particles.tsx:12
â–¸ createParticles<T
>(optionsFunc?
): Particles
<T
>
Lazily creates particles with the given options.
Name | Type |
---|---|
T | extends ParticlesOptions |
Name | Type | Description |
---|---|---|
optionsFunc? | OptionsFunc <T , BaseParticles , GenericParticles > | Particles options. |
Particles
<T
>
profectus/src/features/particles/particles.tsx:69
Name | Type |
---|---|
style | processedPropType<StyleValue>(String, Object, Array) |
classes | processedPropType<Record<string, boolean>>(Object) |
onInit * | (app: Application) => void |
id * | string |
onContainerResized | (rect: DOMRect) => void |
onHotReload | VoidFunction |
• BaseRepeatable: Object
The properties that are added onto a processed RepeatableOptions to create a Repeatable.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
amount | Persistent <DecimalSource > | The current amount this repeatable has. |
amountToIncrease | Ref <DecimalSource > | How much amount can be increased by, or 1 if unclickable. Capped at 1 if maximize is false. |
canClick | ProcessedComputable <boolean > | Whether or not this repeatable can be clicked. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
maxed | Ref <boolean > | Whether or not this repeatable's amount is at it's limit. |
onClick | (event? : MouseEvent | TouchEvent ) => void | A function that gets called when this repeatable is clicked. |
type | typeof RepeatableType | A symbol that helps identify features of the same type. |
profectus/src/features/repeatable.tsx:79
• RepeatableOptions: Object
An object that configures a Repeatable.
Name | Type | Description |
---|---|---|
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
display? | Computable <RepeatableDisplay > | The display to use for this repeatable. |
initialAmount? | DecimalSource | The initial amount this repeatable has on a new save / after reset. |
limit? | Computable <DecimalSource > | The maximum amount obtainable for this repeatable. |
mark? | Computable <string | boolean > | Shows a marker on the corner of the feature. |
maximize? | Computable <boolean > | Whether or not clicking this repeatable should attempt to maximize amount based on the requirements met. Requires requirements to be a requirement or array of requirements with Requirement.canMaximize true. |
requirements | Requirements | The requirement(s) to increase this repeatable. |
small? | Computable <boolean > | Toggles a smaller design for the feature. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
visibility? | Computable <boolean | Visibility > | Whether this repeatable should be visible. |
profectus/src/features/repeatable.tsx:53
Ƭ GenericRepeatable: Replace
<Repeatable
<RepeatableOptions
>, { limit
: ProcessedComputable
<DecimalSource
> ; visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid Repeatable object.
profectus/src/features/repeatable.tsx:120
Ƭ Repeatable<T
>: Replace
<T
& BaseRepeatable
, { classes
: GetComputableType
<T
["classes"
]> ; display
: Ref
<CoercableComponent
> ; limit
: GetComputableTypeWithDefault
<T
["limit"
], default
> ; mark
: GetComputableType
<T
["mark"
]> ; maximize
: GetComputableType
<T
["maximize"
]> ; requirements
: GetComputableType
<T
["requirements"
]> ; small
: GetComputableType
<T
["small"
]> ; style
: GetComputableType
<T
["style"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
An object that represents a feature with multiple "levels" with scaling requirements.
Name | Type |
---|---|
T | extends RepeatableOptions |
profectus/src/features/repeatable.tsx:104
Ƭ RepeatableDisplay: CoercableComponent
| { description?
: CoercableComponent
; effectDisplay?
: CoercableComponent
; showAmount?
: boolean
; title?
: CoercableComponent
}
A type that can be used to customize the Repeatable display.
profectus/src/features/repeatable.tsx:39
• Const
RepeatableType: typeof RepeatableType
A symbol used to identify Repeatable features.
profectus/src/features/repeatable.tsx:36
â–¸ createRepeatable<T
>(optionsFunc
, ...decorators
): Repeatable
<T
>
Lazily creates a repeatable with the given options.
Name | Type |
---|---|
T | extends RepeatableOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseRepeatable , GenericRepeatable > | Repeatable options. |
...decorators | GenericDecorator [] | - |
Repeatable
<T
>
• BaseReset: Object
The properties that are added onto a processed ResetOptions to create an Reset.
Name | Type | Description |
---|---|---|
id | string | An auto-generated ID for identifying which reset is being performed. Will not persist between refreshes or updates. |
reset | VoidFunction | Trigger the reset. |
type | typeof ResetType | A symbol that helps identify features of the same type. |
profectus/src/features/reset.ts:30
• ResetOptions: Object
An object that configures a Clickable.
Name | Type | Description |
---|---|---|
onReset? | VoidFunction | A function that is called when the reset is performed. |
thingsToReset | Computable <Record <string , unknown >[]> | List of things to reset. Can include objects which will be recursed over for persistent values. |
profectus/src/features/reset.ts:20
Ƭ GenericReset: Reset
<ResetOptions
>
A type that matches any valid Reset object.
profectus/src/features/reset.ts:48
Ƭ Reset<T
>: Replace
<T
& BaseReset
, { thingsToReset
: GetComputableType
<T
["thingsToReset"
]> }>
An object that represents a reset mechanic, which resets progress back to its initial state.
Name | Type |
---|---|
T | extends ResetOptions |
profectus/src/features/reset.ts:40
• Const
ResetType: typeof ResetType
A symbol used to identify Reset features.
profectus/src/features/reset.ts:15
â–¸ createReset<T
>(optionsFunc
): Reset
<T
>
Lazily creates a reset with the given options.
Name | Type |
---|---|
T | extends ResetOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseReset , GenericReset > | Reset options. |
Reset
<T
>
profectus/src/features/reset.ts:54
â–¸ trackResetTime(layer
, reset
): Persistent
<default
>
Track the time since the specified reset last occured.
Name | Type | Description |
---|---|---|
layer | BaseLayer | The layer the reset is attached to |
reset | GenericReset | The reset mechanic to track the time since |
• Resource<T
>: Object
An object that represents a named and quantifiable resource in the game.
Name | Type |
---|---|
T | DecimalSource |
Name | Type | Description |
---|---|---|
[RefSymbol] | true | Type differentiator only. We need this to be in public d.ts but don't want it to show up in IDE autocomplete, so we use a private Symbol instead. |
displayName | string | The name of this resource. |
precision | number | When displaying the value of this resource, how many significant digits to display. |
small? | boolean | Whether or not to display very small values using scientific notation, or rounding to 0. |
value | T | - |
profectus/src/features/resources/resource.ts:12
â–¸ createResource<T
>(defaultValue
, displayName?
, precision?
, small?
): Resource
<T
> & Persistent
<T
> & { [NonPersistent]
: Resource
<T
> }
Creates a resource.
Name | Type |
---|---|
T | extends State |
Name | Type | Description |
---|---|---|
defaultValue | T | The initial value of the resource |
displayName? | string | The human readable name of this resource |
precision? | number | The number of significant digits to display by default |
small? | boolean | Whether or not to display very small values or round to 0, by default |
Resource
<T
> & Persistent
<T
> & { [NonPersistent]
: Resource
<T
> }
â–¸ createResource<T
>(defaultValue
, displayName?
, precision?
, small?
): Resource
<T
>
Name | Type |
---|---|
defaultValue | Ref <T > |
displayName? | string |
precision? | number |
small? | boolean |
profectus/src/features/resources/resource.ts:28
profectus/src/features/resources/resource.ts:34
profectus/src/features/resources/resource.ts:40
â–¸ displayResource(resource
, overrideAmount?
): string
Utility for displaying a resource with the correct precision.
Name | Type |
---|---|
resource | Resource <DecimalSource > |
overrideAmount? | DecimalSource |
string
profectus/src/features/resources/resource.ts:153
â–¸ trackBest(resource
): Ref
<DecimalSource
>
Returns a reference to the highest amount of the resource ever owned, which is updated automatically.
Name | Type |
---|---|
resource | Resource <DecimalSource > |
Ref
<DecimalSource
>
profectus/src/features/resources/resource.ts:64
â–¸ trackOOMPS(resource
, pointGain?
): Ref
<string
>
Returns a reference to the amount of resource being gained in terms of orders of magnitude per second, calcualted over the last tick. Useful for situations where the gain rate is increasing very rapidly.
Name | Type |
---|---|
resource | Resource <DecimalSource > |
pointGain? | ComputedRef <DecimalSource > |
Ref
<string
>
profectus/src/features/resources/resource.ts:94
â–¸ trackTotal(resource
): Ref
<DecimalSource
>
Returns a reference to the total amount of the resource gained, updated automatically. "Refunds" count as gain.
Name | Type |
---|---|
resource | Resource <DecimalSource > |
Ref
<DecimalSource
>
profectus/src/features/resources/resource.ts:78
â–¸ unwrapResource(resource
): Resource
Utility for unwrapping a resource that may or may not be inside a ref.
Name | Type |
---|---|
resource | ProcessedComputable <Resource <DecimalSource >> |
profectus/src/features/resources/resource.ts:162
Name | Type |
---|---|
resource * | Resource |
color | string |
classes | Record |
style | StyleValue |
effectDisplay | CoercableComponent |
Name | Type |
---|---|
resource * | Resource |
color * | string |
• BaseTab: Object
The properties that are added onto a processed TabOptions to create an Tab.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
type | typeof TabType | A symbol that helps identify features of the same type. |
profectus/src/features/tabs/tab.ts:31
• TabOptions: Object
An object that configures a Tab.
Name | Type | Description |
---|---|---|
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
display | Computable <CoercableComponent > | The display to use for this tab. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
profectus/src/features/tabs/tab.ts:19
Ƭ GenericTab: Tab
<TabOptions
>
A type that matches any valid Tab object.
profectus/src/features/tabs/tab.ts:56
Ƭ Tab<T
>: Replace
<T
& BaseTab
, { classes
: GetComputableType
<T
["classes"
]> ; display
: GetComputableType
<T
["display"
]> ; style
: GetComputableType
<T
["style"
]> }>
An object representing a tab of content in a tabbed interface.
See
TabFamily
Name | Type |
---|---|
T | extends TabOptions |
profectus/src/features/tabs/tab.ts:46
• Const
TabType: typeof TabType
A symbol used to identify Tab features.
profectus/src/features/tabs/tab.ts:14
â–¸ createTab<T
>(optionsFunc
): Tab
<T
>
Lazily creates a tab with the given options.
Name | Type |
---|---|
T | extends TabOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseTab , GenericTab > | Tab options. |
Tab
<T
>
• BaseTabButton: Object
The properties that are added onto a processed TabButtonOptions to create an TabButton.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
type | typeof TabButtonType | A symbol that helps identify features of the same type. |
profectus/src/features/tabs/tabFamily.ts:58
• BaseTabFamily: Object
The properties that are added onto a processed TabFamilyOptions to create an TabFamily.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
activeTab | Ref <null | CoercableComponent | GenericTab > | The currently active tab, if any. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
selected | Persistent <string > | The name of the tab that is currently active. |
tabs | Record <string , TabButtonOptions > | All the tabs within this family. |
type | typeof TabFamilyType | A symbol that helps identify features of the same type. |
profectus/src/features/tabs/tabFamily.ts:108
• TabButtonOptions: Object
An object that configures a TabButton.
Name | Type | Description |
---|---|---|
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
display | Computable <CoercableComponent > | The label on this button. |
glowColor? | Computable <string > | The color of the glow effect to display when this button is active. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
tab | Computable <CoercableComponent | GenericTab > | The tab to display when this button is clicked. |
visibility? | Computable <boolean | Visibility > | Whether this tab button should be visible. |
profectus/src/features/tabs/tabFamily.ts:40
• TabFamilyOptions: Object
An object that configures a TabFamily.
Name | Type | Description |
---|---|---|
buttonContainerClasses? | Computable <Record <string , boolean >> | A dictionary of CSS classes to apply to the list of buttons for changing tabs. |
buttonContainerStyle? | Computable <StyleValue > | CSS to apply to the list of buttons for changing tabs. |
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
visibility? | Computable <boolean | Visibility > | Whether this tab button should be visible. |
profectus/src/features/tabs/tabFamily.ts:92
Ƭ GenericTabButton: Replace
<TabButton
<TabButtonOptions
>, { visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid TabButton object.
profectus/src/features/tabs/tabFamily.ts:82
Ƭ GenericTabFamily: Replace
<TabFamily
<TabFamilyOptions
>, { visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid TabFamily object.
profectus/src/features/tabs/tabFamily.ts:138
Ƭ TabButton<T
>: Replace
<T
& BaseTabButton
, { classes
: GetComputableType
<T
["classes"
]> ; display
: GetComputableType
<T
["display"
]> ; glowColor
: GetComputableType
<T
["glowColor"
]> ; style
: GetComputableType
<T
["style"
]> ; tab
: GetComputableType
<T
["tab"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
An object that represents a button that can be clicked to change tabs in a tabbed interface.
See
Name | Type |
---|---|
T | extends TabButtonOptions |
profectus/src/features/tabs/tabFamily.ts:69
Ƭ TabFamily<T
>: Replace
<T
& BaseTabFamily
, { tabs
: Record
<string
, GenericTabButton
> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
An object that represents a tabbed interface.
See
Name | Type |
---|---|
T | extends TabFamilyOptions |
profectus/src/features/tabs/tabFamily.ts:129
• Const
TabButtonType: typeof TabButtonType
A symbol used to identify TabButton features.
profectus/src/features/tabs/tabFamily.ts:33
• Const
TabFamilyType: typeof TabFamilyType
A symbol used to identify TabFamily features.
profectus/src/features/tabs/tabFamily.ts:35
â–¸ createTabFamily<T
>(tabs
, optionsFunc?
): TabFamily
<T
>
Lazily creates a tab family with the given options.
Name | Type |
---|---|
T | extends TabFamilyOptions |
Name | Type | Description |
---|---|---|
tabs | Record <string , () => TabButtonOptions > | - |
optionsFunc? | OptionsFunc <T , BaseTabFamily , GenericTabFamily > | Tab family options. |
TabFamily
<T
>
• BaseTooltip: Object
The properties that are added onto a processed TooltipOptions to create an Tooltip.
Name | Type |
---|---|
pinned? | Ref <boolean > |
profectus/src/features/tooltips/tooltip.ts:47
• TooltipOptions: Object
An object that configures a Tooltip.
Name | Type | Description |
---|---|---|
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
direction? | Computable <Direction > | The direction in which to display the tooltip |
display | Computable <CoercableComponent > | The text to display inside the tooltip. |
pinnable? | boolean | Whether or not this tooltip can be pinned, meaning it'll stay visible even when not hovered. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
xoffset? | Computable <string > | The x offset of the tooltip, in px. |
yoffset? | Computable <string > | The y offset of the tooltip, in px. |
profectus/src/features/tooltips/tooltip.ts:27
Ƭ GenericTooltip: Replace
<Tooltip
<TooltipOptions
>, { direction
: ProcessedComputable
<Direction
> ; pinnable
: boolean
; pinned
: Ref
<boolean
> | undefined
}>
A type that matches any valid Tooltip object.
profectus/src/features/tooltips/tooltip.ts:67
Ƭ Tooltip<T
>: Replace
<T
& BaseTooltip
, { classes
: GetComputableType
<T
["classes"
]> ; direction
: GetComputableTypeWithDefault
<T
["direction"
], Up
> ; display
: GetComputableType
<T
["display"
]> ; pinnable
: T
["pinnable"
] extends undefined
? false
: T
["pinnable"
] ; pinned
: T
["pinnable"
] extends true
? Ref
<boolean
> : undefined
; style
: GetComputableType
<T
["style"
]> ; xoffset
: GetComputableType
<T
["xoffset"
]> ; yoffset
: GetComputableType
<T
["yoffset"
]> }>
An object that represents a tooltip that appears when hovering over an element.
Name | Type |
---|---|
T | extends TooltipOptions |
profectus/src/features/tooltips/tooltip.ts:52
â–¸ addTooltip<T
>(element
, options
): Tooltip
<T
>
Creates a tooltip on the given element with the given options.
Name | Type |
---|---|
T | extends TooltipOptions |
Name | Type | Description |
---|---|---|
element | VueFeature | The renderable feature to display the tooltip on. |
options | T & ThisType <Tooltip <T >> & Partial <BaseTooltip > | Tooltip options. |
Tooltip
<T
>
profectus/src/features/tooltips/tooltip.ts:81
Name | Type |
---|---|
element | VueFeature |
display * | processedPropType<CoercableComponent>(Object, String, Function) |
style | processedPropType<StyleValue>(Object, String, Array) |
classes | processedPropType<Record<string, boolean>>(Object) |
direction | processedPropType<Direction>(String) |
xoffset | processedPropType<string>(String) |
yoffset | processedPropType<string>(String) |
pinned | Persistent<boolean> |
Name |
---|
default |
• BaseTree: Object
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
isResetting | Ref <boolean > | A flag that is true while the reset is still propagating through the tree. |
links | Ref <Link []> | The link objects for each of the branches of the tree. |
reset | (node : GenericTreeNode ) => void | Cause a reset on this node and propagate it through the tree according to resetPropagation. |
resettingNode | Ref <null | GenericTreeNode > | A reference to the node that caused the currently propagating reset. |
type | typeof TreeType | A symbol that helps identify features of the same type. |
profectus/src/features/trees/tree.ts:222
• BaseTreeNode: Object
The properties that are added onto a processed TreeNodeOptions to create an TreeNode.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
type | typeof TreeNodeType | A symbol that helps identify features of the same type. |
profectus/src/features/trees/tree.ts:65
• TreeBranch: Object
Represents a branch between two nodes in a tree.
Name | Type | Description |
---|---|---|
accent-height? | Numberish | - |
accumulate? | "none" | "sum" | - |
additive? | "sum" | "replace" | - |
alignment-baseline? | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "inherit" | - |
allowReorder? | "no" | "yes" | - |
alphabetic? | Numberish | - |
amplitude? | Numberish | - |
arabic-form? | "initial" | "medial" | "terminal" | "isolated" | - |
aria-activedescendant? | string | Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. |
aria-atomic? | Booleanish | Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. |
aria-autocomplete? | "none" | "inline" | "list" | "both" | Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. |
aria-busy? | Booleanish | Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. |
aria-checked? | Booleanish | "mixed" | Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. See - aria-pressed - aria-selected. |
aria-colcount? | Numberish | Defines the total number of columns in a table, grid, or treegrid. See aria-colindex. |
aria-colindex? | Numberish | Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. See - aria-colcount - aria-colspan. |
aria-colspan? | Numberish | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. See - aria-colindex - aria-rowspan. |
aria-controls? | string | Identifies the element (or elements) whose contents or presence are controlled by the current element. See aria-owns. |
aria-current? | "time" | Booleanish | "page" | "step" | "location" | "date" | Indicates the element that represents the current item within a container or set of related elements. |
aria-describedby? | string | Identifies the element (or elements) that describes the object. See aria-labelledby |
aria-details? | string | Identifies the element that provides a detailed, extended description for the object. See aria-describedby. |
aria-disabled? | Booleanish | Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. See - aria-hidden - aria-readonly. |
aria-dropeffect? | "none" | "copy" | "execute" | "link" | "move" | "popup" | Indicates what functions can be performed when a dragged object is released on the drop target. Deprecated in ARIA 1.1 |
aria-errormessage? | string | Identifies the element that provides an error message for the object. See - aria-invalid - aria-describedby. |
aria-expanded? | Booleanish | Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. |
aria-flowto? | string | Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. |
aria-grabbed? | Booleanish | Indicates an element's "grabbed" state in a drag-and-drop operation. Deprecated in ARIA 1.1 |
aria-haspopup? | "tree" | Booleanish | "menu" | "listbox" | "grid" | "dialog" | Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. |
aria-hidden? | Booleanish | Indicates whether the element is exposed to an accessibility API. See aria-disabled. |
aria-invalid? | Booleanish | "grammar" | "spelling" | Indicates the entered value does not conform to the format expected by the application. See aria-errormessage. |
aria-keyshortcuts? | string | Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. |
aria-label? | string | Defines a string value that labels the current element. See aria-labelledby. |
aria-labelledby? | string | Identifies the element (or elements) that labels the current element. See aria-describedby. |
aria-level? | Numberish | Defines the hierarchical level of an element within a structure. |
aria-live? | "off" | "assertive" | "polite" | Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. |
aria-modal? | Booleanish | Indicates whether an element is modal when displayed. |
aria-multiline? | Booleanish | Indicates whether a text box accepts multiple lines of input or only a single line. |
aria-multiselectable? | Booleanish | Indicates that the user may select more than one item from the current selectable descendants. |
aria-orientation? | "horizontal" | "vertical" | Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. |
aria-owns? | string | Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See aria-controls. |
aria-placeholder? | string | Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. |
aria-posinset? | Numberish | Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See aria-setsize. |
aria-pressed? | Booleanish | "mixed" | Indicates the current "pressed" state of toggle buttons. See - aria-checked - aria-selected. |
aria-readonly? | Booleanish | Indicates that the element is not editable, but is otherwise operable. See aria-disabled. |
aria-relevant? | "additions" | "additions text" | "all" | "removals" | "text" | Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See aria-atomic. |
aria-required? | Booleanish | Indicates that user input is required on the element before a form may be submitted. |
aria-roledescription? | string | Defines a human-readable, author-localized description for the role of an element. |
aria-rowcount? | Numberish | Defines the total number of rows in a table, grid, or treegrid. See aria-rowindex. |
aria-rowindex? | Numberish | Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. See - aria-rowcount - aria-rowspan. |
aria-rowspan? | Numberish | Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. See - aria-rowindex - aria-colspan. |
aria-selected? | Booleanish | Indicates the current "selected" state of various widgets. See - aria-checked - aria-pressed. |
aria-setsize? | Numberish | Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See aria-posinset. |
aria-sort? | "none" | "ascending" | "descending" | "other" | Indicates if items in a table or grid are sorted in ascending or descending order. |
aria-valuemax? | Numberish | Defines the maximum allowed value for a range widget. |
aria-valuemin? | Numberish | Defines the minimum allowed value for a range widget. |
aria-valuenow? | Numberish | Defines the current value for a range widget. See aria-valuetext. |
aria-valuetext? | string | Defines the human readable text alternative of aria-valuenow for a range widget. |
ascent? | Numberish | - |
attributeName? | string | - |
attributeType? | string | - |
autoReverse? | Numberish | - |
azimuth? | Numberish | - |
baseFrequency? | Numberish | - |
baseProfile? | Numberish | - |
baseline-shift? | Numberish | - |
bbox? | Numberish | - |
begin? | Numberish | - |
bias? | Numberish | - |
by? | Numberish | - |
calcMode? | Numberish | - |
cap-height? | Numberish | - |
class? | any | SVG Styling Attributes See https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling |
clip? | Numberish | - |
clip-path? | string | - |
clip-rule? | Numberish | - |
clipPathUnits? | Numberish | - |
color? | string | - |
color-interpolation? | Numberish | - |
color-interpolation-filters? | "auto" | "inherit" | "sRGB" | "linearRGB" | - |
color-profile? | Numberish | - |
color-rendering? | Numberish | - |
contentScriptType? | Numberish | - |
contentStyleType? | Numberish | - |
cursor? | Numberish | - |
cx? | Numberish | - |
cy? | Numberish | - |
d? | string | - |
decelerate? | Numberish | - |
descent? | Numberish | - |
diffuseConstant? | Numberish | - |
direction? | Numberish | - |
display? | Numberish | - |
divisor? | Numberish | - |
dominant-baseline? | Numberish | - |
dur? | Numberish | - |
dx? | Numberish | - |
dy? | Numberish | - |
edgeMode? | Numberish | - |
elevation? | Numberish | - |
enable-background? | Numberish | - |
end? | Numberish | - |
endNode | GenericTreeNode | - |
exponent? | Numberish | - |
externalResourcesRequired? | Numberish | - |
fill? | string | - |
fill-opacity? | Numberish | - |
fill-rule? | "inherit" | "nonzero" | "evenodd" | - |
filter? | string | - |
filterRes? | Numberish | - |
filterUnits? | Numberish | - |
flood-color? | Numberish | - |
flood-opacity? | Numberish | - |
focusable? | Numberish | - |
font-family? | string | - |
font-size? | Numberish | - |
font-size-adjust? | Numberish | - |
font-stretch? | Numberish | - |
font-style? | Numberish | - |
font-variant? | Numberish | - |
font-weight? | Numberish | - |
format? | Numberish | - |
from? | Numberish | - |
fx? | Numberish | - |
fy? | Numberish | - |
g1? | Numberish | - |
g2? | Numberish | - |
glyph-name? | Numberish | - |
glyph-orientation-horizontal? | Numberish | - |
glyph-orientation-vertical? | Numberish | - |
glyphRef? | Numberish | - |
gradientTransform? | string | - |
gradientUnits? | string | - |
hanging? | Numberish | - |
height? | Numberish | - |
horiz-adv-x? | Numberish | - |
horiz-origin-x? | Numberish | - |
href? | string | - |
id? | string | - |
ideographic? | Numberish | - |
image-rendering? | Numberish | - |
in? | string | - |
in2? | Numberish | - |
innerHTML? | string | - |
intercept? | Numberish | - |
k? | Numberish | - |
k1? | Numberish | - |
k2? | Numberish | - |
k3? | Numberish | - |
k4? | Numberish | - |
kernelMatrix? | Numberish | - |
kernelUnitLength? | Numberish | - |
kerning? | Numberish | - |
keyPoints? | Numberish | - |
keySplines? | Numberish | - |
keyTimes? | Numberish | - |
lang? | string | - |
lengthAdjust? | Numberish | - |
letter-spacing? | Numberish | - |
lighting-color? | Numberish | - |
limitingConeAngle? | Numberish | - |
local? | Numberish | - |
marker-end? | string | - |
marker-mid? | string | - |
marker-start? | string | - |
markerHeight? | Numberish | - |
markerUnits? | Numberish | - |
markerWidth? | Numberish | - |
mask? | string | - |
maskContentUnits? | Numberish | - |
maskUnits? | Numberish | - |
mathematical? | Numberish | - |
max? | Numberish | - |
media? | string | - |
method? | string | - |
min? | Numberish | - |
mode? | Numberish | - |
name? | string | - |
numOctaves? | Numberish | - |
offset? | Numberish | - |
offsetEnd? | Position | - |
offsetStart? | Position | - |
onAbort? | (payload : Event ) => void | - |
onAnimationend? | (payload : AnimationEvent ) => void | - |
onAnimationiteration? | (payload : AnimationEvent ) => void | - |
onAnimationstart? | (payload : AnimationEvent ) => void | - |
onAuxclick? | (payload : MouseEvent ) => void | - |
onBeforeinput? | (payload : Event ) => void | - |
onBlur? | (payload : FocusEvent ) => void | - |
onCanplay? | (payload : Event ) => void | - |
onCanplaythrough? | (payload : Event ) => void | - |
onChange? | (payload : Event ) => void | - |
onClick? | (payload : MouseEvent ) => void | - |
onCompositionend? | (payload : CompositionEvent ) => void | - |
onCompositionstart? | (payload : CompositionEvent ) => void | - |
onCompositionupdate? | (payload : CompositionEvent ) => void | - |
onContextmenu? | (payload : MouseEvent ) => void | - |
onCopy? | (payload : ClipboardEvent ) => void | - |
onCut? | (payload : ClipboardEvent ) => void | - |
onDblclick? | (payload : MouseEvent ) => void | - |
onDrag? | (payload : DragEvent ) => void | - |
onDragend? | (payload : DragEvent ) => void | - |
onDragenter? | (payload : DragEvent ) => void | - |
onDragexit? | (payload : DragEvent ) => void | - |
onDragleave? | (payload : DragEvent ) => void | - |
onDragover? | (payload : DragEvent ) => void | - |
onDragstart? | (payload : DragEvent ) => void | - |
onDrop? | (payload : DragEvent ) => void | - |
onDurationchange? | (payload : Event ) => void | - |
onEmptied? | (payload : Event ) => void | - |
onEncrypted? | (payload : Event ) => void | - |
onEnded? | (payload : Event ) => void | - |
onError? | (payload : Event ) => void | - |
onFocus? | (payload : FocusEvent ) => void | - |
onFocusin? | (payload : FocusEvent ) => void | - |
onFocusout? | (payload : FocusEvent ) => void | - |
onInput? | (payload : Event ) => void | - |
onInvalid? | (payload : Event ) => void | - |
onKeydown? | (payload : KeyboardEvent ) => void | - |
onKeypress? | (payload : KeyboardEvent ) => void | - |
onKeyup? | (payload : KeyboardEvent ) => void | - |
onLoad? | (payload : Event ) => void | - |
onLoadeddata? | (payload : Event ) => void | - |
onLoadedmetadata? | (payload : Event ) => void | - |
onLoadstart? | (payload : Event ) => void | - |
onMousedown? | (payload : MouseEvent ) => void | - |
onMouseenter? | (payload : MouseEvent ) => void | - |
onMouseleave? | (payload : MouseEvent ) => void | - |
onMousemove? | (payload : MouseEvent ) => void | - |
onMouseout? | (payload : MouseEvent ) => void | - |
onMouseover? | (payload : MouseEvent ) => void | - |
onMouseup? | (payload : MouseEvent ) => void | - |
onPaste? | (payload : ClipboardEvent ) => void | - |
onPause? | (payload : Event ) => void | - |
onPlay? | (payload : Event ) => void | - |
onPlaying? | (payload : Event ) => void | - |
onPointercancel? | (payload : PointerEvent ) => void | - |
onPointerdown? | (payload : PointerEvent ) => void | - |
onPointerenter? | (payload : PointerEvent ) => void | - |
onPointerleave? | (payload : PointerEvent ) => void | - |
onPointermove? | (payload : PointerEvent ) => void | - |
onPointerout? | (payload : PointerEvent ) => void | - |
onPointerover? | (payload : PointerEvent ) => void | - |
onPointerup? | (payload : PointerEvent ) => void | - |
onProgress? | (payload : Event ) => void | - |
onRatechange? | (payload : Event ) => void | - |
onReset? | (payload : Event ) => void | - |
onScroll? | (payload : UIEvent ) => void | - |
onSeeked? | (payload : Event ) => void | - |
onSeeking? | (payload : Event ) => void | - |
onSelect? | (payload : Event ) => void | - |
onStalled? | (payload : Event ) => void | - |
onSubmit? | (payload : Event ) => void | - |
onSuspend? | (payload : Event ) => void | - |
onTimeupdate? | (payload : Event ) => void | - |
onTouchcancel? | (payload : TouchEvent ) => void | - |
onTouchend? | (payload : TouchEvent ) => void | - |
onTouchmove? | (payload : TouchEvent ) => void | - |
onTouchstart? | (payload : TouchEvent ) => void | - |
onTransitionend? | (payload : TransitionEvent ) => void | - |
onTransitionstart? | (payload : TransitionEvent ) => void | - |
onVolumechange? | (payload : Event ) => void | - |
onWaiting? | (payload : Event ) => void | - |
onWheel? | (payload : WheelEvent ) => void | - |
opacity? | Numberish | - |
operator? | Numberish | - |
order? | Numberish | - |
orient? | Numberish | - |
orientation? | Numberish | - |
origin? | Numberish | - |
overflow? | Numberish | - |
overline-position? | Numberish | - |
overline-thickness? | Numberish | - |
paint-order? | Numberish | - |
panose-1? | Numberish | - |
pathLength? | Numberish | - |
patternContentUnits? | string | - |
patternTransform? | Numberish | - |
patternUnits? | string | - |
pointer-events? | Numberish | - |
points? | string | - |
pointsAtX? | Numberish | - |
pointsAtY? | Numberish | - |
pointsAtZ? | Numberish | - |
preserveAlpha? | Numberish | - |
preserveAspectRatio? | string | - |
primitiveUnits? | Numberish | - |
r? | Numberish | - |
radius? | Numberish | - |
refX? | Numberish | - |
refY? | Numberish | - |
renderingIntent? | Numberish | - |
repeatCount? | Numberish | - |
repeatDur? | Numberish | - |
requiredExtensions? | Numberish | - |
requiredFeatures? | Numberish | - |
restart? | Numberish | - |
result? | string | - |
role? | string | - |
rotate? | Numberish | - |
rx? | Numberish | - |
ry? | Numberish | - |
scale? | Numberish | - |
seed? | Numberish | - |
shape-rendering? | Numberish | - |
slope? | Numberish | - |
spacing? | Numberish | - |
specularConstant? | Numberish | - |
specularExponent? | Numberish | - |
speed? | Numberish | - |
spreadMethod? | string | - |
startNode | GenericTreeNode | - |
startOffset? | Numberish | - |
stdDeviation? | Numberish | - |
stemh? | Numberish | - |
stemv? | Numberish | - |
stitchTiles? | Numberish | - |
stop-color? | string | - |
stop-opacity? | Numberish | - |
strikethrough-position? | Numberish | - |
strikethrough-thickness? | Numberish | - |
string? | Numberish | - |
stroke? | string | - |
stroke-dasharray? | Numberish | - |
stroke-dashoffset? | Numberish | - |
stroke-linecap? | "inherit" | "butt" | "round" | "square" | - |
stroke-linejoin? | "inherit" | "round" | "miter" | "bevel" | - |
stroke-miterlimit? | Numberish | - |
stroke-opacity? | Numberish | - |
stroke-width? | Numberish | - |
style? | string | CSSProperties | - |
surfaceScale? | Numberish | - |
systemLanguage? | Numberish | - |
tabindex? | Numberish | - |
tableValues? | Numberish | - |
target? | string | - |
targetX? | Numberish | - |
targetY? | Numberish | - |
text-anchor? | string | - |
text-decoration? | Numberish | - |
text-rendering? | Numberish | - |
textLength? | Numberish | - |
to? | Numberish | - |
transform? | string | - |
type? | string | - |
u1? | Numberish | - |
u2? | Numberish | - |
underline-position? | Numberish | - |
underline-thickness? | Numberish | - |
unicode? | Numberish | - |
unicode-bidi? | Numberish | - |
unicode-range? | Numberish | - |
unitsPer-em? | Numberish | - |
v-alphabetic? | Numberish | - |
v-hanging? | Numberish | - |
v-ideographic? | Numberish | - |
v-mathematical? | Numberish | - |
values? | string | - |
vector-effect? | Numberish | - |
version? | string | - |
vert-adv-y? | Numberish | - |
vert-origin-x? | Numberish | - |
vert-origin-y? | Numberish | - |
viewBox? | string | - |
viewTarget? | Numberish | - |
visibility? | Numberish | - |
width? | Numberish | - |
widths? | Numberish | - |
word-spacing? | Numberish | - |
writing-mode? | Numberish | - |
x? | Numberish | - |
x-height? | Numberish | - |
x1? | Numberish | - |
x2? | Numberish | - |
xChannelSelector? | string | - |
xlinkActuate? | string | - |
xlinkArcrole? | string | - |
xlinkHref? | string | - |
xlinkRole? | string | - |
xlinkShow? | string | - |
xlinkTitle? | string | - |
xlinkType? | string | - |
xmlns? | string | - |
y? | Numberish | - |
y1? | Numberish | - |
y2? | Numberish | - |
yChannelSelector? | string | - |
z? | Numberish | - |
zoomAndPan? | string | - |
profectus/src/features/trees/tree.ts:197
• TreeNodeOptions: Object
An object that configures a TreeNode.
Name | Type | Description |
---|---|---|
canClick? | Computable <boolean > | Whether or not this tree node can be clicked. |
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
color? | Computable <string > | The background color for this node. |
display? | Computable <CoercableComponent > | The label to display on this tree node. |
glowColor? | Computable <string > | The color of the glow effect shown to notify the user there's something to do with this node. |
mark? | Computable <string | boolean > | Shows a marker on the corner of the feature. |
onClick? | (e? : MouseEvent | TouchEvent ) => void | A function that is called when the tree node is clicked. |
onHold? | VoidFunction | A function that is called when the tree node is held down. |
reset? | GenericReset | A reset object attached to this node, used for propagating resets through the tree. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
visibility? | Computable <boolean | Visibility > | Whether this tree node should be visible. |
profectus/src/features/trees/tree.ts:37
• TreeOptions: Object
An object that configures a Tree.
Name | Type | Description |
---|---|---|
branches? | Computable <TreeBranch []> | The branches between nodes within this tree. |
leftSideNodes? | Computable <GenericTreeNode []> | Nodes to show on the left side of the tree. |
nodes | Computable <GenericTreeNode [][]> | The nodes within the tree, in a 2D array. |
onReset? | (node : GenericTreeNode ) => void | A function that is called when a node within the tree is reset. |
resetPropagation? | ResetPropagation | How to propagate resets through the tree. |
rightSideNodes? | Computable <GenericTreeNode []> | Nodes to show on the right side of the tree. |
visibility? | Computable <boolean | Visibility > | Whether this clickable should be visible. |
profectus/src/features/trees/tree.ts:205
Ƭ GenericTree: Replace
<Tree
<TreeOptions
>, { visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid Tree object.
profectus/src/features/trees/tree.ts:254
Ƭ GenericTreeNode: Replace
<TreeNode
<TreeNodeOptions
>, { canClick
: ProcessedComputable
<boolean
> ; visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid TreeNode object.
profectus/src/features/trees/tree.ts:92
Ƭ ResetPropagation: (tree
: GenericTree
, resettingNode
: GenericTreeNode
) => void
â–¸ (tree
, resettingNode
): void
A function that is used to propagate resets through a tree.
Name | Type |
---|---|
tree | GenericTree |
resettingNode | GenericTreeNode |
void
profectus/src/features/trees/tree.ts:308
Ƭ Tree<T
>: Replace
<T
& BaseTree
, { branches
: GetComputableType
<T
["branches"
]> ; leftSideNodes
: GetComputableType
<T
["leftSideNodes"
]> ; nodes
: GetComputableType
<T
["nodes"
]> ; rightSideNodes
: GetComputableType
<T
["rightSideNodes"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
An object that represents a feature that is a tree of nodes with branches between them. Contains support for reset mechanics that can propagate through the tree.
Name | Type |
---|---|
T | extends TreeOptions |
profectus/src/features/trees/tree.ts:242
Ƭ TreeNode<T
>: Replace
<T
& BaseTreeNode
, { canClick
: GetComputableTypeWithDefault
<T
["canClick"
], true
> ; classes
: GetComputableType
<T
["classes"
]> ; color
: GetComputableType
<T
["color"
]> ; display
: GetComputableType
<T
["display"
]> ; glowColor
: GetComputableType
<T
["glowColor"
]> ; mark
: GetComputableType
<T
["mark"
]> ; style
: GetComputableType
<T
["style"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
An object that represents a node on a tree.
Name | Type |
---|---|
T | extends TreeNodeOptions |
profectus/src/features/trees/tree.ts:77
• Const
TreeNodeType: typeof TreeNodeType
A symbol used to identify TreeNode features.
profectus/src/features/trees/tree.ts:30
• Const
TreeType: typeof TreeType
A symbol used to identify Tree features.
profectus/src/features/trees/tree.ts:32
â–¸ branchedResetPropagation(tree
, resettingNode
): void
Propagate resets down the branches of the tree.
Name | Type |
---|---|
tree | GenericTree |
resettingNode | GenericTreeNode |
void
profectus/src/features/trees/tree.ts:337
â–¸ createResourceTooltip(resource
, requiredResource?
, requirement?
): Ref
<string
>
Utility for creating a tooltip for a tree node that displays a resource-based unlock requirement, and after unlock shows the amount of another resource. It sounds oddly specific, but comes up a lot.
Name | Type | Default value |
---|---|---|
resource | Resource <DecimalSource > | undefined |
requiredResource | null | Resource <DecimalSource > | null |
requirement | Computable <DecimalSource > | 0 |
Ref
<string
>
profectus/src/features/trees/tree.ts:376
â–¸ createTree<T
>(optionsFunc
): Tree
<T
>
Lazily creates a tree with the given options.
Name | Type |
---|---|
T | extends TreeOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseTree , GenericTree > | Tree options. |
Tree
<T
>
profectus/src/features/trees/tree.ts:265
â–¸ createTreeNode<T
>(optionsFunc?
, ...decorators
): TreeNode
<T
>
Lazily creates a tree node with the given options.
Name | Type |
---|---|
T | extends TreeNodeOptions |
Name | Type | Description |
---|---|---|
optionsFunc? | OptionsFunc <T , BaseTreeNode , GenericTreeNode > | Tree Node options. |
...decorators | GenericDecorator [] | - |
TreeNode
<T
>
profectus/src/features/trees/tree.ts:104
â–¸ defaultResetPropagation(tree
, resettingNode
): void
Propagate resets down the tree by resetting every node in a lower row.
Name | Type |
---|---|
tree | GenericTree |
resettingNode | GenericTreeNode |
void
profectus/src/features/trees/tree.ts:313
â–¸ invertedResetPropagation(tree
, resettingNode
): void
Propagate resets down the tree by resetting every node in a lower row.
Name | Type |
---|---|
tree | GenericTree |
resettingNode | GenericTreeNode |
void
profectus/src/features/trees/tree.ts:325
Name | Type |
---|---|
nodes * | processedPropType<GenericTreeNode[][]>(Array) |
leftSideNodes | processedPropType<GenericTreeNode[]>(Array) |
rightSideNodes | processedPropType<GenericTreeNode[]>(Array) |
branches | processedPropType<TreeBranch[]>(Array) |
Name | Type |
---|---|
display | processedPropType<CoercableComponent>(Object, String, Function) |
visibility * | processedPropType<Visibility | boolean>(Number, Boolean) |
style | processedPropType<StyleValue>(String, Object, Array) |
classes | processedPropType<Record<string, boolean>>(Object) |
onClick | (e?: MouseEvent | TouchEvent) => void |
onHold | VoidFunction |
color | processedPropType<string>(String) |
glowColor | processedPropType<string>(String) |
canClick * | processedPropType<boolean>(Boolean) |
mark | processedPropType<boolean | string>(Boolean, String) |
id * | string |
• BaseUpgrade: Object
The properties that are added onto a processed UpgradeOptions to create an Upgrade.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
bought | Persistent <boolean > | Whether or not this upgrade has been purchased. |
canPurchase | Ref <boolean > | Whether or not the upgrade can currently be purchased. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
purchase | VoidFunction | Purchase the upgrade |
type | typeof UpgradeType | A symbol that helps identify features of the same type. |
profectus/src/features/upgrades/upgrade.ts:76
• UpgradeOptions: Object
An object that configures a Upgrade.
Name | Type | Description |
---|---|---|
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
display? | Computable <CoercableComponent | { description : CoercableComponent ; effectDisplay? : CoercableComponent ; title? : CoercableComponent }> | The display to use for this clickable. |
mark? | Computable <string | boolean > | Shows a marker on the corner of the feature. |
onPurchase? | VoidFunction | A function that is called when the upgrade is purchased. |
requirements | Requirements | The requirements to purchase this upgrade. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
visibility? | Computable <boolean | Visibility > | Whether this clickable should be visible. |
profectus/src/features/upgrades/upgrade.ts:46
Ƭ GenericUpgrade: Replace
<Upgrade
<UpgradeOptions
>, { visibility
: ProcessedComputable
<Visibility
| boolean
> }>
A type that matches any valid Upgrade object.
profectus/src/features/upgrades/upgrade.ts:107
Ƭ Upgrade<T
>: Replace
<T
& BaseUpgrade
, { classes
: GetComputableType
<T
["classes"
]> ; display
: GetComputableType
<T
["display"
]> ; mark
: GetComputableType
<T
["mark"
]> ; requirements
: GetComputableType
<T
["requirements"
]> ; style
: GetComputableType
<T
["style"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
An object that represents a feature that can be purchased a single time.
Name | Type |
---|---|
T | extends UpgradeOptions |
profectus/src/features/upgrades/upgrade.ts:94
• Const
UpgradeType: typeof UpgradeType
A symbol used to identify Upgrade features.
profectus/src/features/upgrades/upgrade.ts:41
â–¸ createUpgrade<T
>(optionsFunc
, ...decorators
): Upgrade
<T
>
Lazily creates an upgrade with the given options.
Name | Type |
---|---|
T | extends UpgradeOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseUpgrade , GenericUpgrade > | Upgrade options. |
...decorators | GenericDecorator [] | - |
Upgrade
<T
>
profectus/src/features/upgrades/upgrade.ts:118
â–¸ setupAutoPurchase(layer
, autoActive
, upgrades?
): void
Utility to auto purchase a list of upgrades whenever they're affordable.
Name | Type | Default value | Description |
---|---|---|---|
layer | GenericLayer | undefined | The layer the upgrades are apart of |
autoActive | Computable <boolean > | undefined | Whether or not the upgrades should currently be auto-purchasing |
upgrades | GenericUpgrade [] | [] | The specific upgrades to upgrade. If unspecified, uses all upgrades on the layer. |
void
profectus/src/features/upgrades/upgrade.ts:211
Name | Type |
---|---|
display * | processedPropType<UnwrapRef<GenericUpgrade["display"]>>(String, Object, Function) |
visibility * | processedPropType<Visibility | boolean>(Number, Boolean) |
style | processedPropType<StyleValue>(String, Object, Array) |
classes | processedPropType<Record<string, boolean>>(Object) |
requirements * | Requirements |
canPurchase * | processedPropType<boolean>(Boolean) |
bought * | processedPropType<boolean>(Boolean) |
mark | processedPropType<boolean | string>(Boolean, String) |
id * | string |
purchase * | VoidFunction |
• GlobalEvents: Object
All types of events able to be sent or emitted from the global event bus.
Name | Type | Description |
---|---|---|
addLayer | (layer : GenericLayer , saveData : Record <string , unknown >) => void | Sent whenever a layer is added. |
fontsLoaded | VoidFunction | Using document.fonts.ready returns too early on firefox, so we use document.fonts.onloadingdone instead, which doesn't accept multiple listeners. This event fires when that callback is called. |
gameWon | VoidFunction | Sent when the game has ended. |
loadSettings | (settings : Partial <Settings >) => void | Sent when constructing the Settings object. Use it to add default values for custom properties to the object. See features/features.setDefault for setting default values. |
onLoad | VoidFunction | Sent whenever a save has finished loading. Happens when the page is opened and upon switching saves in the saves manager. |
removeLayer | (layer : GenericLayer ) => void | Sent whenever a layer is removed. |
reset | (reset : GenericReset ) => void | - |
setupVue | (vue : App <any >) => void | Sent when setting up the Vue Application instance. Use it to register global components or otherwise set up things that should affect Vue globally. |
update | (diff : number , trueDiff : number ) => void | Sent every game tick. Runs the life cycle of the project. |
profectus/src/game/events.ts:7
profectus/src/features/reset.ts:116
• Const
globalBus: Emitter
<GlobalEvents
>
A global event bus for hooking into GlobalEvents.
• Abstract
InternalFormula<T
>: Object
Name | Type |
---|---|
T | extends [FormulaSource ] | FormulaSource [] |
profectus/src/game/formulas/formulas.ts:43
profectus/src/game/formulas/formulas.ts:51
• default<T
>: Object
A class that can be used for cost/goal functions. It can be evaluated similar to a cost function, but also provides extra features for supported formulas. For example, a lot of math functions can be inverted. Typically, the use of these extra features is to support cost/goal functions that have multiple levels purchased/completed at once efficiently.
See
Name | Type |
---|---|
T | extends [FormulaSource ] | FormulaSource [] |
profectus/src/game/formulas/formulas.ts:1243
â–¸ calculateCost(formula
, amountToBuy
, spendResources?
, summedPurchases?
): DecimalSource
Utility for calculating the cost of a formula for a given amount of purchases. If spendResources is changed to false, the calculation will be much faster with higher numbers.
Name | Type | Description |
---|---|---|
formula | InvertibleFormula | The formula to use for calculating buy max from |
amountToBuy | DecimalSource | The amount of purchases to calculate the cost for |
spendResources? | true | Whether or not to count spent resources on each purchase or not. If true, costs will be approximated for performance, skewing towards higher cost |
summedPurchases? | number | How many purchases to manually sum for improved accuracy. If not specified, defaults to 10 when spending resources and 0 when not |
â–¸ calculateCost(formula
, amountToBuy
, spendResources
, summedPurchases?
): DecimalSource
Name | Type |
---|---|
formula | InvertibleIntegralFormula |
amountToBuy | DecimalSource |
spendResources | boolean |
summedPurchases? | number |
profectus/src/game/formulas/formulas.ts:1473
profectus/src/game/formulas/formulas.ts:1479
profectus/src/game/formulas/formulas.ts:1485
â–¸ calculateMaxAffordable(formula
, resource
, spendResources?
, summedPurchases?
): ComputedRef
<DecimalSource
>
Utility for calculating the maximum amount of purchases possible with a given formula and resource. If spendResources is changed to false, the calculation will be much faster with higher numbers.
Name | Type | Description |
---|---|---|
formula | InvertibleFormula | The formula to use for calculating buy max from |
resource | Resource <DecimalSource > | The resource used when purchasing (is only read from) |
spendResources? | true | Whether or not to count spent resources on each purchase or not. If true, costs will be approximated for performance, skewing towards fewer purchases |
summedPurchases? | number | How many of the most expensive purchases should be manually summed for better accuracy. If unspecified uses 10 when spending resources and 0 when not |
ComputedRef
<DecimalSource
>
â–¸ calculateMaxAffordable(formula
, resource
, spendResources
, summedPurchases?
): ComputedRef
<DecimalSource
>
Name | Type |
---|---|
formula | InvertibleIntegralFormula |
resource | Resource <DecimalSource > |
spendResources | Computable <boolean > |
summedPurchases? | number |
profectus/src/game/formulas/formulas.ts:1405
profectus/src/game/formulas/formulas.ts:1411
profectus/src/game/formulas/formulas.ts:1417
â–¸ findNonInvertible(formula
): GenericFormula
| null
Utility for recursively searching through a formula for the cause of non-invertibility.
Name | Type | Description |
---|---|---|
formula | GenericFormula | The formula to search for a non-invertible formula within |
GenericFormula
| null
profectus/src/game/formulas/formulas.ts:1362
â–¸ hasVariable(value
): value is InvertibleFormula
Name | Type |
---|---|
value | FormulaSource |
profectus/src/game/formulas/formulas.ts:24
â–¸ printFormula(formula
): string
Stringifies a formula so it's more easy to read in the console
Name | Type | Description |
---|---|---|
formula | FormulaSource | The formula to print |
string
profectus/src/game/formulas/formulas.ts:1380
â–¸ unrefFormulaSource(value
, variable?
): DecimalSource
Name | Type |
---|---|
value | FormulaSource |
variable? | DecimalSource |
â–¸ applySubstitutionDiv(value
, lhs
, rhs
): GenericFormula
Name | Type |
---|---|
value | GenericFormula |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:191
â–¸ applySubstitutionMul(value
, lhs
, rhs
): GenericFormula
Name | Type |
---|---|
value | GenericFormula |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:152
â–¸ applySubstitutionNeg(value
): GenericFormula
Name | Type |
---|---|
value | GenericFormula |
profectus/src/game/formulas/operations.ts:28
â–¸ createPassthroughBinaryFormula(operation
): (value
: FormulaSource
, other
: FormulaSource
) => default
<[FormulaSource
, FormulaSource
]>
Name | Type |
---|---|
operation | (a : DecimalSource , b : DecimalSource ) => DecimalSource |
profectus/src/game/formulas/operations.ts:807
â–¸ integrateAcos(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:662
â–¸ integrateAcosh(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:774
â–¸ integrateAdd(stack
, lhs
, rhs
): default
<[FormulaSource
, FormulaSource
]>
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:41
â–¸ integrateAsin(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:642
â–¸ integrateAsinh(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:756
â–¸ integrateAtan(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:682
â–¸ integrateAtanh(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:794
â–¸ integrateCos(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:606
â–¸ integrateCosh(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:720
â–¸ integrateDiv(stack
, lhs
, rhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:174
â–¸ integrateExp(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:454
â–¸ integrateInnerAdd(stack
, lhs
, rhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:58
â–¸ integrateInnerSub(stack
, lhs
, rhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:105
â–¸ integrateLn(stack
, lhs
): default
<[GenericFormula
]>
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:341
â–¸ integrateLog(stack
, lhs
, rhs
): default
<[GenericFormula
, FormulaSource
]>
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:276
â–¸ integrateLog10(stack
, lhs
): default
<[GenericFormula
]>
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:241
â–¸ integrateLog2(stack
, lhs
): default
<[GenericFormula
]>
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:309
â–¸ integrateMul(stack
, lhs
, rhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:135
â–¸ integrateNeg(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:18
â–¸ integratePow(stack
, lhs
, rhs
): default
<[FormulaSource
]> | InternalFormula
<[FormulaSource
, FormulaSource
]>
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:364
â–¸ integratePow10(stack
, lhs
): default
<[FormulaSource
]>
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:389
â–¸ integratePowBase(stack
, lhs
, rhs
): default
<[FormulaSource
]> | InternalFormula
<[FormulaSource
, FormulaSource
]>
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:409
â–¸ integrateRecip(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:211
â–¸ integrateRoot(stack
, lhs
, rhs
): default
<[FormulaSource
]>
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:436
â–¸ integrateSin(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:588
â–¸ integrateSinh(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:702
â–¸ integrateSub(stack
, lhs
, rhs
): default
<[FormulaSource
, FormulaSource
]>
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:88
â–¸ integrateTan(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:624
â–¸ integrateTanh(stack
, lhs
): GenericFormula
Name | Type |
---|---|
stack | SubstitutionStack |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:738
â–¸ invertAcos(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:655
â–¸ invertAcosh(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:767
â–¸ invertAdd(value
, lhs
, rhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:32
â–¸ invertAsin(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:635
â–¸ invertAsinh(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:749
â–¸ invertAtan(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:675
â–¸ invertAtanh(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:787
â–¸ invertCos(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:599
â–¸ invertCosh(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:713
â–¸ invertDiv(value
, lhs
, rhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:165
â–¸ invertExp(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:447
â–¸ invertIteratedExp(value
, lhs
, height
, payload
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
height | FormulaSource |
payload | FormulaSource |
profectus/src/game/formulas/operations.ts:496
â–¸ invertLambertw(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:562
â–¸ invertLayeradd(value
, lhs
, diff
, base
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
diff | FormulaSource |
base | FormulaSource |
profectus/src/game/formulas/operations.ts:544
â–¸ invertLn(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:323
â–¸ invertLog(value
, lhs
, rhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:255
â–¸ invertLog10(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:222
â–¸ invertLog2(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:290
â–¸ invertMul(value
, lhs
, rhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:126
â–¸ invertNeg(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:11
â–¸ invertPow(value
, lhs
, rhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:355
â–¸ invertPow10(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:382
â–¸ invertPowBase(value
, lhs
, rhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:400
â–¸ invertRecip(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:204
â–¸ invertRoot(value
, lhs
, rhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:427
â–¸ invertSin(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:581
â–¸ invertSinh(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:695
â–¸ invertSlog(value
, lhs
, rhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:529
â–¸ invertSsqrt(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:569
â–¸ invertSub(value
, lhs
, rhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
rhs | FormulaSource |
profectus/src/game/formulas/operations.ts:79
â–¸ invertTan(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:617
â–¸ invertTanh(value
, lhs
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
lhs | FormulaSource |
profectus/src/game/formulas/operations.ts:731
â–¸ invertTetrate(value
, base
, height
, payload
): DecimalSource
Name | Type |
---|---|
value | DecimalSource |
base | FormulaSource |
height | FormulaSource |
payload | FormulaSource |
profectus/src/game/formulas/operations.ts:474
â–¸ iteratedLog(value
, lhs?
, times?
): default
Name | Type | Default value |
---|---|---|
value | DecimalSource | undefined |
lhs | DecimalSource | 10 |
times | DecimalSource | 2 |
profectus/src/game/formulas/operations.ts:515
â–¸ iteratedexp(value
, height?
, payload?
): default
Name | Type | Default value |
---|---|---|
value | DecimalSource | undefined |
height | DecimalSource | 2 |
payload | DecimalSource | undefined |
profectus/src/game/formulas/operations.ts:487
â–¸ layeradd(value
, diff
, base
): default
Name | Type |
---|---|
value | DecimalSource |
diff | DecimalSource |
base | DecimalSource |
profectus/src/game/formulas/operations.ts:539
â–¸ passthrough<T
>(value
): T
Name | Type |
---|---|
value | T |
profectus/src/game/formulas/operations.ts:7
â–¸ pentate(value
, height
, payload
): default
Name | Type |
---|---|
value | DecimalSource |
height | DecimalSource |
payload | DecimalSource |
profectus/src/game/formulas/operations.ts:576
â–¸ slog(value
, lhs?
): default
Name | Type | Default value |
---|---|---|
value | DecimalSource | undefined |
lhs | DecimalSource | 10 |
profectus/src/game/formulas/operations.ts:524
â–¸ tetrate(value
, height?
, payload?
): default
Name | Type | Default value |
---|---|---|
value | DecimalSource | undefined |
height | DecimalSource | 2 |
payload | DecimalSource | undefined |
Ƭ ConstantFormulaOptions: Object
Name | Type |
---|---|
inputs | [FormulaSource ] |
profectus/src/game/formulas/types.d.ts:41
Ƭ EvaluateFunction<T
>: (this
: InternalFormula
<T
>, ...inputs
: GuardedFormulasToDecimals
<T
>) => DecimalSource
Name |
---|
T |
â–¸ (this
, ...inputs
): DecimalSource
Name | Type |
---|---|
this | InternalFormula <T > |
...inputs | GuardedFormulasToDecimals <T > |
profectus/src/game/formulas/types.d.ts:20
Ƭ FormulaOptions<T
>: VariableFormulaOptions
| ConstantFormulaOptions
| GeneralFormulaOptions
<T
>
Name | Type |
---|---|
T | extends [FormulaSource ] | FormulaSource [] |
profectus/src/game/formulas/types.d.ts:52
Ƭ FormulaSource: ProcessedComputable
<DecimalSource
> | GenericFormula
profectus/src/game/formulas/types.d.ts:7
Ƭ FormulasToDecimals<T
>: { [K in keyof T]: DecimalSource }
Name | Type |
---|---|
T | extends FormulaSource [] |
profectus/src/game/formulas/types.d.ts:71
Ƭ GeneralFormulaOptions<T
>: Object
Name | Type |
---|---|
T | extends [FormulaSource ] | FormulaSource [] |
Name | Type |
---|---|
applySubstitution? | SubstitutionFunction <T > |
evaluate | EvaluateFunction <T > |
inputs | T |
integrate? | IntegrateFunction <T > |
integrateInner? | IntegrateFunction <T > |
invert? | InvertFunction <T > |
profectus/src/game/formulas/types.d.ts:44
Ƭ GenericFormula: InternalFormula
<any
>
profectus/src/game/formulas/types.d.ts:6
Ƭ GuardedFormulasToDecimals<T
>: TupleGuard
<T
>
Name | Type |
---|---|
T | extends FormulaSource [] |
profectus/src/game/formulas/types.d.ts:76
Ƭ IntegrableFormula: InvertibleFormula
& { calculateConstantOfIntegration
: NonNullable
<GenericFormula
["calculateConstantOfIntegration"
]> ; evaluateIntegral
: NonNullable
<GenericFormula
["evaluateIntegral"
]> ; getIntegralFormula
: NonNullable
<GenericFormula
["getIntegralFormula"
]> }
profectus/src/game/formulas/types.d.ts:11
Ƭ IntegrateFunction<T
>: (this
: InternalFormula
<T
>, stack
: SubstitutionStack
| undefined
, ...inputs
: T
) => GenericFormula
Name |
---|
T |
â–¸ (this
, stack
, ...inputs
): GenericFormula
Name | Type |
---|---|
this | InternalFormula <T > |
stack | SubstitutionStack | undefined |
...inputs | T |
profectus/src/game/formulas/types.d.ts:29
Ƭ InternalFormulaProperties<T
>: Object
Name | Type |
---|---|
T | extends [FormulaSource ] | FormulaSource [] |
Name | Type |
---|---|
applySubstitution? | SubstitutionFunction <T > |
innermostVariable? | ProcessedComputable <DecimalSource > |
inputs | T |
internalEvaluate? | EvaluateFunction <T > |
internalIntegrate? | IntegrateFunction <T > |
internalIntegrateInner? | IntegrateFunction <T > |
internalInvert? | InvertFunction <T > |
internalVariables | number |
profectus/src/game/formulas/types.d.ts:57
Ƭ InvertFunction<T
>: (this
: InternalFormula
<T
>, value
: DecimalSource
, ...inputs
: T
) => DecimalSource
Name |
---|
T |
â–¸ (this
, value
, ...inputs
): DecimalSource
Name | Type |
---|---|
this | InternalFormula <T > |
value | DecimalSource |
...inputs | T |
profectus/src/game/formulas/types.d.ts:24
Ƭ InvertibleFormula: GenericFormula
& { invert
: NonNullable
<GenericFormula
["invert"
]> }
profectus/src/game/formulas/types.d.ts:8
Ƭ InvertibleIntegralFormula: IntegrableFormula
& { invertIntegral
: NonNullable
<GenericFormula
["invertIntegral"
]> }
profectus/src/game/formulas/types.d.ts:16
Ƭ SubstitutionFunction<T
>: (this
: InternalFormula
<T
>, variable
: GenericFormula
, ...inputs
: T
) => GenericFormula
Name |
---|
T |
â–¸ (this
, variable
, ...inputs
): GenericFormula
Name | Type |
---|---|
this | InternalFormula <T > |
variable | GenericFormula |
...inputs | T |
profectus/src/game/formulas/types.d.ts:34
Ƭ SubstitutionStack: (value
: GenericFormula
) => GenericFormula
[] | undefined
profectus/src/game/formulas/types.d.ts:68
Ƭ TupleGuard<T
>: T
extends any
[] ? FormulasToDecimals
<T
> : never
Name | Type |
---|---|
T | extends any [] |
profectus/src/game/formulas/types.d.ts:75
Ƭ VariableFormulaOptions: Object
Name | Type |
---|---|
variable | ProcessedComputable <DecimalSource > |
• BaseLayer: Object
The properties that are added onto a processed LayerOptions to create a Layer
Name | Type | Description |
---|---|---|
emit | <K>(...args : [K , ...Parameters<LayerEvents[K]>[]]) => void | A function to emit a LayerEvents event to this layer. |
emitter | Emitter <LayerEvents > | An emitter for sending LayerEvents events for this layer. |
id | string | The ID of the layer. Populated from the createLayer parameters. Used for saving and tracking open tabs. |
minimized | Persistent <boolean > | A persistent ref tracking if the tab is minimized or not. |
nodes | Ref <Record <string , undefined | FeatureNode >> | A map of FeatureNodes present in this layer's ContextComponent component. |
on | (...args : [event: keyof LayerEvents, cb: Function | Function | Function]) => Unsubscribe | A function to register an event listener on emitter. |
profectus/src/game/layers.tsx:148
• FeatureNode: Object
A feature's node in the DOM that has its size tracked.
Name | Type |
---|---|
element | HTMLElement |
observer | MutationObserver |
rect | DOMRect |
profectus/src/game/layers.tsx:28
• LayerEvents: Object
All types of events able to be sent or emitted from a layer's emitter.
Name | Type |
---|---|
postUpdate | (diff : number ) => void |
preUpdate | (diff : number ) => void |
update | (diff : number ) => void |
profectus/src/game/layers.tsx:55
• LayerOptions: Object
An object that configures a Layer. Even moreso than features, the developer is expected to include extra properties in this object. All Persistent refs must be included somewhere within the layer object.
Name | Type | Description |
---|---|---|
classes? | Computable <Record <string , boolean >> | An object of classes that should be applied to the display. |
color? | Computable <string > | The color of the layer, used to theme the entire layer's display. |
display | Computable <CoercableComponent > | The layout of this layer's features. When the layer is open in game/player.PlayerData.tabs, this is the content that is displayed. |
forceHideGoBack? | Computable <boolean > | Whether or not to force the go back button to be hidden. If true, go back will be hidden regardless of data/projInfo.allowGoBack. |
minWidth? | Computable <string | number > | A CSS min-width value that is applied to the layer. Can be a number, in which case the unit is assumed to be px. Defaults to 600px. |
minimizable? | Computable <boolean > | Whether or not the layer can be minimized. Defaults to true. |
minimizedDisplay? | Computable <CoercableComponent > | The layout of this layer's features. When the layer is open in game/player.PlayerData.tabs, but the tab is Layer.minimized this is the content that is displayed. |
name? | Computable <string > | The name of the layer, used on minimized tabs. Defaults to id. |
style? | Computable <StyleValue > | Styles that should be applied to the display. |
profectus/src/game/layers.tsx:107
• Position: Object
An object representing the position of some entity.
Name | Type | Description |
---|---|---|
x | number | The X component of the entity's position. |
y | number | The Y component of the entity's position. |
profectus/src/game/layers.tsx:95
Ƭ GenericLayer: Replace
<Layer
<LayerOptions
>, { minWidth
: ProcessedComputable
<number
> ; minimizable
: ProcessedComputable
<boolean
> ; name
: ProcessedComputable
<string
> }>
A type that matches any valid Layer object.
profectus/src/game/layers.tsx:184
Ƭ Layer<T
>: Replace
<T
& BaseLayer
, { classes
: GetComputableType
<T
["classes"
]> ; color
: GetComputableType
<T
["color"
]> ; display
: GetComputableType
<T
["display"
]> ; forceHideGoBack
: GetComputableType
<T
["forceHideGoBack"
]> ; minWidth
: GetComputableTypeWithDefault
<T
["minWidth"
], 600
> ; minimizable
: GetComputableTypeWithDefault
<T
["minimizable"
], true
> ; minimizedDisplay
: GetComputableType
<T
["minimizedDisplay"
]> ; name
: GetComputableTypeWithDefault
<T
["name"
], string
> ; style
: GetComputableType
<T
["style"
]> }>
An unit of game content. Displayed to the user as a tab or modal.
Name | Type |
---|---|
T | extends LayerOptions |
profectus/src/game/layers.tsx:168
• Const
BoundsInjectionKey: InjectionKey
<Ref
<DOMRect
| undefined
>>
An injection key that a ContextComponent will use to provide a ref to a bounding rect of the Context.
profectus/src/game/layers.tsx:52
• Const
NodesInjectionKey: InjectionKey
<Ref
<Record
<string
, FeatureNode
| undefined
>>>
An injection key that a ContextComponent will use to provide a ref to a map of all currently registered FeatureNodes.
profectus/src/game/layers.tsx:47
• Const
RegisterNodeInjectionKey: InjectionKey
<(id
: string
, element
: HTMLElement
) => void
>
An injection key that a ContextComponent will use to provide a function that registers a FeatureNode with the given id and HTML element.
profectus/src/game/layers.tsx:37
• Const
UnregisterNodeInjectionKey: InjectionKey
<(id
: string
) => void
>
An injection key that a ContextComponent will use to provide a function that unregisters a FeatureNode with the given id.
profectus/src/game/layers.tsx:42
• Const
addingLayers: string
[] = []
When creating layers, this array stores the layers currently being created, as a stack.
profectus/src/game/layers.tsx:200
• Const
layers: Record
<string
, Readonly
<GenericLayer
> | undefined
>
A reference to all the current layers. It is shallow reactive so it will update when layers are added or removed, but not interfere with the existing refs within each layer.
profectus/src/game/layers.tsx:77
• Const
persistentRefs: Record
<string
, Set
<Persistent
>> = {}
When creating layers, this object a map of layer ID to a set of any created persistent refs in order to check they're all included in the final layer object.
profectus/src/game/layers.tsx:196
â–¸ addLayer(layer
, player
): void
Enables a layer object, so it will be updated every tick. Note that accessing a layer/its properties does NOT require it to be enabled. For dynamic layers you can call this function and removeLayer as necessary. Just make sure getInitialLayers will provide an accurate list of layers based on the player data object. For static layers just make getInitialLayers return all the layers.
Name | Type | Description |
---|---|---|
layer | GenericLayer | The layer to add. |
player | Object | The player data object, which will have a data object for this layer. |
player.layers? | Record <string , Record <string , unknown >> | - |
void
profectus/src/game/layers.tsx:284
â–¸ createLayer<T
>(id
, optionsFunc
): Layer
<T
>
Lazily creates a layer with the given options.
Name | Type |
---|---|
T | extends LayerOptions |
Name | Type | Description |
---|---|---|
id | string | The ID this layer will have. See id. |
optionsFunc | OptionsFunc <T , BaseLayer > | Layer options. |
Layer
<T
>
profectus/src/game/layers.tsx:206
â–¸ getLayer<T
>(layerID
): T
Convenience method for getting a layer by its ID with correct typing.
Name | Type |
---|---|
T | extends GenericLayer |
Name | Type | Description |
---|---|---|
layerID | string | The ID of the layer to get. |
T
profectus/src/game/layers.tsx:311
â–¸ reloadLayer(layer
): void
Convenience method for removing and immediately re-adding a layer. This is useful for layers with dynamic content, to ensure persistent refs are correctly configured.
Name | Type | Description |
---|---|---|
layer | GenericLayer | Layer to remove and then re-add |
void
profectus/src/game/layers.tsx:332
â–¸ removeLayer(layer
): void
Disables a layer, so it will no longer be updated every tick. Note that accessing a layer/its properties does NOT require it to be enabled.
Name | Type | Description |
---|---|---|
layer | GenericLayer | The layer to remove. |
void
profectus/src/game/layers.tsx:320
â–¸ setupLayerModal(layer
): Object
Utility function for creating a modal that display's a display. Returns the modal itself, which can be rendered anywhere you need, as well as a function to open the modal.
Name | Type | Description |
---|---|---|
layer | GenericLayer | The layer to display in the modal. |
Object
Name | Type |
---|---|
modal | JSXFunction |
openModal | VoidFunction |
• AdditiveModifierOptions: Object
An object that configures an additive modifier via createAdditiveModifier.
Name | Type | Description |
---|---|---|
addend | Computable <DecimalSource > | The amount to add to the input value. |
description? | Computable <CoercableComponent > | Description of what this modifier is doing. |
enabled? | Computable <boolean > | A computable that will be processed and passed directly into the returned modifier. |
smallerIsBetter? | boolean | Determines if numbers larger or smaller than 0 should be displayed as red. |
profectus/src/game/modifiers.tsx:53
• ExponentialModifierOptions: Object
An object that configures an exponential modifier via createExponentialModifier.
Name | Type | Description |
---|---|---|
description? | Computable <CoercableComponent > | Description of what this modifier is doing. |
enabled? | Computable <boolean > | A computable that will be processed and passed directly into the returned modifier. |
exponent | Computable <DecimalSource > | The amount to raise the input value to the power of. |
smallerIsBetter? | boolean | Determines if numbers larger or smaller than 1 should be displayed as red. |
supportLowNumbers? | boolean | Add 1 before calculating, then remove it afterwards. This prevents low numbers from becoming lower. |
profectus/src/game/modifiers.tsx:182
• Modifier: Object
An object that can be used to apply or unapply some modification to a number. Being reversible requires the operation being invertible, but some features may rely on that. Descriptions can be optionally included for displaying them to the player. The built-in modifier creators are designed to display the modifiers using createModifierSection.
Name | Type | Description |
---|---|---|
apply | (gain : DecimalSource ) => DecimalSource | Applies some operation on the input and returns the result. |
description? | ProcessedComputable <CoercableComponent > | A description of this modifier. See createModifierSection. |
enabled? | ProcessedComputable <boolean > | Whether or not this modifier should be considered enabled. Typically for use with modifiers passed into createSequentialModifier. |
getFormula? | (gain : FormulaSource ) => GenericFormula | Get a formula for this modifier. Required by some features. |
invert? | (gain : DecimalSource ) => DecimalSource | Reverses the operation applied by the apply property. Required by some features. |
profectus/src/game/modifiers.tsx:22
• ModifierSectionOptions: Object
An object that configures a modifier section via createModifierSection.
Name | Type | Description |
---|---|---|
base? | DecimalSource | The base value that'll be passed into the modifier. Defaults to 1. |
baseText? | CoercableComponent | The label to use for the base value. Defaults to "Base". |
modifier | WithRequired <Modifier , "description" > | The modifier to render. |
smallerIsBetter? | boolean | Determines if numbers larger or smaller than the base should be displayed as red. |
subtitle? | string | Smaller text that appears in the header after the title. |
title | string | The header for the section. |
unit? | string | The unit of the value being modified, if any. |
profectus/src/game/modifiers.tsx:324
• MultiplicativeModifierOptions: Object
An object that configures an multiplicative modifier via createMultiplicativeModifier.
Name | Type | Description |
---|---|---|
description? | Computable <CoercableComponent > | Description of what this modifier is doing. |
enabled? | Computable <boolean > | A computable that will be processed and passed directly into the returned modifier. |
multiplier | Computable <DecimalSource > | The amount to multiply the input value by. |
smallerIsBetter? | boolean | Determines if numbers larger or smaller than 1 should be displayed as red. |
profectus/src/game/modifiers.tsx:118
Ƭ ModifierFromOptionalParams<T
, S
>: T
extends undefined
? S
extends undefined
? Omit
<WithRequired
<Modifier
, "invert"
| "getFormula"
>, "description"
| "enabled"
> : Omit
<WithRequired
<Modifier
, "invert"
| "enabled"
| "getFormula"
>, "description"
> : S
extends undefined
? Omit
<WithRequired
<Modifier
, "invert"
| "description"
| "getFormula"
>, "enabled"
> : WithRequired
<Modifier
, "invert"
| "enabled"
| "description"
| "getFormula"
>
Utility type used to narrow down a modifier type that will have a description and/or enabled property based on optional parameters, T and S (respectively).
Name |
---|
T |
S |
profectus/src/game/modifiers.tsx:44
â–¸ createAdditiveModifier<T
>(optionsFunc
): ModifierFromOptionalParams
<T
["description"
], T
["enabled"
]>
Create a modifier that adds some value to the input value.
Name | Type |
---|---|
T | extends AdditiveModifierOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T > | Additive modifier options. |
ModifierFromOptionalParams
<T
["description"
], T
["enabled"
]>
profectus/src/game/modifiers.tsx:68
â–¸ createExponentialModifier<T
>(optionsFunc
): ModifierFromOptionalParams
<T
["description"
], T
["enabled"
]>
Create a modifier that raises the input value to the power of some value.
Name | Type |
---|---|
T | extends ExponentialModifierOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T > | Exponential modifier options. |
ModifierFromOptionalParams
<T
["description"
], T
["enabled"
]>
profectus/src/game/modifiers.tsx:199
â–¸ createModifierSection(options
): Element
Create a JSX element that displays a modifier. Intended to be used with the output from createSequentialModifier.
Name | Type | Description |
---|---|---|
options | ModifierSectionOptions | Modifier section options. |
Element
profectus/src/game/modifiers.tsx:346
â–¸ createMultiplicativeModifier<T
>(optionsFunc
): ModifierFromOptionalParams
<T
["description"
], T
["enabled"
]>
Create a modifier that multiplies the input value by some value.
Name | Type |
---|---|
T | extends MultiplicativeModifierOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T > | Multiplicative modifier options. |
ModifierFromOptionalParams
<T
["description"
], T
["enabled"
]>
profectus/src/game/modifiers.tsx:133
â–¸ createSequentialModifier<T
, S
>(modifiersFunc
): S
Takes an array of modifiers and applies and reverses them in order. Modifiers that are not enabled will not be applied nor reversed. Also joins their descriptions together.
See
Name | Type |
---|---|
T | extends Modifier [] |
S | T extends WithRequired <Modifier , "invert" >[] ? WithRequired <Modifier , "description" | "invert" > : Omit <WithRequired <Modifier , "description" >, "invert" > |
Name | Type | Description |
---|---|---|
modifiersFunc | () => T | The modifiers to perform sequentially. |
S
â–¸ createDismissableNotify(element
, shouldNotify
): Ref
<boolean
>
Create a boolean ref that will automatically be set based on the given condition, but also dismissed when hovering over a given element, typically the element where acting upon the notification would take place.
Name | Type | Description |
---|---|---|
element | VueFeature | The element that will dismiss the notification on hover. |
shouldNotify | Ref <boolean > | () => boolean | A function or ref that determines if the notif should be active currently or not. |
Ref
<boolean
>
profectus/src/game/notifications.ts:36
â–¸ getHighNotifyStyle(): Object
Utility function to call getNotifyStyle with "high importance" parameters.
Object
Name | Type |
---|---|
borderColor | string |
boxShadow | string |
transform | string |
zIndex | number |
profectus/src/game/notifications.ts:27
â–¸ getNotifyStyle(color?
, strength?
): Object
Gives a CSSProperties object that makes an object glow, to bring focus to it. Default values are for a "soft" white notif effect.
Name | Type | Default value | Description |
---|---|---|---|
color | string | "white" | The color of the glow effect. |
strength | string | "8px" | The strength of the glow effect - affects its spread. |
Object
Name | Type |
---|---|
borderColor | string |
boxShadow | string |
transform | string |
zIndex | number |
Ƭ NonPersistent<T
>: WritableComputedRef
<T
> & { [DefaultValue]
: T
}
Name | Type |
---|---|
T | extends State = State |
profectus/src/game/persistence.ts:37
profectus/src/game/persistence.ts:97
Ƭ Persistent<T
>: Ref
<T
> & { [CheckNaN]
: boolean
; [DefaultValue]
: T
; [Deleted]
: boolean
; [NonPersistent]
: NonPersistent
<T
> ; [PersistentState]
: Ref
<T
> ; [SaveDataPath]
: string
[] | undefined
; [StackTrace]
: string
; value
: T
}
A Ref that has been augmented with properties to allow it to be saved and loaded within the player save data object.
Name | Type |
---|---|
T | extends State = State |
profectus/src/game/persistence.ts:70
Ƭ State: string
| number
| boolean
| DecimalSource
| { [key: string]
: State
; } | { [key: number]
: State
; }
This is a union of things that should be safely stringifiable without needing special processes or knowing what to load them in as.
profectus/src/game/persistence.ts:59
• Const
CheckNaN: typeof CheckNaN
A symbol used in Persistent objects.
See
profectus/src/game/persistence.ts:47
• Const
DefaultValue: typeof DefaultValue
A symbol used in Persistent objects.
See
profectus/src/game/persistence.ts:22
• Const
Deleted: typeof Deleted
A symbol used in Persistent objects.
See
profectus/src/game/persistence.ts:32
• Const
NonPersistent: typeof NonPersistent
A symbol used in Persistent objects.
See
profectus/src/game/persistence.ts:37
profectus/src/game/persistence.ts:97
• Const
PersistentState: typeof PersistentState
A symbol used in Persistent objects.
See
profectus/src/game/persistence.ts:17
• Const
SaveDataPath: typeof SaveDataPath
A symbol used in Persistent objects.
See
profectus/src/game/persistence.ts:42
• Const
SkipPersistence: typeof SkipPersistence
A symbol used to flag objects that should not be checked for persistent values.
profectus/src/game/persistence.ts:52
• Const
StackTrace: typeof StackTrace
A symbol used in Persistent objects.
See
profectus/src/game/persistence.ts:27
â–¸ deletePersistent(persistent
): void
Mark a Persistent as deleted, so it won't be saved and loaded. Since persistent refs must be created during a layer's options func, features can not create persistent refs after evaluating their own options funcs. As a result, it must create any persistent refs it might need. This function can then be called after the options func is evaluated to mark the persistent ref to not be saved or loaded.
Name | Type |
---|---|
persistent | Persistent <State > |
void
profectus/src/game/persistence.ts:248
â–¸ isPersistent(value
): value is Persistent<State>
Type guard for whether an arbitrary value is a persistent ref
Name | Type | Description |
---|---|---|
value | unknown | The value that may or may not be a persistent ref |
value is Persistent<State>
profectus/src/game/persistence.ts:198
â–¸ noPersist<T
, S
>(persistent
): T
[typeof NonPersistent
]
Unwraps the non-persistent ref inside of persistent refs, to be passed to other features without duplicating values in the save data object.
Name | Type |
---|---|
T | extends Ref <S , T > & { [CheckNaN] : boolean ; [DefaultValue] : S ; [Deleted] : boolean ; [NonPersistent] : NonPersistent <S > ; [PersistentState] : Ref <S > ; [SaveDataPath] : undefined | string [] ; [StackTrace] : string ; value : S } |
S | extends State |
Name | Type | Description |
---|---|---|
persistent | T | The persistent ref to unwrap, or an object to ignore all persistent refs within |
T
[typeof NonPersistent
]
â–¸ noPersist<T
>(persistent
): T
Name | Type |
---|---|
persistent | T |
profectus/src/game/persistence.ts:206
profectus/src/game/persistence.ts:209
profectus/src/game/persistence.ts:210
â–¸ persistent<T
>(defaultValue
, checkNaN?
): Persistent
<T
>
Create a persistent ref, which can be saved and loaded. All (non-deleted) persistent refs must be included somewhere within the layer object returned by that layer's options func.
Name | Type |
---|---|
T | extends State |
Name | Type | Default value | Description |
---|---|---|---|
defaultValue | T | Ref <T > | undefined | The value the persistent ref should start at on fresh saves or when reset. |
checkNaN | boolean | true | Whether or not to check this ref for being NaN on set. Only use on refs that should always be DecimalSources. |
Persistent
<T
>
• Player: Object
The player save data object.
Name | Type | Description |
---|---|---|
autosave | boolean | Whether or not to automatically save every couple of seconds and on tab close. |
devSpeed | null | number | A multiplier for time passing. Set to 0 when the game is paused. |
id | string | The ID of this save. |
keepGoing | boolean | Whether or not to continue playing after hasWon is true. |
layers | Record <string , LayerData <unknown >> | A dictionary of layer save data. |
modID | string | The ID of this project, to make sure saves aren't imported into the wrong project. |
modVersion | string | The version of the project this save was created by. Used for upgrading saves for new versions. |
name | string | The display name of this save. |
offlineProd | boolean | Whether or not to apply offline time when loading this save. |
offlineTime | null | number | How much offline time has been accumulated and not yet processed. |
tabs | string [] | The open tabs. |
time | number | The current time this save was last opened at, in ms since the unix epoch. |
timePlayed | number | How long, in ms, this game has been played. |
profectus/src/game/player.ts:5
Ƭ LayerData<T
>: { [P in keyof T]?: T[P] extends (infer U)[] ? Record<string, LayerData<U>> : T[P] extends Record<string, never> ? never : T[P] extends Ref<infer S> ? S : T[P] extends object ? LayerData<T[P]> : T[P] }
A layer's save data. Automatically unwraps refs.
Name |
---|
T |
profectus/src/game/player.ts:35
• default: Object
Name | Type | Description |
---|---|---|
autosave | boolean | Whether or not to automatically save every couple of seconds and on tab close. |
devSpeed | null | number | A multiplier for time passing. Set to 0 when the game is paused. |
id | string | The ID of this save. |
keepGoing | boolean | Whether or not to continue playing after hasWon is true. |
layers | Record <string , LayerData <unknown >> | A dictionary of layer save data. |
modID | string | The ID of this project, to make sure saves aren't imported into the wrong project. |
modVersion | string | The version of the project this save was created by. Used for upgrading saves for new versions. |
name | string | The display name of this save. |
offlineProd | boolean | Whether or not to apply offline time when loading this save. |
offlineTime | null | number | How much offline time has been accumulated and not yet processed. |
tabs | string [] | The open tabs. |
time | number | The current time this save was last opened at, in ms since the unix epoch. |
timePlayed | number | How long, in ms, this game has been played. |
profectus/src/game/player.ts:63
â–¸ stringifySave(player
): string
Convert a player save data object into a JSON string. Unwraps refs.
Name | Type |
---|---|
player | Player |
string
• CostRequirementOptions: Object
An object that configures a Requirement based on a resource cost.
Name | Type | Description |
---|---|---|
cost | Computable <DecimalSource > | GenericFormula | The amount of resource that must be met for this requirement. You can pass a formula, in which case maximizing will work out of the box (assuming its invertible and, for more accurate calculations, its integral is invertible). If you don't pass a formula then you can still support maximizing by passing a custom pay function. |
pay? | (amount? : DecimalSource ) => void | Pass-through to pay. May be required for maximizing support. See cost for restrictions on maximizing support. |
requiresPay? | Computable <boolean > | Pass-through to requiresPay. If not set to false, the default pay function will remove cost from resource. |
resource | Resource <DecimalSource > | The resource that will be checked for meeting the cost. |
spendResources? | Computable <boolean > | When calculating multiple levels to be handled at once, whether it should consider resources used for each level as spent. Setting this to false causes calculations to be faster with larger numbers and supports more math functions. See |
visibility? | Computable <boolean | Visible | None > | Pass-through to visibility. |
profectus/src/game/requirements.tsx:68
• Requirement: Object
An object that can be used to describe a requirement to perform some purchase or other action.
See
Name | Type | Description |
---|---|---|
canMaximize? | ProcessedComputable <boolean > | Whether or not this requirement can have multiple levels of requirements that can be met at once. Requirement is assumed to not have multiple levels if this property not present. |
display? | (amount? : DecimalSource ) => Element | The display for this specific requirement. Required if visibility can be Visibility.Visible. |
partialDisplay? | (amount? : DecimalSource ) => Element | The display for this specific requirement. This is used for displays multiple requirements condensed. Required if visibility can be Visibility.Visible. |
pay? | (amount? : DecimalSource ) => void | Perform any effects to the game state that should happen when the requirement gets triggered. |
requirementMet | ProcessedComputable <boolean | DecimalSource > | Whether or not this requirement has been met. |
requiresPay | ProcessedComputable <boolean > | Whether or not this requirement will need to affect the game state when whatever is using this requirement gets triggered. |
visibility | ProcessedComputable <boolean | Visible | None > | Whether or not this requirement should be displayed in Vue Features. displayRequirements will respect this property. |
profectus/src/game/requirements.tsx:30
Ƭ CostRequirement: Replace
<Requirement
& CostRequirementOptions
, { canMaximize
: ProcessedComputable
<boolean
> ; cost
: ProcessedComputable
<DecimalSource
> | GenericFormula
; requiresPay
: ProcessedComputable
<boolean
> ; spendResources
: ProcessedComputable
<boolean
> ; visibility
: ProcessedComputable
<Visible
| None
| boolean
> }>
profectus/src/game/requirements.tsx:97
Ƭ Requirements: Requirement
| Requirement
[]
Utility type for accepting 1 or more Requirements.
profectus/src/game/requirements.tsx:65
â–¸ createBooleanRequirement(requirement
, display?
): Requirement
Creates a requirement based on a true/false value
Name | Type | Description |
---|---|---|
requirement | Computable <boolean > | The boolean requirement to use |
display? | CoercableComponent | How to display this requirement to the user |
profectus/src/game/requirements.tsx:226
â–¸ createCostRequirement<T
>(optionsFunc
): CostRequirement
Lazily creates a requirement with the given options, that is based on meeting an amount of a resource.
Name | Type |
---|---|
T | extends CostRequirementOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T > | Cost requirement options. |
profectus/src/game/requirements.tsx:112
â–¸ createVisibilityRequirement(feature
): Requirement
Utility function for creating a requirement that a specified vue feature is visible
Name | Type | Description |
---|---|---|
feature | Object | The feature to check the visibility of |
feature.visibility | ProcessedComputable <boolean | Visibility > | - |
profectus/src/game/requirements.tsx:211
â–¸ displayRequirements(requirements
, amount?
): Element
Utility function for display 1+ requirements compactly.
Name | Type | Default value | Description |
---|---|---|---|
requirements | Requirements | undefined | The 1+ requirements to display |
amount | DecimalSource | 1 | The amount of levels earned to be displayed |
Element
profectus/src/game/requirements.tsx:273
â–¸ maxRequirementsMet(requirements
): DecimalSource
Calculates the maximum number of levels that could be acquired with the current requirement states. True/false requirements will be counted as Infinity or 0.
Name | Type | Description |
---|---|---|
requirements | Requirements | The 1+ requirements to check |
profectus/src/game/requirements.tsx:255
â–¸ payByDivision(this
, amount?
): void
Name | Type |
---|---|
this | CostRequirement |
amount? | DecimalSource |
profectus/src/game/requirements.tsx:325
â–¸ payByReset(overrideDefaultValue?
): (this
: CostRequirement
) => void
Name | Type |
---|---|
overrideDefaultValue? | DecimalSource |
profectus/src/game/requirements.tsx:337
â–¸ payRequirements(requirements
, amount?
): void
Utility function for paying the costs for 1+ requirements
Name | Type | Default value | Description |
---|---|---|---|
requirements | Requirements | undefined | The 1+ requirements to pay |
amount | DecimalSource | 1 | How many levels to pay for |
void
profectus/src/game/requirements.tsx:317
â–¸ requirementsMet(requirements
): boolean
Utility for checking if 1+ requirements are all met
Name | Type | Description |
---|---|---|
requirements | Requirements | The 1+ requirements to check |
boolean
• Settings: Object
The player's settings object.
Name | Type | Description |
---|---|---|
active | string | The ID of the active save. |
alignUnits | boolean | Whether to align modifiers to the unit. |
hideChallenges | boolean | - |
msDisplay | AchievementDisplay | - |
saves | string [] | The IDs of all created saves. |
showTPS | boolean | Whether or not to show the current ticks per second in the lower left corner of the page. |
theme | Themes | The current theme to display the game in. |
unthrottled | boolean | Whether or not to cap the project at 20 ticks per second. |
profectus/src/game/settings.ts:10
profectus/src/features/achievements/achievement.tsx:292
profectus/src/features/challenges/challenge.tsx:365
• default: Settings
The player settings object. Stores data that persists across all saves. Automatically saved to localStorage whenever changed.
profectus/src/game/settings.ts:56
• Const
gameComponents: CoercableComponent
[]
A list of components to add to the root of the page.
profectus/src/game/settings.ts:119
• Const
infoComponents: CoercableComponent
[]
A list of components to show in the info modal.
profectus/src/game/settings.ts:112
• Const
settingFields: CoercableComponent
[]
A list of fields to append to the settings modal.
profectus/src/game/settings.ts:105
â–¸ hardResetSettings(): void
A function that erases all player settings, including all saves.
void
profectus/src/game/settings.ts:58
â–¸ loadSettings(): void
Loads the player settings from localStorage. Calls the GlobalEvents.loadSettings event for custom properties to be included. Custom properties should be added by the file they relate to, so they won't be included if the file is tree shaken away. Custom properties should also register the field to modify said setting using registerSettingField.
void
profectus/src/game/settings.ts:77
â–¸ registerGameComponent(component
): void
Register a component to be displayed at the root of the page.
Name | Type |
---|---|
component | CoercableComponent |
void
profectus/src/game/settings.ts:121
â–¸ registerInfoComponent(component
): void
Register a component to be displayed in the info modal.
Name | Type |
---|---|
component | CoercableComponent |
void
profectus/src/game/settings.ts:114
â–¸ registerSettingField(component
): void
Register a field to be displayed in the settings modal.
Name | Type |
---|---|
component | CoercableComponent |
void
• Transient: Object
An object of global data that is not persistent.
Name | Type | Description |
---|---|---|
NaNPath? | string [] | The location within the player save data object of the NaN value. |
NaNPersistent? | Persistent <DecimalSource > | The ref that was being set to NaN. |
hasNaN | boolean | Whether or not a NaN value has been detected and undealt with. |
lastTenTicks | number [] | A list of the duration, in ms, of the last 10 game ticks. Used for calculating TPS. |
• default: ShallowReactive
<Transient
>
The global transient state object.
• default: Object
The Decimal's value is simply mantissa * 10^exponent.
Name | Type |
---|---|
constructor | (value? : DecimalSource ) => default |
layer | number |
mag | number |
sign | number |
dInf | default |
dNaN | default |
dNegInf | default |
dNegOne | default |
dNumberMax | default |
dNumberMin | default |
dOne | default |
dTen | default |
dTwo | default |
dZero | default |
fromStringCache | LRUCache <string , default > |
get e() | number |
get exponent() | number |
get m() | number |
get mantissa() | number |
get s() | number |
abs | () => default |
absLog10 | () => default |
acos | () => default |
acosh | () => default |
add | (value : DecimalSource ) => default |
ascensionPenalty | (ascensions : DecimalSource ) => default |
asin | () => default |
asinh | () => default |
atan | () => default |
atanh | () => default |
cbrt | () => default |
ceil | () => default |
clamp | (min : DecimalSource , max : DecimalSource ) => default |
clampMax | (max : DecimalSource ) => default |
clampMin | (min : DecimalSource ) => default |
cmp | (value : DecimalSource ) => CompareResult |
cmp_tolerance | (value : DecimalSource , tolerance : number ) => CompareResult |
cmpabs | (value : DecimalSource ) => CompareResult |
compare | (value : DecimalSource ) => CompareResult |
compare_tolerance | (value : DecimalSource , tolerance : number ) => CompareResult |
cos | () => default |
cosh | () => default |
cube | () => default |
div | (value : DecimalSource ) => default |
divide | (value : DecimalSource ) => default |
divideBy | (value : DecimalSource ) => default |
dividedBy | (value : DecimalSource ) => default |
egg | () => default |
eq | (value : DecimalSource ) => boolean |
eq_tolerance | (value : DecimalSource , tolerance? : number ) => boolean |
equals | (value : DecimalSource ) => boolean |
equals_tolerance | (value : DecimalSource , tolerance : number ) => boolean |
exp | () => default |
factorial | () => default |
floor | () => default |
fromComponents | (sign : number , layer : number , mag : number ) => default |
fromComponents_noNormalize | (sign : number , layer : number , mag : number ) => default |
fromDecimal | (value : default ) => default |
fromMantissaExponent | (mantissa : number , exponent : number ) => default |
fromMantissaExponent_noNormalize | (mantissa : number , exponent : number ) => default |
fromNumber | (value : number ) => default |
fromString | (value : string ) => default |
fromValue | (value : DecimalSource ) => default |
gamma | () => default |
greaterThan | (other : DecimalSource ) => boolean |
greaterThanOrEqualTo | (other : DecimalSource ) => boolean |
gt | (value : DecimalSource ) => boolean |
gt_tolerance | (value : DecimalSource , tolerance : number ) => boolean |
gte | (value : DecimalSource ) => boolean |
gte_tolerance | (value : DecimalSource , tolerance : number ) => boolean |
isFinite | () => boolean |
isNan | () => boolean |
iteratedexp | (height : number , payload : default ) => default |
iteratedlog | (base : DecimalSource , times : number ) => default |
lambertw | () => default |
layeradd | (diff : number , base : DecimalSource ) => default |
layeradd10 | (diff : DecimalSource ) => default |
lessThan | (other : DecimalSource ) => boolean |
lessThanOrEqualTo | (other : DecimalSource ) => boolean |
ln | () => default |
lngamma | () => default |
log | (base : DecimalSource ) => default |
log10 | () => default |
log2 | () => default |
logarithm | (base : DecimalSource ) => default |
lt | (value : DecimalSource ) => boolean |
lt_tolerance | (value : DecimalSource , tolerance : number ) => boolean |
lte | (value : DecimalSource ) => boolean |
lte_tolerance | (value : DecimalSource , tolerance : number ) => boolean |
magnitudeWithDecimalPlaces | (places : number ) => number |
mantissaWithDecimalPlaces | (places : number ) => number |
max | (value : DecimalSource ) => default |
maxabs | (value : DecimalSource ) => default |
min | (value : DecimalSource ) => default |
minabs | (value : DecimalSource ) => default |
minus | (value : DecimalSource ) => default |
mul | (value : DecimalSource ) => default |
multiply | (value : DecimalSource ) => default |
neg | () => default |
negate | () => default |
negated | () => default |
neq | (value : DecimalSource ) => boolean |
neq_tolerance | (value : DecimalSource , tolerance : number ) => boolean |
normalize | () => default |
notEquals | (value : DecimalSource ) => boolean |
notEquals_tolerance | (value : DecimalSource , tolerance : number ) => boolean |
pLog10 | () => default |
pentate | (height : number , payload : DecimalSource ) => default |
plus | (value : DecimalSource ) => default |
pow | (value : DecimalSource ) => default |
pow10 | () => default |
pow_base | (value : DecimalSource ) => default |
recip | () => default |
reciprocal | () => default |
reciprocate | () => default |
root | (value : DecimalSource ) => default |
round | () => default |
sgn | () => number |
sin | () => default |
sinh | () => default |
slog | (base : DecimalSource , iterations : number ) => default |
slog_internal | (base : DecimalSource ) => default |
sqr | () => default |
sqrt | () => default |
ssqrt | () => default |
sub | (value : DecimalSource ) => default |
subtract | (value : DecimalSource ) => default |
tan | () => default |
tanh | () => default |
tetrate | (height : number , payload : DecimalSource ) => default |
times | (value : DecimalSource ) => default |
toExponential | (places : number ) => string |
toFixed | (places : number ) => string |
toJSON | () => string |
toNumber | () => number |
toPrecision | (places : number ) => string |
toString | () => string |
toStringWithDecimalPlaces | (places : number ) => string |
trunc | () => default |
valueOf | () => string |
abs | (value : DecimalSource ) => default |
absLog10 | (value : DecimalSource ) => default |
acos | (value : DecimalSource ) => default |
acosh | (value : DecimalSource ) => default |
add | (value : DecimalSource , other : DecimalSource ) => default |
affordArithmeticSeries | (resourcesAvailable : DecimalSource , priceStart : DecimalSource , priceAdd : DecimalSource , currentOwned : DecimalSource ) => default |
affordArithmeticSeries_core | (resourcesAvailable : default , priceStart : default , priceAdd : default , currentOwned : default ) => default |
affordGeometricSeries | (resourcesAvailable : DecimalSource , priceStart : DecimalSource , priceRatio : DecimalSource , currentOwned : DecimalSource ) => default |
affordGeometricSeries_core | (resourcesAvailable : default , priceStart : default , priceRatio : default , currentOwned : DecimalSource ) => default |
asin | (value : DecimalSource ) => default |
asinh | (value : DecimalSource ) => default |
atan | (value : DecimalSource ) => default |
atanh | (value : DecimalSource ) => default |
cbrt | (value : DecimalSource ) => default |
ceil | (value : DecimalSource ) => default |
clamp | (value : DecimalSource , min : DecimalSource , max : DecimalSource ) => default |
clampMax | (value : DecimalSource , max : DecimalSource ) => default |
clampMin | (value : DecimalSource , min : DecimalSource ) => default |
cmp | (value : DecimalSource , other : DecimalSource ) => CompareResult |
cmp_tolerance | (value : DecimalSource , other : DecimalSource , tolerance : number ) => CompareResult |
cmpabs | (value : DecimalSource , other : DecimalSource ) => CompareResult |
compare | (value : DecimalSource , other : DecimalSource ) => CompareResult |
compare_tolerance | (value : DecimalSource , other : DecimalSource , tolerance : number ) => CompareResult |
cos | (value : DecimalSource ) => default |
cosh | (value : DecimalSource ) => default |
critical_section | (base : number , height : number , grid : number [][]) => number |
cube | (value : DecimalSource ) => default |
div | (value : DecimalSource , other : DecimalSource ) => default |
divide | (value : DecimalSource , other : DecimalSource ) => default |
efficiencyOfPurchase | (cost : DecimalSource , currentRpS : DecimalSource , deltaRpS : DecimalSource ) => default |
efficiencyOfPurchase_core | (cost : default , currentRpS : default , deltaRpS : default ) => default |
eq | (value : DecimalSource , other : DecimalSource ) => boolean |
eq_tolerance | (value : DecimalSource , other : DecimalSource , tolerance? : number ) => boolean |
equals | (value : DecimalSource , other : DecimalSource ) => boolean |
equals_tolerance | (value : DecimalSource , other : DecimalSource , tolerance? : number ) => boolean |
exp | (value : DecimalSource ) => default |
factorial | (value : DecimalSource , _other? : undefined ) => default |
floor | (value : DecimalSource ) => default |
fromComponents | (sign : number , layer : number , mag : number ) => default |
fromComponents_noNormalize | (sign : number , layer : number , mag : number ) => default |
fromDecimal | (value : default ) => default |
fromMantissaExponent | (mantissa : number , exponent : number ) => default |
fromMantissaExponent_noNormalize | (mantissa : number , exponent : number ) => default |
fromNumber | (value : number ) => default |
fromString | (value : string ) => default |
fromValue | (value : DecimalSource ) => default |
fromValue_noAlloc | (value : DecimalSource ) => Readonly <default > |
gamma | (value : DecimalSource , _other? : undefined ) => default |
gt | (value : DecimalSource , other : DecimalSource ) => boolean |
gt_tolerance | (value : DecimalSource , other : DecimalSource , tolerance : number ) => boolean |
gte | (value : DecimalSource , other : DecimalSource ) => boolean |
gte_tolerance | (value : DecimalSource , other : DecimalSource , tolerance : number ) => boolean |
isFinite | (value : DecimalSource ) => boolean |
isNaN | (value : DecimalSource ) => boolean |
iteratedexp | (value : DecimalSource , height : number , payload : default ) => default |
iteratedlog | (value : DecimalSource , base : DecimalSource , times : number ) => default |
lambertw | (value : DecimalSource ) => default |
layeradd | (value : DecimalSource , diff : number , base : DecimalSource ) => default |
layeradd10 | (value : DecimalSource , diff : DecimalSource ) => default |
ln | (value : DecimalSource ) => default |
lngamma | (value : DecimalSource , _other? : undefined ) => default |
log | (value : DecimalSource , base : DecimalSource ) => default |
log10 | (value : DecimalSource ) => default |
log2 | (value : DecimalSource ) => default |
logarithm | (value : DecimalSource , base : DecimalSource ) => default |
lt | (value : DecimalSource , other : DecimalSource ) => boolean |
lt_tolerance | (value : DecimalSource , other : DecimalSource , tolerance : number ) => boolean |
lte | (value : DecimalSource , other : DecimalSource ) => boolean |
lte_tolerance | (value : DecimalSource , other : DecimalSource , tolerance : number ) => boolean |
max | (value : DecimalSource , other : DecimalSource ) => default |
maxabs | (value : DecimalSource , other : DecimalSource ) => default |
min | (value : DecimalSource , other : DecimalSource ) => default |
minabs | (value : DecimalSource , other : DecimalSource ) => default |
minus | (value : DecimalSource , other : DecimalSource ) => default |
mul | (value : DecimalSource , other : DecimalSource ) => default |
multiply | (value : DecimalSource , other : DecimalSource ) => default |
neg | (value : DecimalSource ) => default |
negate | (value : DecimalSource ) => default |
negated | (value : DecimalSource ) => default |
neq | (value : DecimalSource , other : DecimalSource ) => boolean |
neq_tolerance | (value : DecimalSource , other : DecimalSource , tolerance : number ) => boolean |
notEquals | (value : DecimalSource , other : DecimalSource ) => boolean |
notEquals_tolerance | (value : DecimalSource , other : DecimalSource , tolerance : number ) => boolean |
pLog10 | (value : DecimalSource ) => default |
pentate | (value : DecimalSource , height : number , payload : DecimalSource ) => default |
plus | (value : DecimalSource , other : DecimalSource ) => default |
pow | (value : DecimalSource , other : DecimalSource ) => default |
pow10 | (value : DecimalSource ) => default |
pow_base | (value : DecimalSource , other : DecimalSource ) => default |
randomDecimalForTesting | (maxLayers : number ) => default |
recip | (value : DecimalSource ) => default |
reciprocal | (value : DecimalSource ) => default |
reciprocate | (value : DecimalSource ) => default |
root | (value : DecimalSource , other : DecimalSource ) => default |
round | (value : DecimalSource ) => default |
sgn | (value : DecimalSource ) => number |
sign | (value : DecimalSource ) => number |
sin | (value : DecimalSource ) => default |
sinh | (value : DecimalSource ) => default |
slog | (value : DecimalSource , base : number ) => default |
slog_critical | (base : number , height : number ) => number |
sqr | (value : DecimalSource ) => default |
sqrt | (value : DecimalSource ) => default |
ssqrt | (value : DecimalSource ) => default |
sub | (value : DecimalSource , other : DecimalSource ) => default |
subtract | (value : DecimalSource , other : DecimalSource ) => default |
sumArithmeticSeries | (numItems : DecimalSource , priceStart : DecimalSource , priceAdd : DecimalSource , currentOwned : DecimalSource ) => default |
sumArithmeticSeries_core | (numItems : default , priceStart : default , priceAdd : default , currentOwned : default ) => default |
sumGeometricSeries | (numItems : DecimalSource , priceStart : DecimalSource , priceRatio : DecimalSource , currentOwned : DecimalSource ) => default |
sumGeometricSeries_core | (numItems : DecimalSource , priceStart : default , priceRatio : default , currentOwned : DecimalSource ) => default |
tan | (value : DecimalSource ) => default |
tanh | (value : DecimalSource ) => default |
tetrate | (value : DecimalSource , height : number , payload : DecimalSource ) => default |
tetrate_critical | (base : number , height : number ) => number |
times | (value : DecimalSource , other : DecimalSource ) => default |
trunc | (value : DecimalSource ) => default |
profectus/src/lib/break_eternity.ts:346
Ƭ CompareResult: -1
| 0
| 1
profectus/src/lib/break_eternity.ts:5
Ƭ DecimalSource: default
| number
| string
• LRUCache<K
, V
>: Object
A LRU cache intended for caching pure functions.
Name |
---|
K |
V |
Name | Type |
---|---|
constructor | <K, V>(maxSize : number ) => LRUCache <K , V > |
first | undefined | ListNode <K , V > |
last | undefined | ListNode <K , V > |
map | Map <K , ListNode <K , V >> |
maxSize | number |
get size() | number |
get | (key : K ) => undefined | V |
set | (key : K , value : V ) => void |
• RegisterSWOptions: Object
Name | Type |
---|---|
immediate? | boolean |
onNeedRefresh? | () => void |
onOfflineReady? | () => void |
onRegisterError? | (error : any ) => void |
onRegistered? | (registration : undefined | ServiceWorkerRegistration ) => void |
profectus/src/lib/pwa-register.d.ts:4
â–¸ useRegisterSW(options?
): Object
Name | Type |
---|---|
options? | RegisterSWOptions |
Re-exports default
Ƭ DecimalSource: DecimalSource
profectus/src/util/bignum.ts:18
â–¸ commaFormat(num
, precision
): string
Name | Type |
---|---|
num | DecimalSource |
precision | number |
profectus/src/util/bignum.ts:8
â–¸ exponentialFormat(num
, precision
, mantissa?
): string
Name | Type | Default value |
---|---|---|
num | DecimalSource | undefined |
precision | number | undefined |
mantissa | boolean | true |
profectus/src/util/bignum.ts:7
â–¸ format(num
, precision?
, small?
): string
Name | Type |
---|---|
num | DecimalSource |
precision? | number |
small? | boolean |
profectus/src/util/bignum.ts:10
â–¸ formatSmall(x
, precision?
): string
Name | Type |
---|---|
x | DecimalSource |
precision? | number |
profectus/src/util/bignum.ts:14
â–¸ formatTime(seconds
): string
Name | Type |
---|---|
seconds | DecimalSource |
profectus/src/util/bignum.ts:12
â–¸ formatWhole(num
): string
Name | Type |
---|---|
num | DecimalSource |
profectus/src/util/bignum.ts:11
â–¸ invertOOM(x
): default
Name | Type |
---|---|
x | DecimalSource |
profectus/src/util/bignum.ts:15
â–¸ regularFormat(num
, precision
): string
Name | Type |
---|---|
num | DecimalSource |
precision | number |
profectus/src/util/bignum.ts:9
â–¸ toPlaces(x
, precision
, maxAccepted
): string
Name | Type |
---|---|
x | DecimalSource |
precision | number |
maxAccepted | DecimalSource |
Re-exports default
â–¸ commaFormat(num
, precision
): string
Name | Type |
---|---|
num | DecimalSource |
precision | number |
profectus/src/util/break_eternity.ts:28
â–¸ exponentialFormat(num
, precision
, mantissa?
): string
Name | Type | Default value |
---|---|---|
num | DecimalSource | undefined |
precision | number | undefined |
mantissa | boolean | true |
profectus/src/util/break_eternity.ts:9
â–¸ format(num
, precision?
, small?
): string
Name | Type |
---|---|
num | DecimalSource |
precision? | number |
small? | boolean |
profectus/src/util/break_eternity.ts:69
â–¸ formatSmall(x
, precision?
): string
Name | Type |
---|---|
x | DecimalSource |
precision? | number |
profectus/src/util/break_eternity.ts:185
â–¸ formatTime(seconds
): string
Name | Type |
---|---|
seconds | DecimalSource |
profectus/src/util/break_eternity.ts:130
â–¸ formatWhole(num
): string
Name | Type |
---|---|
num | DecimalSource |
profectus/src/util/break_eternity.ts:116
â–¸ invertOOM(x
): default
Name | Type |
---|---|
x | DecimalSource |
profectus/src/util/break_eternity.ts:189
â–¸ regularFormat(num
, precision
): string
Name | Type |
---|---|
num | DecimalSource |
precision | number |
profectus/src/util/break_eternity.ts:43
â–¸ toPlaces(x
, precision
, maxAccepted
): string
Name | Type |
---|---|
x | DecimalSource |
precision | number |
maxAccepted | DecimalSource |
• Direction: Object
Name | Type |
---|---|
Default | "Up" |
Down | "Down" |
Left | "Left" |
Right | "Right" |
Up | "Up" |
profectus/src/util/common.ts:21
Ƭ ArrayElements<T
>: T
extends ReadonlyArray
<infer S> ? S
: never
Name | Type |
---|---|
T | extends ReadonlyArray <unknown > |
profectus/src/util/common.ts:3
Ƭ WithRequired<T
, K
>: T
&
Name | Type |
---|---|
T | T |
K | extends keyof T |
profectus/src/util/common.ts:1
â–¸ camelToTitle(camel
): string
Name | Type |
---|---|
camel | string |
profectus/src/util/common.ts:9
â–¸ isFunction<T
, S
, R
>(functionOrValue
): functionOrValue is Function
Name | Type |
---|---|
functionOrValue | R | (...args : S ) => T |
Ƭ Computable<T
>: T
| Ref
<T
> | () => T
Name |
---|
T |
profectus/src/util/computed.ts:8
Ƭ ComputableKeysOf<T
>: Pick
<T
, { [K in keyof T]: T[K] extends Computable<unknown> ? K : never }[keyof T
]>
Name |
---|
T |
profectus/src/util/computed.ts:22
Ƭ GetComputableType<T
>: T
extends { [DoNotCache]
: true
} ? T
: T
extends () => infer S ? Ref
<S
> : undefined
extends T
? undefined
: T
Name |
---|
T |
profectus/src/util/computed.ts:10
Ƭ GetComputableTypeWithDefault<T
, S
>: undefined
extends T
? S
: GetComputableType
<NonNullable
<T
>>
Name |
---|
T |
S |
profectus/src/util/computed.ts:17
Ƭ ProcessedComputable<T
>: T
| Ref
<T
>
Name |
---|
T |
profectus/src/util/computed.ts:9
Ƭ UnwrapComputableType<T
>: T
extends Ref
<infer S> ? S
: T
extends () => infer S ? S
: T
Name |
---|
T |
profectus/src/util/computed.ts:20
• Const
DoNotCache: typeof DoNotCache
profectus/src/util/computed.ts:6
â–¸ convertComputable<T
>(obj
): ProcessedComputable
<T
>
Name | Type |
---|---|
obj | Computable <T > |
profectus/src/util/computed.ts:50
â–¸ processComputable<T
, S
>(obj
, key
): asserts obj is T & { [K in string | number | symbol]: ProcessedComputable<UnwrapComputableType<T[S]>> }
Name | Type |
---|---|
obj | T |
key | S |
Ƭ Proxied<T
>: NonNullable
<T
> extends Record
<PropertyKey
, unknown
> ? NonNullable
<T
> extends Persistent
<infer S> ? NonPersistent
<S
> : NonNullable
<T
> extends default
? T
: { [K in keyof T]: Proxied<T[K]> } & { [ProxyState]
: T
} : T
Name |
---|
T |
profectus/src/util/proxies.ts:19
Ƭ ProxiedWithState<T
>: NonNullable
<T
> extends Record
<PropertyKey
, unknown
> ? NonNullable
<T
> extends default
? T
: { [K in keyof T]: ProxiedWithState<T[K]> } & { [ProxyPath]
: string
[] ; [ProxyState]
: T
} : T
Name |
---|
T |
profectus/src/util/proxies.ts:8
• Const
ProxyPath: typeof ProxyPath
profectus/src/util/proxies.ts:6
• Const
ProxyState: typeof ProxyState
profectus/src/util/proxies.ts:5
â–¸ createLazyProxy<T
, S
>(objectFunc
, baseObject?
): T
Name | Type |
---|---|
objectFunc | (this : S , baseObject : S ) => T & S |
baseObject | S |
• Const
loadingSave: Ref
<boolean
>
â–¸ deleteLowerSaves(): void
profectus/src/util/save.ts:155
â–¸ getUniqueID(): string
â–¸ hardReset(): Promise
<void
>
profectus/src/util/save.ts:152
â–¸ load(): Promise
<void
>
â–¸ loadSave(playerObj
): Promise
<void
>
Name | Type |
---|---|
playerObj | Partial <Player > |
â–¸ newSave(): Player
â–¸ save(playerData?
): string
Name | Type |
---|---|
playerData? | Player |
â–¸ setupInitialStore(player?
): Player
Name | Type |
---|---|
player | Partial <Player > |
• VueFeature: Object
Name | Type |
---|---|
[Component] | GenericComponent |
[GatherProps] | () => Record <string , unknown > |
Ƭ PropTypes: typeof Boolean
| typeof String
| typeof Number
| typeof Function
| typeof Object
| typeof Array
profectus/src/util/vue.tsx:216
â–¸ coerceComponent(component
, defaultWrapper?
): DefineComponent
Name | Type | Default value |
---|---|---|
component | CoercableComponent | undefined |
defaultWrapper | string | "span" |
â–¸ computeComponent(component
, defaultWrapper?
): ShallowRef
<Component
| ""
>
Name | Type | Default value |
---|---|---|
component | Ref <ProcessedComputable <CoercableComponent >> | undefined |
defaultWrapper | string | "div" |
profectus/src/util/vue.tsx:175
â–¸ computeOptionalComponent(component
, defaultWrapper?
): ShallowRef
<Component
| ""
| null
>
Name | Type | Default value |
---|---|---|
component | Ref <ProcessedComputable <undefined | CoercableComponent >> | undefined |
defaultWrapper | string | "div" |
profectus/src/util/vue.tsx:185
â–¸ getFirstFeature<T
>(features
, filter
): Object
Name | Type |
---|---|
features | T [] |
filter | (feature : T ) => boolean |
profectus/src/util/vue.tsx:155
â–¸ isCoercableComponent(component
): component is CoercableComponent
Name | Type |
---|---|
component | unknown |
profectus/src/util/vue.tsx:104
â–¸ joinJSX(objects
, joiner
): JSX.Element
Name | Type |
---|---|
objects | Element [] |
joiner | Element |
â–¸ processedPropType<T
>(...types
): PropType
<ProcessedComputable
<T
>>
Name | Type |
---|---|
...types | PropTypes [] |
profectus/src/util/vue.tsx:225
â–¸ render(object
): JSX.Element
| DefineComponent
Name | Type |
---|---|
object | CoercableComponent | VueFeature |
â–¸ renderCol(...objects
): JSX.Element
Name | Type |
---|---|
...objects | (CoercableComponent | VueFeature )[] |
â–¸ renderColJSX(...objects
): JSX.Element
Name | Type |
---|---|
...objects | (CoercableComponent | VueFeature )[] |
â–¸ renderJSX(object
): JSX.Element
Name | Type |
---|---|
object | CoercableComponent | VueFeature |
â–¸ renderRow(...objects
): JSX.Element
Name | Type |
---|---|
...objects | (CoercableComponent | VueFeature )[] |
â–¸ renderRowJSX(...objects
): JSX.Element
Name | Type |
---|---|
...objects | (CoercableComponent | VueFeature )[] |
â–¸ setRefValue<T
>(ref
, value
): void
Name | Type |
---|---|
ref | Ref <T | Ref <T >> |
value | T |
profectus/src/util/vue.tsx:208
â–¸ setupHoldToClick(onClick?
, onHold?
): Object
Name | Type |
---|---|
onClick? | Ref <undefined | (e? : MouseEvent | TouchEvent ) => void > |
onHold? | Ref <undefined | VoidFunction > |
profectus/src/util/vue.tsx:119
â–¸ trackHover(element
): Ref
<boolean
>
Name | Type |
---|---|
element | VueFeature |
profectus/src/util/vue.tsx:232
â–¸ unwrapRef<T
>(ref
): T
Name | Type |
---|---|
ref | Ref <ProcessedComputable <T >> |
profectus/src/util/vue.tsx:204
â–¸ wrapRef<T
>(ref
): ComputedRef
<T
>
Name | Type |
---|---|
ref | Ref <ProcessedComputable <T >> |
This section of the docs is generated via the doc comments inside the Profectus source code. While it can be used as a reference, the comments themselves should show up in your IDE when relevant, which is probably a better way to get help. The guide has longer-form explanations of key concepts and is more likely to be of use to new developers.
This is a TypeScript file containing the non-static parts of your project, and acts as the entry point for it.
It is stored at /src/data/projEntry.jsx
.
This file has 3 things it must export, but beyond that can export anything the creator wants it to. Typically in addition to the required 3, the initial/"main" layer will be exported. Typically utilites belong in common.tsx
, which exists next to projEntry.tsx
.
(player: Partial<PlayerData>) => GenericLayer[]
A function that is given a player save data object currently being loaded, and returns a list of layers that should be active for that player. If a project does not have dynamic layers, this should always return a list of all layers.
ComputedRef<boolean>
A computed ref whose value is true whenever the game is over.
For example, in a game where the goal is to have a resource reach 10:
export const hasWon = computed(() => Decimal.gte(resource.value, 10));
(oldVersion: string | undefined, player: Partial<PlayerData>) => void
This function will be run whenever a save is loaded that has a different version than the one in project info. It will be given the old version number, and the player save data object currently being loaded.
The purpose of this function is to perform any necessary migrations, such as capping a resource that accidentally inflated in a previous version of the project. By default it will do nothing.
This is a JSON file containing information that describes your project and configures parts of how Profectus should represent it.
It is stored at /src/data/projInfo.json
.
string
Profectus
The name of the project, which will appear in the info tab and the header, if enabled. The page title will also be set to this value.
string
A project made in Profectus
A description of the project, which will be used when the project is installed as a Progressive Web Application.
string
""
This is a unique ID used when saving player data. Changing this will effectively erase all save data for all players.
WARNING
This ID MUST be unique to your project, and should not be left as the default value. Otherwise, your project may use the save data from another project and cause issues for both projects.
string
""
The author of the project, which will appear in the info tab.
string
The Paper Pilot Community
The text to display for the discord server to point users to. This will appear when hovering over the discord icon, inside the info tab, the game over screen, as well as the NaN detected screen.
By default, this is The Paper Pilot Community, which can act as a catch-all for any Profectus projects without their own servers. If you change the discord server with your own, The Paper Pilot Community will still display underneath the custom server when hovering over the discord icon and within the info tab. Those places will also contain a link to the Modding Tree discord server.
string
https://discord.gg/yJ4fjnjU54
The link for the discord server to point users to. See discordName for more details.
string
0.0
The current version of the project loaded. If the player data was last saved in a different version of the project, fixOldSave will be run, so you can perform any save migrations necessary. This will also appear in the nav, the info tab, and the game over screen.
string
Initial Commit
The display name for the current version of the project loaded. This will also appear in the nav, the info tab, and the game over screen unless set to an empty string.
boolean
true
Whether or not to allow tabs (besides the first) to display a "back" button to close them (and any other tabs to the right of them).
boolean
false
Whether or not to allow resources to display small values (<.001). If false they'll just display as 0. Individual resources can also be configured to override this value.
number
2
Default precision to display numbers at when passed into format
. Individual format
calls can override this value, and resources can be configured with a custom precision as well.
boolean
true
Whether or not to display the nav as a header at the top of the screen. If disabled, the nav will appear on the left side of the screen laid over the first tab.
string | null
null
A path to an image file to display as the logo of the app. If null, the title will be shown instead. This will appear in the nav when useHeader
is true.
string
""
A path to an image file to display as the logo of the app within the info tab. If left blank no logo will be shown.
string[]
["main"]
The list of initial tabs to display on new saves. This value must have at least one element. Each element should be the ID of the layer to display in that tab.
number
3600
The longest duration a single tick can be, in seconds. When calculating things like offline time, a single tick will be forced to be this amount or lower. This will make calculating offline time spread out across many ticks as necessary. The default value is 1 hour.
number
1
The max amount of time that can be stored as offline time, in hours.
boolean
true
Whether or not to allow the player to pause the game. Turning this off disables the toggle from the options menu as well as the NaN screen. Developers can still manually pause by just running player.devSpeed = 0
in console (or = 1
to resume).
base64 | lz | plain
base64
The encoding to use when exporting to the clipboard. Plain-text is fast to generate but is easiest for the player to manipulate and cheat with. Base 64 is slightly slower and the string will be longer but will offer a small barrier to people trying to cheat. LZ-String is the slowest method, but produces the smallest strings and still offers a small barrier to those trying to cheat. Some sharing platforms like pastebin may automatically delete base64 encoded text, and some sites might not support all the characters used in lz-string exports.
Themes are objects that change how the project's interface should look. This is done mostly by changing the values of various CSS variables. You can look at the existing themes as a reference for the kind of values these CSS variables expect. They can also set various theme options that change how parts of the screen are laid out, which are described below.
They are stored in /src/data/themes.ts
.
You can add a theme by adding a property to the Themes
enum and then including the theme in the exported object. It's recommended to use the spread operator if you'd like to have a theme look like another, but override specific options / CSS variables.
Themes added in this way will be automatically included in the Themes dropdown in the Options tab. Removing themes from the enum and exported object will similarly hide them from the dropdown.
If you'd like to change which theme is the default, you may modify the initial player settings object in the /src/game/settings.ts
file. Keep in mind you'll also want to change it in the hardResetSettings
function in the same file.
boolean
Toggles whether to display tab buttons in a tab list, similar to how a browser displays tabs; or to display them as floating buttons, similar to how TMT displays buttons.
boolean
If true, elements in a row or column will have their margins removed and border radiuses set to 0 between elements. This will cause the elements to appear as segments in a single object.
Currently, this can only merge in a single dimension. Rows of columns or columns of rows will not merge into a single rectangular object.
There are often concepts that aren't inherent to a single feature, but rather work with joining different features together. For example, a reset clickable that activates a conversion and resets a tree, which happens to be a common use case but isn't inherent to clickables, conversions, or trees.
These are perfect situations for utilities, and so to encourage creators to learn to identify and take advantage of these situations, a file called src/data/common.tsx
has been created to demo some of the more common utility functions a project might use. Adding new utilities to this file is encouraged, as is creating utils in general. It also works as a good stepping stone to creating your own features.
This is a project that's still under development, but is a good resource for things like implementing custom features.
An incremental game with 25 different layers of content. A good example of what a large project looks like. There's also a partial port to 0.6 available here.
A "The Prestige Tree" style incremental game, developed by the original creator of TPT.
A project loosely based off the Demo project for TMT. Uses most of the different features of Profectus, but doesn't have any real gameplay.
Profectus requires a Node.js development environment for working on a project. If you are comfortable with the command line, a local development environment is recommended.
For local development, you will need the following tools:
Create a new project from the Profectus repository by clicking the "Use this template" button. Then, clone the repository locally using the provided link.
INFO
The template repository allows easy creation of multiple projects from one repository. However, updating an existing project to a newer version of Profectus can be challenging. Consider updating Profectus before starting development to avoid issues with unrelated histories.
It's recommended to create a new Git branch for development, allowing you to push changes without affecting the live build. The GitHub workflow will automatically rebuild the page when you push to the main
branch.
Next, install Profectus' dependencies by running npm install
. Run npm run serve
to start a local server hosting your project. The site will automatically reload as you modify files.
Also, follow the steps to update Profectus before starting to make future updates easier without worrying about unrelated histories.
Using Git, the repository's workflow action automates deployment. However, you need to grant write permissions for the action in the repository settings. Go to Actions, General, Workflow permissions, and select "Read and write permissions".
To deploy, push changes to the main branch. The site will be updated automatically in a few minutes. Check progress or errors from the Actions tab on your repository.
Enable GitHub Pages in the repo settings to host the generated site. Select the gh-pages
branch. Perform this step once. This will automatically start another GitHub action to deploy the website.
Upon action completion, your project should be available at https://<YOUR_GITHUB_USERNAME>.github.io/<YOUR_REPO_NAME>/
. For example, the TMT Demo project hosted at https://github.com/profectus-engine/TMT-Demo is available at https://profectus-engine.github.io/TMT-Demo/.
If you don't have a preferred IDE, Profectus is developed in Visual Studio Code and is known to work well with it.
Recommendations:
.value
autocomplete by running the Preferences: Open Settings
command and setting volar.autoCompleteRefs
to false
emmet.showExpandedAbbreviation
to "never"
, also in the preferencesAs an alternative to local development, you may use Replit. Replit sets up your development and hosts your project.
On the free plan, you'll face limitations, and the program may need occasional startups.
To create a Profectus project on Replit, all you have to do is click this button:
Click the "Run" button at the top of the screen to start development. This will also make the project publicly accessible, essentially auto-deploying it. However, this means you cannot separate your development and production environments.
Glitch is a site similar to Replit, with many of the same pros and cons. To create a Profectus project on Glitch, select "New Project", "Import from GitHub", and enter profectus-engine/Profectus
. The new project will be automatically configured and ready to go.
Due to Profectus being a template repository, your projects do not share a git history with Profectus. To update changes, you will need to run the following:
git remote add template https://github.com/profectus-engine/Profectus
git fetch --all
-git merge template/main --allow-unrelated-histories
The first command only has to be performed once. The third command may require you to merge conflicts between code both you and Profectus have changed - however, due to the modularity of Profectus, this should be fairly rare. Unfortunately, due to the unrelated histories the first time you do this every change will be marked as a conflict, and you'll need to accept each one.
The sidebar has a tab labeled "Version Control", which you can use to merge all changes made to Profectus into your project. Unfortunately, Replit does not have a merge tool so this process may irrecoverably erase changes you've made - I'd recommend making a backup first.
Unfortunately, Glitch does not provide any method by which to update a project from a Github repository. If you've only changed things in the data folder you may consider creating a new project, importing the current version of Profectus, and then placing your data folder in the new project.
Profectus content is organized into units called "Layers". When displaying content to the user, the screen will be divided into several tabs that each display the content of a layer. These layers are stored in /src/data/layers
.
Each layer is ultimately a collection of different features, and a display function. While there are a couple reserved properties for layers, most of its structure is fully up to the creator.
Layers can be dynamically added or removed at any time, which also allows for effectively disabling or enabling content based on arbitrary conditions. Just make sure getInitialLayers can process the player save data object and determine which layers should be currently active.
Layers (and features) are not actually created immediately. Instead, their options are gotten through a function which is then run the first time something inside the layer is accessed. This is a concept called lazy evaluation, which is also used for things like computed
, and allows for features to reference each other without worrying about cyclical dependencies.
Persistence refers to data that is saved so that it persists when the user closes the tab and opens it again in the future.
In Profectus, this is handled by creating "persistent refs", which act like refs but whose value is stored in an object that gets saved to localStorage. Other than that you can treat them like any other ref - when adding the layer, any persistent refs will automatically have their values updated to the ones saved in localStorage. If there isn't a saved value, it'll use the default value passed to the persistent ref constructor.
Many features in Profectus, such as upgrades, milestones, and challenges, internally have persistent refs to save things like whether the upgrade has been purchased, the milestone achieved, or the challenge completed. Creators can also create their own custom persistent refs to store any arbitrary (but serializable) data they need - that means Numbers (including big numbers), strings, booleans, or objects containing only serializable values. Another notable function is the resource constructor. If you pass a default value into its constructor, it will automatically create a persistent ref for that resource. If you pass in a ref, it will NOT make the ref persistent.
It's important for saving and loading these properties for these refs to be in a well-known location. This is implemented based on the location of the persistent ref within a layer. That means it's important that all persistent refs are located within the object returned by the createLayer options function. If a persistent ref is not within that object, it will NOT be saved and loaded - regardless of whether it's a persistent ref within a feature, one you manually created, or otherwise.
Additionally, this structure should typically remain consistent between project versions. If a value is in a new location, it will not load the value from localStorage correctly. This is exacerbated if two values swap places, such as when an array is re-ordered. In the event a creator changes this structure anyways, the fixOldSave function can be used to migrate the old player save data to the new structure expected by the current version of the project.
As of Profectus 0.6, save data will now report warnings whenever there is redundancy - two locations for the same persistent data, which creates larger saves that can cause issues when loading after updates. To fix redundancies, wrap all but one location for the data in noPersist.
Profectus takes large advantage of Vue's reactivity system. It's recommended to read up on how refs and computed refs work. Ultimately this means that sometimes you'll need to type .value
to get the actual value of something, but also you are able to pass things around by reference instead of by value. Indeed, it is recommended to only unwrap the actual value when you actually need it. .value
is guaranteed to be correct and up to date only on the exact moment it is accessed.
With a proper IDE, such as Visual Studio Code, you should be able to see whether or not something is a ref or not from type hints. If in doubt, you can always wrap the property in an unref
call.
Vue's reactivity is probably the "quirkiest" part of Profectus, and not even the documentation makes all of those quirks clear. It is recommend to read this thread of common misconceptions around Vue reactivity.
Most properties on features will accept Computable
values. Computable values can either be a raw value, a ref to the value, or a function that returns the value. In the lattermost case it will be wrapped in computed
, turning it into a ref. The feature type will handle it being a ref or a raw value by using unref
when accessing those values. With type hints, your IDE should correctly identify these values as refs or raw values so you can treat them as the types they actually are.
Because functions are automatically wrapped in computed
for many properties, it might be expected to happen to custom properties you add to a feature that isn't defined by the feature type. These functions will not be wrapped, and if you want it cached you should wrap it in a computed
yourself. This does, however, allow you to include custom methods on a feature without worry.
Profectus is a web-based game engine. You can write your content using many built in features, write your own features, and build up complex gameplay quickly and easily.
The purpose of creating profectus was to create an easy to use engine that does not create a ceiling for a programmer's personal growth. This engine will grow in complexity with you, empowering you to create increasingly complex designs and mechanics.
While this engine is intended to make game development (and web app development) easier, it still requires you to be comfortable with programming in general and javascript in particular. Fortunately, that is a solvable problem.
If you've never used Javascript before, learn-js.org is a good resource for learning the important concepts. If you'd like a more thorough lesson on all the ins and outs of web development, javascript.info and MDN's tutorials should have you covered. MDN is also a great resource to use as a reference - for example, if you want to know more about something and you google it, there'll typically be a MDN link that'll explain it thoroughly.
Beyond the basics, Profectus uses a modern web development pipeline, using tools like node, typescript, and JSX. While most of it should be relatively easy to pick up through context, if this becomes too complicated you may be interested in The Modding Tree, a predecessor of Profectus that uses plain old javascript.
There are many popular game engines out there, such as GameMaker Studio 2, Unity3D, Unreal Engine 4, and Godot, that are all general purpose and also more useful if you're planning on going into a career in game development. These are all more mature and robust game engines compared to Profectus, and are used by actual game development studios.
Profectus, on the other hand, is a very opinionated engine that is better at specific types of projects. Where the above engines will require you to design and create your own interfaces, menus, save management systems, etc. Profectus will include those out of the box. Profectus will also output games that run natively in the browser, and will typically be easier for players to play than traditional engines.
If you are not interested in programming but still want to get into game development, the above engines also all support "visual programming", which may be more amenable to you. Each engine will have varying levels of support, and of course with varying complexities, but ultimately any of these will help you learn the concepts of programming and game development, and all of them also offer traditional programming for when you think you're ready.
While absolute purity is impossible, design decisions have been and will continue to be made using these principles in mind.
A game engine that grows with you
Starts at your skill level and encourages your ambition to make your projects bigger and better.
Everything is written to be as intuitive to use as possible, through consistent design.
Built with TypeScript to guide you as you write. Seamlessly deploy your project with pre-configured github workflows, and more.
Designed to actively encourage you to become better at programming. The engine will never limit you.