From d1d9a7153eb746849f9a22e59aee2405567ca214 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Mon, 29 May 2023 05:17:29 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20profectu?= =?UTF-8?q?s-engine/profectus-docs@9243985a017ca16d7a121dfc786ccd09d0ba99f?= =?UTF-8?q?1=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- api/components/ContextComponent.html | 2 +- api/components/ErrorComponent.html | 2 +- api/components/HotkeyComponent.html | 2 +- api/components/InfoComponent.html | 2 +- api/components/LayerComponent.html | 2 +- api/components/MarkNodeComponent.html | 2 +- api/components/ModalComponent.html | 2 +- api/components/NodeComponent.html | 2 +- api/components/SaveComponent.html | 2 +- api/components/fields/DangerButtonComponent.html | 2 +- api/components/fields/FeedbackButtonComponent.html | 2 +- api/components/fields/SelectComponent.html | 2 +- api/components/fields/SliderComponent.html | 2 +- api/components/fields/TextComponent.html | 2 +- api/components/fields/ToggleComponent.html | 2 +- api/components/layout/CollapsibleComponent.html | 2 +- api/components/layout/ColumnComponent.html | 2 +- api/components/layout/RowComponent.html | 2 +- api/components/layout/SpacerComponent.html | 2 +- api/components/layout/StickyComponent.html | 2 +- api/components/layout/VerticalRuleComponent.html | 2 +- api/components/math/FloorComponent.html | 2 +- api/components/math/SqrtComponent.html | 2 +- api/modules/data/common.html | 2 +- api/modules/data/projEntry.html | 2 +- api/modules/data/themes.html | 2 +- api/modules/features/achievement.html | 2 +- api/modules/features/action.html | 2 +- api/modules/features/bar.html | 2 +- api/modules/features/board.html | 2 +- api/modules/features/challenge.html | 2 +- api/modules/features/clickable.html | 2 +- api/modules/features/conversion.html | 2 +- api/modules/features/decorators/bonusDecorator.html | 2 +- api/modules/features/decorators/common.html | 2 +- api/modules/features/feature.html | 2 +- api/modules/features/grid.html | 2 +- api/modules/features/hotkey.html | 2 +- api/modules/features/infobox.html | 2 +- api/modules/features/links.html | 2 +- api/modules/features/particles.html | 2 +- api/modules/features/repeatable.html | 2 +- api/modules/features/reset.html | 2 +- api/modules/features/resource.html | 2 +- api/modules/features/tabs/tab.html | 2 +- api/modules/features/tabs/tabFamily.html | 2 +- api/modules/features/tooltip.html | 2 +- api/modules/features/tree.html | 2 +- api/modules/features/upgrade.html | 2 +- api/modules/game/events.html | 2 +- api/modules/game/formulas/formulas.html | 2 +- api/modules/game/formulas/operations.html | 2 +- api/modules/game/formulas/types.html | 2 +- api/modules/game/gameLoop.html | 2 +- api/modules/game/layers.html | 2 +- api/modules/game/modifiers.html | 2 +- api/modules/game/notifications.html | 2 +- api/modules/game/persistence.html | 2 +- api/modules/game/player.html | 2 +- api/modules/game/requirements.html | 2 +- api/modules/game/settings.html | 2 +- api/modules/game/state.html | 2 +- api/modules/lib/break_eternity.html | 2 +- api/modules/lib/collapseTransition.html | 2 +- api/modules/lib/lru-cache.html | 2 +- api/modules/lib/pixi.html | 2 +- api/modules/lib/pwa-register.html | 2 +- api/modules/lib/vue-panzoom.html | 2 +- api/modules/lib/vue-textarea-autosize.html | 2 +- api/modules/util/bignum.html | 2 +- api/modules/util/break_eternity.html | 2 +- api/modules/util/common.html | 2 +- api/modules/util/computed.html | 2 +- api/modules/util/proxies.html | 2 +- api/modules/util/save.html | 2 +- api/modules/util/vue.html | 2 +- api/overview.html | 2 +- ...uide_advanced-concepts_creating-features.md.88ee9059.js} | 2 +- ...advanced-concepts_creating-features.md.88ee9059.lean.js} | 2 +- ...> guide_advanced-concepts_dynamic-layers.md.9ec766d2.js} | 2 +- ...de_advanced-concepts_dynamic-layers.md.9ec766d2.lean.js} | 2 +- ...1795.js => guide_advanced-concepts_nodes.md.92611da2.js} | 2 +- ...js => guide_advanced-concepts_nodes.md.92611da2.lean.js} | 2 +- ...=> guide_creating-your-project_changelog.md.d8a46ee2.js} | 2 +- ...ide_creating-your-project_changelog.md.d8a46ee2.lean.js} | 2 +- ...uide_creating-your-project_project-entry.md.58e6fdcf.js} | 2 +- ...creating-your-project_project-entry.md.58e6fdcf.lean.js} | 2 +- ...guide_creating-your-project_project-info.md.c56eeb0f.js} | 2 +- ..._creating-your-project_project-info.md.c56eeb0f.lean.js} | 2 +- ...js => guide_creating-your-project_themes.md.270c3647.js} | 2 +- ... guide_creating-your-project_themes.md.270c3647.lean.js} | 2 +- ....js => guide_creating-your-project_utils.md.4760f329.js} | 2 +- ...> guide_creating-your-project_utils.md.4760f329.lean.js} | 2 +- assets/guide_getting-started_examples.md.8f3101eb.js | 1 + assets/guide_getting-started_examples.md.8f3101eb.lean.js | 1 + assets/guide_getting-started_examples.md.d4b64671.js | 1 - assets/guide_getting-started_examples.md.d4b64671.lean.js | 1 - ....js => guide_getting-started_first-layer.md.eea178cb.js} | 2 +- ...> guide_getting-started_first-layer.md.eea178cb.lean.js} | 2 +- ...7ef6f7.js => guide_getting-started_setup.md.f1d88449.js} | 2 +- ...n.js => guide_getting-started_setup.md.f1d88449.lean.js} | 2 +- ...42e.js => guide_getting-started_updating.md.ec3df0e8.js} | 2 +- ...s => guide_getting-started_updating.md.ec3df0e8.lean.js} | 2 +- ...js => guide_important-concepts_coercable.md.4ac1576c.js} | 2 +- ... guide_important-concepts_coercable.md.4ac1576c.lean.js} | 2 +- ....js => guide_important-concepts_features.md.b922ebcf.js} | 2 +- ...> guide_important-concepts_features.md.b922ebcf.lean.js} | 2 +- ....js => guide_important-concepts_formulas.md.63bf13f7.js} | 2 +- ...> guide_important-concepts_formulas.md.63bf13f7.lean.js} | 2 +- ...4c.js => guide_important-concepts_layers.md.ca5bd4ed.js} | 2 +- ... => guide_important-concepts_layers.md.ca5bd4ed.lean.js} | 2 +- ... => guide_important-concepts_persistence.md.8c085a8c.js} | 2 +- ...uide_important-concepts_persistence.md.8c085a8c.lean.js} | 2 +- ...s => guide_important-concepts_reactivity.md.6a2d1084.js} | 2 +- ...guide_important-concepts_reactivity.md.6a2d1084.lean.js} | 2 +- ...=> guide_important-concepts_requirements.md.9e8fd070.js} | 2 +- ...ide_important-concepts_requirements.md.9e8fd070.lean.js} | 2 +- ...uide_index.md.585bfdde.js => guide_index.md.a9606b78.js} | 2 +- ....md.585bfdde.lean.js => guide_index.md.a9606b78.lean.js} | 2 +- ...6.md.c2d3eaf8.js => guide_migrations_0-6.md.575646c4.js} | 2 +- ...af8.lean.js => guide_migrations_0-6.md.575646c4.lean.js} | 2 +- ...d.9d68cba4.js => guide_recipes_particles.md.72bcff9c.js} | 2 +- ....lean.js => guide_recipes_particles.md.72bcff9c.lean.js} | 2 +- ...md.7aaf3780.js => guide_recipes_prestige.md.ea2e4e7b.js} | 2 +- ...0.lean.js => guide_recipes_prestige.md.ea2e4e7b.lean.js} | 2 +- ...7370cb.js => guide_recipes_save-progress.md.4d79827f.js} | 2 +- ...n.js => guide_recipes_save-progress.md.4d79827f.lean.js} | 2 +- assets/{index.md.f43e5a79.js => index.md.d8bea653.js} | 2 +- ...{index.md.f43e5a79.lean.js => index.md.d8bea653.lean.js} | 2 +- guide/advanced-concepts/creating-features.html | 6 +++--- guide/advanced-concepts/dynamic-layers.html | 6 +++--- guide/advanced-concepts/nodes.html | 6 +++--- guide/creating-your-project/changelog.html | 6 +++--- guide/creating-your-project/project-entry.html | 6 +++--- guide/creating-your-project/project-info.html | 6 +++--- guide/creating-your-project/themes.html | 6 +++--- guide/creating-your-project/utils.html | 6 +++--- guide/getting-started/examples.html | 6 +++--- guide/getting-started/first-layer.html | 6 +++--- guide/getting-started/setup.html | 6 +++--- guide/getting-started/updating.html | 6 +++--- guide/important-concepts/coercable.html | 6 +++--- guide/important-concepts/features.html | 6 +++--- guide/important-concepts/formulas.html | 6 +++--- guide/important-concepts/layers.html | 6 +++--- guide/important-concepts/persistence.html | 6 +++--- guide/important-concepts/reactivity.html | 6 +++--- guide/important-concepts/requirements.html | 6 +++--- guide/index.html | 6 +++--- guide/migrations/0-6.html | 6 +++--- guide/recipes/particles.html | 6 +++--- guide/recipes/prestige.html | 6 +++--- guide/recipes/save-progress.html | 6 +++--- hashmap.json | 2 +- index.html | 4 ++-- 156 files changed, 203 insertions(+), 203 deletions(-) rename assets/{guide_advanced-concepts_creating-features.md.083776fa.js => guide_advanced-concepts_creating-features.md.88ee9059.js} (99%) rename assets/{guide_advanced-concepts_creating-features.md.083776fa.lean.js => guide_advanced-concepts_creating-features.md.88ee9059.lean.js} (85%) rename assets/{guide_advanced-concepts_dynamic-layers.md.f04ecae7.js => guide_advanced-concepts_dynamic-layers.md.9ec766d2.js} (98%) rename assets/{guide_advanced-concepts_dynamic-layers.md.f04ecae7.lean.js => guide_advanced-concepts_dynamic-layers.md.9ec766d2.lean.js} (85%) rename assets/{guide_advanced-concepts_nodes.md.0c181795.js => guide_advanced-concepts_nodes.md.92611da2.js} (99%) rename assets/{guide_advanced-concepts_nodes.md.0c181795.lean.js => guide_advanced-concepts_nodes.md.92611da2.lean.js} (84%) rename assets/{guide_creating-your-project_changelog.md.a35dd134.js => guide_creating-your-project_changelog.md.d8a46ee2.js} (98%) rename assets/{guide_creating-your-project_changelog.md.a35dd134.lean.js => guide_creating-your-project_changelog.md.d8a46ee2.lean.js} (85%) rename assets/{guide_creating-your-project_project-entry.md.2f833a37.js => guide_creating-your-project_project-entry.md.58e6fdcf.js} (98%) rename assets/{guide_creating-your-project_project-entry.md.2f833a37.lean.js => guide_creating-your-project_project-entry.md.58e6fdcf.lean.js} (85%) rename assets/{guide_creating-your-project_project-info.md.09b65ab7.js => guide_creating-your-project_project-info.md.c56eeb0f.js} (99%) rename assets/{guide_creating-your-project_project-info.md.09b65ab7.lean.js => guide_creating-your-project_project-info.md.c56eeb0f.lean.js} (85%) rename assets/{guide_creating-your-project_themes.md.8044ebae.js => guide_creating-your-project_themes.md.270c3647.js} (97%) rename assets/{guide_creating-your-project_themes.md.8044ebae.lean.js => guide_creating-your-project_themes.md.270c3647.lean.js} (84%) rename assets/{guide_creating-your-project_utils.md.f2f7a981.js => guide_creating-your-project_utils.md.4760f329.js} (95%) rename assets/{guide_creating-your-project_utils.md.f2f7a981.lean.js => guide_creating-your-project_utils.md.4760f329.lean.js} (95%) create mode 100644 assets/guide_getting-started_examples.md.8f3101eb.js create mode 100644 assets/guide_getting-started_examples.md.8f3101eb.lean.js delete mode 100644 assets/guide_getting-started_examples.md.d4b64671.js delete mode 100644 assets/guide_getting-started_examples.md.d4b64671.lean.js rename assets/{guide_getting-started_first-layer.md.47c9f9be.js => guide_getting-started_first-layer.md.eea178cb.js} (99%) rename assets/{guide_getting-started_first-layer.md.47c9f9be.lean.js => guide_getting-started_first-layer.md.eea178cb.lean.js} (85%) rename assets/{guide_getting-started_setup.md.5a7ef6f7.js => guide_getting-started_setup.md.f1d88449.js} (99%) rename assets/{guide_getting-started_setup.md.5a7ef6f7.lean.js => guide_getting-started_setup.md.f1d88449.lean.js} (87%) rename assets/{guide_getting-started_updating.md.f471842e.js => guide_getting-started_updating.md.ec3df0e8.js} (98%) rename assets/{guide_getting-started_updating.md.f471842e.lean.js => guide_getting-started_updating.md.ec3df0e8.lean.js} (85%) rename assets/{guide_important-concepts_coercable.md.5e75d4e3.js => guide_important-concepts_coercable.md.4ac1576c.js} (99%) rename assets/{guide_important-concepts_coercable.md.5e75d4e3.lean.js => guide_important-concepts_coercable.md.4ac1576c.lean.js} (85%) rename assets/{guide_important-concepts_features.md.40c1a025.js => guide_important-concepts_features.md.b922ebcf.js} (99%) rename assets/{guide_important-concepts_features.md.40c1a025.lean.js => guide_important-concepts_features.md.b922ebcf.lean.js} (84%) rename assets/{guide_important-concepts_formulas.md.63fd87c6.js => guide_important-concepts_formulas.md.63bf13f7.js} (99%) rename assets/{guide_important-concepts_formulas.md.63fd87c6.lean.js => guide_important-concepts_formulas.md.63bf13f7.lean.js} (84%) rename assets/{guide_important-concepts_layers.md.5afe5c4c.js => guide_important-concepts_layers.md.ca5bd4ed.js} (96%) rename assets/{guide_important-concepts_layers.md.5afe5c4c.lean.js => guide_important-concepts_layers.md.ca5bd4ed.lean.js} (84%) rename assets/{guide_important-concepts_persistence.md.ff5308f4.js => guide_important-concepts_persistence.md.8c085a8c.js} (98%) rename assets/{guide_important-concepts_persistence.md.ff5308f4.lean.js => guide_important-concepts_persistence.md.8c085a8c.lean.js} (85%) rename assets/{guide_important-concepts_reactivity.md.612c3628.js => guide_important-concepts_reactivity.md.6a2d1084.js} (97%) rename assets/{guide_important-concepts_reactivity.md.612c3628.lean.js => guide_important-concepts_reactivity.md.6a2d1084.lean.js} (85%) rename assets/{guide_important-concepts_requirements.md.f50ff6cc.js => guide_important-concepts_requirements.md.9e8fd070.js} (99%) rename assets/{guide_important-concepts_requirements.md.f50ff6cc.lean.js => guide_important-concepts_requirements.md.9e8fd070.lean.js} (85%) rename assets/{guide_index.md.585bfdde.js => guide_index.md.a9606b78.js} (98%) rename assets/{guide_index.md.585bfdde.lean.js => guide_index.md.a9606b78.lean.js} (84%) rename assets/{guide_migrations_0-6.md.c2d3eaf8.js => guide_migrations_0-6.md.575646c4.js} (99%) rename assets/{guide_migrations_0-6.md.c2d3eaf8.lean.js => guide_migrations_0-6.md.575646c4.lean.js} (86%) rename assets/{guide_recipes_particles.md.9d68cba4.js => guide_recipes_particles.md.72bcff9c.js} (99%) rename assets/{guide_recipes_particles.md.9d68cba4.lean.js => guide_recipes_particles.md.72bcff9c.lean.js} (84%) rename assets/{guide_recipes_prestige.md.7aaf3780.js => guide_recipes_prestige.md.ea2e4e7b.js} (99%) rename assets/{guide_recipes_prestige.md.7aaf3780.lean.js => guide_recipes_prestige.md.ea2e4e7b.lean.js} (84%) rename assets/{guide_recipes_save-progress.md.cf7370cb.js => guide_recipes_save-progress.md.4d79827f.js} (99%) rename assets/{guide_recipes_save-progress.md.cf7370cb.lean.js => guide_recipes_save-progress.md.4d79827f.lean.js} (86%) rename assets/{index.md.f43e5a79.js => index.md.d8bea653.js} (94%) rename assets/{index.md.f43e5a79.lean.js => index.md.d8bea653.lean.js} (94%) diff --git a/404.html b/404.html index 30d39789..0ad35d20 100644 --- a/404.html +++ b/404.html @@ -19,7 +19,7 @@
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- diff --git a/api/components/ContextComponent.html b/api/components/ContextComponent.html index ba5c2959..cf390be4 100644 --- a/api/components/ContextComponent.html +++ b/api/components/ContextComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/ErrorComponent.html b/api/components/ErrorComponent.html index d8d90ec0..8f62a5ec 100644 --- a/api/components/ErrorComponent.html +++ b/api/components/ErrorComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/HotkeyComponent.html b/api/components/HotkeyComponent.html index cca1a233..50a4ddc8 100644 --- a/api/components/HotkeyComponent.html +++ b/api/components/HotkeyComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/InfoComponent.html b/api/components/InfoComponent.html index c433c81c..fa647a9a 100644 --- a/api/components/InfoComponent.html +++ b/api/components/InfoComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/LayerComponent.html b/api/components/LayerComponent.html index 3c028d1e..8add2f87 100644 --- a/api/components/LayerComponent.html +++ b/api/components/LayerComponent.html @@ -22,7 +22,7 @@
Skip to content
On this page

Layer Component ​

Props ​

NameType
index*number
display*processedPropType<CoercableComponent>(Object, String, Function)
minimizedDisplayprocessedPropType<CoercableComponent>(Object, String, Function)
minimized*Ref<boolean>
name*processedPropType<string>(String)
colorprocessedPropType<string>(String)
minimizableprocessedPropType<boolean>(Boolean)
nodes*Ref<Record<string, FeatureNode | undefined>>

Events ​

Name
setMinimized
- diff --git a/api/components/MarkNodeComponent.html b/api/components/MarkNodeComponent.html index 46462c7a..c716ece8 100644 --- a/api/components/MarkNodeComponent.html +++ b/api/components/MarkNodeComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/ModalComponent.html b/api/components/ModalComponent.html index a27fde49..472ff86a 100644 --- a/api/components/ModalComponent.html +++ b/api/components/ModalComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/NodeComponent.html b/api/components/NodeComponent.html index 9afbc2fd..91f5d4f6 100644 --- a/api/components/NodeComponent.html +++ b/api/components/NodeComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/SaveComponent.html b/api/components/SaveComponent.html index d6f0b53a..23e598c5 100644 --- a/api/components/SaveComponent.html +++ b/api/components/SaveComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/fields/DangerButtonComponent.html b/api/components/fields/DangerButtonComponent.html index 86d7a17e..88a90c3a 100644 --- a/api/components/fields/DangerButtonComponent.html +++ b/api/components/fields/DangerButtonComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/fields/FeedbackButtonComponent.html b/api/components/fields/FeedbackButtonComponent.html index cdab61b9..85c1f19f 100644 --- a/api/components/fields/FeedbackButtonComponent.html +++ b/api/components/fields/FeedbackButtonComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/fields/SelectComponent.html b/api/components/fields/SelectComponent.html index 387494a2..ec86ad54 100644 --- a/api/components/fields/SelectComponent.html +++ b/api/components/fields/SelectComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/fields/SliderComponent.html b/api/components/fields/SliderComponent.html index 667b2072..7c1c52c9 100644 --- a/api/components/fields/SliderComponent.html +++ b/api/components/fields/SliderComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/fields/TextComponent.html b/api/components/fields/TextComponent.html index 427574a9..54716fe3 100644 --- a/api/components/fields/TextComponent.html +++ b/api/components/fields/TextComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/fields/ToggleComponent.html b/api/components/fields/ToggleComponent.html index 51608461..64562762 100644 --- a/api/components/fields/ToggleComponent.html +++ b/api/components/fields/ToggleComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/layout/CollapsibleComponent.html b/api/components/layout/CollapsibleComponent.html index b938c650..77055e20 100644 --- a/api/components/layout/CollapsibleComponent.html +++ b/api/components/layout/CollapsibleComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/layout/ColumnComponent.html b/api/components/layout/ColumnComponent.html index ee94e5ff..138792b5 100644 --- a/api/components/layout/ColumnComponent.html +++ b/api/components/layout/ColumnComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/layout/RowComponent.html b/api/components/layout/RowComponent.html index 400e6d64..ef35edd3 100644 --- a/api/components/layout/RowComponent.html +++ b/api/components/layout/RowComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/layout/SpacerComponent.html b/api/components/layout/SpacerComponent.html index f8c25975..11122985 100644 --- a/api/components/layout/SpacerComponent.html +++ b/api/components/layout/SpacerComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/layout/StickyComponent.html b/api/components/layout/StickyComponent.html index d867545d..1a561ddc 100644 --- a/api/components/layout/StickyComponent.html +++ b/api/components/layout/StickyComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/layout/VerticalRuleComponent.html b/api/components/layout/VerticalRuleComponent.html index 5e96fec3..0c6b39b8 100644 --- a/api/components/layout/VerticalRuleComponent.html +++ b/api/components/layout/VerticalRuleComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/math/FloorComponent.html b/api/components/math/FloorComponent.html index 315efc17..4c940966 100644 --- a/api/components/math/FloorComponent.html +++ b/api/components/math/FloorComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/components/math/SqrtComponent.html b/api/components/math/SqrtComponent.html index ffbffcf7..7139d9e7 100644 --- a/api/components/math/SqrtComponent.html +++ b/api/components/math/SqrtComponent.html @@ -22,7 +22,7 @@
- diff --git a/api/modules/data/common.html b/api/modules/data/common.html index 67316e47..f77b3ae4 100644 --- a/api/modules/data/common.html +++ b/api/modules/data/common.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: data/common ​

Interfaces ​

LayerTreeNodeOptions ​

• LayerTreeNodeOptions: Object

An object that configures a LayerTreeNode

NameTypeDescription
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.
colorComputable<string>The color to display this tree node as
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.
layerIDstringThe 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) => voidA function that is called when the tree node is clicked.
onHold?VoidFunctionA function that is called when the tree node is held down.
reset?GenericResetA 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 ​

profectus/src/data/common.tsx:175


ResetButtonOptions ​

• ResetButtonOptions: Object

An object that configures a ResetButton

NameTypeDescription
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.
conversionGenericConversionThe 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) => voidA function that is called when the clickable is clicked.
onHold?VoidFunctionA 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?booleanToggles a smaller design for the feature.
style?Computable<StyleValue>CSS to apply to this feature.
treeGenericTreeThe tree this reset button is apart of
treeNodeGenericTreeNodeThe specific tree node associated with this reset button
visibility?Computable<boolean | Visibility>Whether this clickable should be visible.

Defined in ​

profectus/src/data/common.tsx:33


Section ​

• Section: Object

An option object for a modifier display as a single section. *

NameTypeDescription
base?Computable<DecimalSource>The base value being modified. *
baseText?Computable<CoercableComponent>The label to call the base amount. Defaults to "Base". *
modifierWithRequired<Modifier, "description">The modifier to be displaying in this section. *
smallerIsBetter?booleanDetermines 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. *
titleComputable<string>The header for this modifier. *
unit?stringThe unit of measurement for the base. *
visible?Computable<boolean>Whether or not this section should be currently visible to the player. *

Defined in ​

profectus/src/data/common.tsx:233

Type Aliases ​

GenericLayerTreeNode ​

Ƭ GenericLayerTreeNode: Replace<LayerTreeNode<LayerTreeNodeOptions>, { append?: ProcessedComputable<boolean> ; display: ProcessedComputable<CoercableComponent> }>

A type that matches any valid LayerTreeNode object.

Defined in ​

profectus/src/data/common.tsx:195


GenericResetButton ​

Ƭ GenericResetButton: Replace<GenericClickable & ResetButton<ResetButtonOptions>, { canClick: ProcessedComputable<boolean> ; display: ProcessedComputable<CoercableComponent> ; minimumGain: ProcessedComputable<DecimalSource> ; resetDescription: ProcessedComputable<string> ; showNextAt: ProcessedComputable<boolean> }>

A type that matches any valid ResetButton object.

Defined in ​

profectus/src/data/common.tsx:83


LayerTreeNode ​

Ƭ LayerTreeNode<T>: Replace<TreeNode<T>, { append: GetComputableType<T["append"]> ; display: GetComputableTypeWithDefault<T["display"], T["layerID"]> }>

A tree node that is associated with a given layer, and which opens the layer when clicked.

Type parameters ​

NameType
Textends LayerTreeNodeOptions

Defined in ​

profectus/src/data/common.tsx:187


ResetButton ​

Ƭ 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> }>

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.

Type parameters ​

NameType
Textends ResetButtonOptions

Defined in ​

profectus/src/data/common.tsx:70

Functions ​

colorText ​

â–¸ colorText(textToColor, color?): JSX.Element

Creates an HTML string for a span that writes some given text in a given color.

Parameters ​
NameTypeDefault valueDescription
textToColorstringundefinedThe content to change the color of
colorstring"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 ​

profectus/src/data/common.tsx:376


createCollapsibleAchievements ​

â–¸ createCollapsibleAchievements(achievements): Object

Creates a collapsible display of a list of achievements

Parameters ​
NameTypeDescription
achievementsRecord<string, GenericAchievement>A dictionary of the achievements to display, inserted in the order from easiest to hardest
Returns ​

Object

NameType
collapseAchievementsPersistent<boolean>
displayJSXFunction

Defined in ​

profectus/src/data/common.tsx:384


createCollapsibleModifierSections ​

â–¸ createCollapsibleModifierSections(sectionsFunc): [JSXFunction, Persistent<Record<number, boolean>>]

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.

Parameters ​
NameTypeDescription
sectionsFunc() => Section[]A function that returns the sections to display.
Returns ​

[JSXFunction, Persistent<Record<number, boolean>>]

Defined in ​

profectus/src/data/common.tsx:257


createFormulaPreview ​

â–¸ createFormulaPreview(formula, showPreview, previewAmount?): JSXFunction

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.

Parameters ​
NameTypeDefault valueDescription
formulaGenericFormulaundefinedThe formula to display the result of.
showPreviewComputable<boolean>undefinedWhether or not to preview how the formula's result will change.
previewAmountComputable<DecimalSource>1The amount to add to the current formula's variable amount to preview the change in result.
Returns ​

JSXFunction

Defined in ​

profectus/src/data/common.tsx:454


createLayerTreeNode ​

â–¸ createLayerTreeNode<T>(optionsFunc): LayerTreeNode<T>

Lazily creates a tree node that's associated with a specific layer, with the given options.

Type parameters ​
NameType
Textends LayerTreeNodeOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T>A function that returns the options object for this tree node.
Returns ​

LayerTreeNode<T>

Defined in ​

profectus/src/data/common.tsx:207


createResetButton ​

â–¸ createResetButton<T>(optionsFunc): ResetButton<T>

Lazily creates a reset button with the given options.

Type parameters ​
NameType
Textends ClickableOptions & ResetButtonOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T>A function that returns the options object for this reset button.
Returns ​

ResetButton<T>

Defined in ​

profectus/src/data/common.tsx:98


estimateTime ​

â–¸ estimateTime(resource, rate, target): ComputedRef<string>

Utility function for getting an ETA for when a target will be reached by a resource with a known (and assumed consistent) gain.

Parameters ​
NameTypeDescription
resourceResource<DecimalSource>The resource that will be increasing over time.
rateComputable<DecimalSource>The rate at which the resource is increasing.
targetComputable<DecimalSource>The target amount of the resource to estimate the duration until.
Returns ​

ComputedRef<string>

Defined in ​

profectus/src/data/common.tsx:428

- diff --git a/api/modules/data/projEntry.html b/api/modules/data/projEntry.html index 4d230617..746acb9e 100644 --- a/api/modules/data/projEntry.html +++ b/api/modules/data/projEntry.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: data/projEntry ​

Variables ​

hasWon ​

• Const hasWon: ComputedRef<boolean>

A computed ref whose value is true whenever the game is over.

Defined in ​

profectus/src/data/projEntry.tsx:88

Functions ​

fixOldSave ​

â–¸ fixOldSave(oldVersion, player): void

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.

Parameters ​
NameTypeDescription
oldVersionundefined | stringThe version of the save being loaded in
playerPartial<Player>The save data being loaded in
Returns ​

void

Defined in ​

profectus/src/data/projEntry.tsx:98


getInitialLayers ​

â–¸ getInitialLayers(player): GenericLayer[]

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.

Parameters ​
NameType
playerPartial<Player>
Returns ​

GenericLayer[]

Defined in ​

profectus/src/data/projEntry.tsx:80

- diff --git a/api/modules/data/themes.html b/api/modules/data/themes.html index a49ceb01..b43c7eab 100644 --- a/api/modules/data/themes.html +++ b/api/modules/data/themes.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: data/themes ​

Enumerations ​

Themes ​

• Themes: Object

An enum of all available themes and their internal IDs. The keys are their display names.

NameType
Aqua"aqua"
Classic"classic"
Nordic"nordic"
Paper"paper"

Defined in ​

profectus/src/data/themes.ts:73

Interfaces ​

Theme ​

• Theme: Object

An object representing a theme the player can use to change the look of the game.

NameTypeDescription
floatingTabsbooleanWhether or not tabs should "float" in the center of their container.
mergeAdjacentbooleanWhether 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.
showPinbooleanWhether or not to show a pin icon on pinned tooltips.
variablesThemeVarsThe values of the theme's CSS variables.

Defined in ​

profectus/src/data/themes.ts:24


ThemeVars ​

• ThemeVars: Object

A object of all CSS variables determined by the current theme.

NameType
--accent1string
--accent2string
--accent3string
--backgroundstring
--border-radiusstring
--boughtstring
--dangerstring
--feature-foregroundstring
--feature-marginstring
--foregroundstring
--highlightedstring
--linkstring
--lockedstring
--modal-borderstring
--outlinestring
--pointsstring
--raised-backgroundstring
--tooltip-backgroundstring

Defined in ​

profectus/src/data/themes.ts:2

Variables ​

default ​

• default: Record<Themes, Theme>

A dictionary of all available themes.

Defined in ​

profectus/src/data/themes.ts:81

- diff --git a/api/modules/features/achievement.html b/api/modules/features/achievement.html index 1d6af053..d58c2e85 100644 --- a/api/modules/features/achievement.html +++ b/api/modules/features/achievement.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/achievements/achievement ​

Enumerations ​

AchievementDisplay ​

• AchievementDisplay: Object

Modes for only displaying some achievements.

NameType
All"all"
Configurable"configurable"
Incomplete"incomplete"
None"none"

Defined in ​

profectus/src/features/achievements/achievement.tsx:51

Interfaces ​

AchievementOptions ​

• AchievementOptions: Object

An object that configures an Achievement.

NameTypeDescription
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?VoidFunctionA function that is called when the achievement is completed.
requirements?RequirementsThe 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 ​

profectus/src/features/achievements/achievement.tsx:62


BaseAchievement ​

• BaseAchievement: Object

The properties that are added onto a processed AchievementOptions to create an Achievement.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
completeVoidFunctionA function to complete this achievement.
earnedPersistent<boolean>Whether or not this achievement has been earned.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
typetypeof AchievementTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/achievements/achievement.tsx:98

Type Aliases ​

Achievement ​

Ƭ 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> }>

An object that represents a feature with requirements that is passively earned upon meeting certain requirements.

Type parameters ​

NameType
Textends AchievementOptions

Defined in ​

profectus/src/features/achievements/achievement.tsx:114


GenericAchievement ​

Ƭ GenericAchievement: Replace<Achievement<AchievementOptions>, { showPopups: ProcessedComputable<boolean> ; visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Achievement object.

Defined in ​

profectus/src/features/achievements/achievement.tsx:128

Variables ​

AchievementType ​

• Const AchievementType: typeof AchievementType

A symbol used to identify Achievement features.

Defined in ​

profectus/src/features/achievements/achievement.tsx:48

Functions ​

createAchievement ​

â–¸ createAchievement<T>(optionsFunc?, ...decorators): Achievement<T>

Lazily creates an achievement with the given options.

Type parameters ​
NameType
Textends AchievementOptions
Parameters ​
NameTypeDescription
optionsFunc?OptionsFunc<T, BaseAchievement, GenericAchievement>Achievement options.
...decoratorsGenericDecorator[]-
Returns ​

Achievement<T>

Defined in ​

profectus/src/features/achievements/achievement.tsx:140

Components ​

Achievement Component ​

Props ​

NameType
visibility*processedPropType<Visibility | boolean>(Number, Boolean)
displayprocessedPropType<UnwrapRef<GenericAchievement["display"]>>(Object, String, Function)
earned*processedPropType<boolean>(Boolean)
requirementsprocessedPropType<Requirements>(Object, Array)
imageprocessedPropType<string>(String)
styleprocessedPropType<StyleValue>(String, Object, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
markprocessedPropType<boolean | string>(Boolean, String)
smallprocessedPropType<boolean>(Boolean)
id*string
- diff --git a/api/modules/features/action.html b/api/modules/features/action.html index cf9513a7..9eb965df 100644 --- a/api/modules/features/action.html +++ b/api/modules/features/action.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/action ​

Interfaces ​

ActionOptions ​

• ActionOptions: Object

An object that configures an Action.

NameTypeDescription
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.
durationComputable<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) => voidA function that is called when the action is clicked.
small?booleanToggles 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 ​

profectus/src/features/action.tsx:42


BaseAction ​

• BaseAction: Object

The properties that are added onto a processed ActionOptions to create an Action.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
isHoldingRef<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.
progressRef<DecimalSource>The current amount of progress through the cooldown.
progressBarGenericBarThe bar used to display the current cooldown progress.
typetypeof ActionTypeA symbol that helps identify features of the same type.
update(diff: number) => voidUpdate the cooldown the specified number of seconds

Defined in ​

profectus/src/features/action.tsx:56

Type Aliases ​

Action ​

Ƭ 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> }>

An object that represents a feature that can be clicked upon, and then has a cooldown before it can be clicked again.

Type parameters ​

NameType
Textends ActionOptions

Defined in ​

profectus/src/features/action.tsx:76


GenericAction ​

Ƭ GenericAction: Replace<Action<ActionOptions>, { autoStart: ProcessedComputable<boolean> ; canClick: ProcessedComputable<boolean> ; visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Action object.

Defined in ​

profectus/src/features/action.tsx:92

Variables ​

ActionType ​

• Const ActionType: typeof ActionType

A symbol used to identify Action features.

Defined in ​

profectus/src/features/action.tsx:37

Functions ​

createAction ​

â–¸ createAction<T>(optionsFunc?, ...decorators): Action<T>

Lazily creates an action with the given options.

Type parameters ​
NameType
Textends ActionOptions<T>
Parameters ​
NameTypeDescription
optionsFunc?OptionsFunc<T, BaseAction, GenericAction>Action options.
...decoratorsGenericDecorator[]-
Returns ​

Action<T>

Defined in ​

profectus/src/features/action.tsx:105

- diff --git a/api/modules/features/bar.html b/api/modules/features/bar.html index fedb4702..97503b7b 100644 --- a/api/modules/features/bar.html +++ b/api/modules/features/bar.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/bars/bar ​

Interfaces ​

BarOptions ​

• BarOptions: Object

An object that configures a Bar.

NameTypeDescription
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.
directionComputable<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.
heightComputable<number>The height of the bar.
mark?Computable<string | boolean>Shows a marker on the corner of the feature.
progressComputable<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.
widthComputable<number>The width of the bar.

Defined in ​

profectus/src/features/bars/bar.ts:29


BaseBar ​

• BaseBar: Object

The properties that are added onto a processed BarOptions to create a Bar.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
typetypeof BarTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/bars/bar.ts:61

Type Aliases ​

Bar ​

Ƭ 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"]> }>

An object that represents a feature that displays some sort of progress or completion or resource with a cap.

Type parameters ​

NameType
Textends BarOptions

Defined in ​

profectus/src/features/bars/bar.ts:73


GenericBar ​

Ƭ GenericBar: Replace<Bar<BarOptions>, { visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Bar object.

Defined in ​

profectus/src/features/bars/bar.ts:93

Variables ​

BarType ​

• Const BarType: typeof BarType

A symbol used to identify Bar features.

Defined in ​

profectus/src/features/bars/bar.ts:24

Functions ​

createBar ​

â–¸ createBar<T>(optionsFunc, ...decorators): Bar<T>

Lazily creates a bar with the given options.

Type parameters ​
NameType
Textends BarOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseBar, GenericBar>Bar options.
...decoratorsGenericDecorator[]-
Returns ​

Bar<T>

Defined in ​

profectus/src/features/bars/bar.ts:104

Components ​

Bar Component ​

Props ​

NameType
progress*processedPropType<DecimalSource>(String, Object, Number)
width*processedPropType<number>(Number)
height*processedPropType<number>(Number)
direction*processedPropType<Direction>(String)
displayprocessedPropType<CoercableComponent>(Object, String, Function)
visibility*processedPropType<Visibility | boolean>(Number, Boolean)
styleprocessedPropType<StyleValue>(Object, String, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
borderStyleprocessedPropType<StyleValue>(Object, String, Array)
textStyleprocessedPropType<StyleValue>(Object, String, Array)
baseStyleprocessedPropType<StyleValue>(Object, String, Array)
fillStyleprocessedPropType<StyleValue>(Object, String, Array)
markprocessedPropType<boolean | string>(Boolean, String)
id*string
- diff --git a/api/modules/features/board.html b/api/modules/features/board.html index 5863432c..c8cd87b2 100644 --- a/api/modules/features/board.html +++ b/api/modules/features/board.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/boards/board ​

Enumerations ​

ProgressDisplay ​

• ProgressDisplay: Object

Ways to display progress of an action with a duration.

NameType
Fill"Fill"
Outline"Outline"

Defined in ​

profectus/src/features/boards/board.ts:41


Shape ​

• Shape: Object

Node shapes.

NameType
Circle"Circle"
Diamond"Triangle"

Defined in ​

profectus/src/features/boards/board.ts:47

Interfaces ​

BaseBoard ​

• BaseBoard: Object

The properties that are added onto a processed BoardOptions to create a Board.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
draggingNodeRef<null | BoardNode>The currently being dragged node, if any.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
mousePositionRef<null | { x: number ; y: number }>The current mouse position, if over the board.
nodesRef<BoardNode[]>All the nodes currently on the board.
placeInAvailableSpace(node: BoardNode, radius?: number, direction?: Direction) => voidPlaces a node in the nearest empty space in the given direction with the specified space around it.
receivingNodeRef<null | BoardNode>If dragging a node, the node it's currently being hovered over, if any.
selectedActionRef<null | GenericBoardNodeAction>The currently selected action, if any.
selectedNodeRef<null | BoardNode>The currently selected node, if any.
typetypeof BoardTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/boards/board.ts:254


BaseBoardNodeAction ​

• BaseBoardNodeAction: Object

The properties that are added onto a processed BoardNodeActionOptions to create an BoardNodeAction.

NameType
links?Ref<BoardNodeLink[]>

Defined in ​

profectus/src/features/boards/board.ts:201


BaseNodeType ​

• BaseNodeType: Object

The properties that are added onto a processed NodeTypeOptions to create a NodeType.

NameTypeDescription
nodesRef<BoardNode[]>The nodes currently on the board of this type.

Defined in ​

profectus/src/features/boards/board.ts:134


BoardNode ​

• BoardNode: Object

An object representing a node on the board.

NameType
idnumber
pinned?boolean
position{ x: number ; y: number }
position.xnumber
position.ynumber
state?State
typestring

Defined in ​

profectus/src/features/boards/board.ts:53


BoardNodeActionOptions ​

• BoardNodeActionOptions: Object

An object that configures a BoardNodeAction.

NameTypeDescription
confirmationLabel?NodeComputable<NodeLabel, []>The confirmation label that appears under the action.
fillColor?NodeComputable<string, []>The fill color of the action.
iconNodeComputable<string, []>The icon to display for the action.
idstringA 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) => voidA function that is called when the action is clicked.
tooltipNodeComputable<NodeLabel, []>The tooltip text to display for the action.
visibility?NodeComputable<boolean | Visibility, []>Whether this action should be visible.

Defined in ​

profectus/src/features/boards/board.ts:179


• BoardNodeLink: Object

An object representing a link between two nodes on the board.

NameTypeDescription
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?stringIdentifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-atomic?BooleanishIndicates 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?BooleanishIndicates 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?NumberishDefines the total number of columns in a table, grid, or treegrid. See aria-colindex.
aria-colindex?NumberishDefines 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?NumberishDefines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. See - aria-colindex - aria-rowspan.
aria-controls?stringIdentifies 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?stringIdentifies the element (or elements) that describes the object. See aria-labelledby
aria-details?stringIdentifies the element that provides a detailed, extended description for the object. See aria-describedby.
aria-disabled?BooleanishIndicates 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?stringIdentifies the element that provides an error message for the object. See - aria-invalid - aria-describedby.
aria-expanded?BooleanishIndicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
aria-flowto?stringIdentifies 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?BooleanishIndicates 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?BooleanishIndicates 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?stringIndicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
aria-label?stringDefines a string value that labels the current element. See aria-labelledby.
aria-labelledby?stringIdentifies the element (or elements) that labels the current element. See aria-describedby.
aria-level?NumberishDefines 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?BooleanishIndicates whether an element is modal when displayed.
aria-multiline?BooleanishIndicates whether a text box accepts multiple lines of input or only a single line.
aria-multiselectable?BooleanishIndicates 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?stringIdentifies 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?stringDefines 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?NumberishDefines 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?BooleanishIndicates 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?BooleanishIndicates that user input is required on the element before a form may be submitted.
aria-roledescription?stringDefines a human-readable, author-localized description for the role of an element.
aria-rowcount?NumberishDefines the total number of rows in a table, grid, or treegrid. See aria-rowindex.
aria-rowindex?NumberishDefines 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?NumberishDefines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. See - aria-rowindex - aria-colspan.
aria-selected?BooleanishIndicates the current "selected" state of various widgets. See - aria-checked - aria-pressed.
aria-setsize?NumberishDefines 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?NumberishDefines the maximum allowed value for a range widget.
aria-valuemin?NumberishDefines the minimum allowed value for a range widget.
aria-valuenow?NumberishDefines the current value for a range widget. See aria-valuetext.
aria-valuetext?stringDefines 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?anySVG 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-
endNodeBoardNode-
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-
startNodeBoardNode-
startOffset?Numberish-
stdDeviation?Numberish-
stemh?Numberish-
stemv?Numberish-
stitchTiles?Numberish-
stop-color?string-
stop-opacity?Numberish-
strikethrough-position?Numberish-
strikethrough-thickness?Numberish-
string?Numberish-
strokestring-
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-
strokeWidthnumber-
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 ​

profectus/src/features/boards/board.ts:65


BoardOptions ​

• BoardOptions: Object

An object that configures a Board.

NameTypeDescription
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.
typesRecord<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 ​

profectus/src/features/boards/board.ts:230


NodeLabel ​

• NodeLabel: Object

An object representing a label for a node.

NameType
color?string
pulsing?boolean
textstring

Defined in ​

profectus/src/features/boards/board.ts:74


NodeTypeOptions ​

• NodeTypeOptions: Object

An object that configures a NodeType.

NameTypeDescription
actionDistance?NodeComputable<number, []>The arc between each action, in radians.
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) => voidA function that is called when the node is clicked.
onDrop?(node: BoardNode, otherNode: BoardNode) => voidA 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.
shapeNodeComputable<Shape, []>The shape of the node.
sizeNodeComputable<number, []>The size of the node - diameter for circles, width and height for squares.
style?NodeComputable<StyleValue, []>CSS to apply to this node.
titleNodeComputable<string, []>The title to display for the node.
titleColor?NodeComputable<string, []>The color of the title text.
update?(node: BoardNode, diff: number) => voidA function that is called for each node of this type every tick.

Defined in ​

profectus/src/features/boards/board.ts:90

Type Aliases ​

Board ​

Ƭ 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"]> }>

An object that represents a feature that is a zoomable, pannable board with various nodes upon it.

Type parameters ​

NameType
Textends BoardOptions

Defined in ​

profectus/src/features/boards/board.ts:280


BoardData ​

Ƭ BoardData: Object

The persistent data for a board.

Type declaration ​

NameType
nodesBoardNode[]
selectedActionstring | null
selectedNodenumber | null

Defined in ​

profectus/src/features/boards/board.ts:81


BoardNodeAction ​

Ƭ 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> }>

An object that represents an action that can be taken upon a node.

Type parameters ​

NameType
Textends BoardNodeActionOptions

Defined in ​

profectus/src/features/boards/board.ts:206


GenericBoard ​

Ƭ GenericBoard: Replace<Board<BoardOptions>, { links: ProcessedComputable<BoardNodeLink[] | null> ; state: ProcessedComputable<BoardData> ; visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Board object.

Defined in ​

profectus/src/features/boards/board.ts:295


GenericBoardNodeAction ​

Ƭ GenericBoardNodeAction: Replace<BoardNodeAction<BoardNodeActionOptions>, { confirmationLabel: NodeComputable<NodeLabel> ; visibility: NodeComputable<Visibility | boolean> }>

A type that matches any valid BoardNodeAction object.

Defined in ​

profectus/src/features/boards/board.ts:219


GenericNodeType ​

Ƭ 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> }>

A type that matches any valid NodeType object.

Defined in ​

profectus/src/features/boards/board.ts:163


NodeComputable ​

Ƭ NodeComputable<T, S>: Computable<T> | (node: BoardNode, ...args: S) => T

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.

Type parameters ​

NameType
TT
Sextends unknown[] = []

Defined in ​

profectus/src/features/boards/board.ts:36


NodeType ​

Ƭ 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"]> }>

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.

Type parameters ​

NameType
Textends NodeTypeOptions

Defined in ​

profectus/src/features/boards/board.ts:140

Variables ​

BoardType ​

• Const BoardType: typeof BoardType

A symbol used to identify Board features.

Defined in ​

profectus/src/features/boards/board.ts:31

Functions ​

createBoard ​

â–¸ createBoard<T>(optionsFunc): Board<T>

Lazily creates a board with the given options.

Type parameters ​
NameType
Textends BoardOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseBoard, GenericBoard>Board options.
Returns ​

Board<T>

Defined in ​

profectus/src/features/boards/board.ts:308


getNodeProperty ​

â–¸ getNodeProperty<T, S>(property, node, ...args): T

Gets the value of a property for a specified node.

Type parameters ​
NameType
TT
Sextends unknown[]
Parameters ​
NameTypeDescription
propertyNodeComputable<T, S>The property to find the value of
nodeBoardNodeThe node to get the property of
...argsS-
Returns ​

T

Defined in ​

profectus/src/features/boards/board.ts:592


getUniqueNodeID ​

â–¸ getUniqueNodeID(board): number

Utility to get an ID for a node that is guaranteed unique.

Parameters ​
NameTypeDescription
boardGenericBoardThe board feature to generate an ID for
Returns ​

number

Defined in ​

profectus/src/features/boards/board.ts:606

Components ​

Board Component ​

Props ​

NameType
nodes*Ref
types*Record
state*Ref
visibility*ProcessedComputable
widthProcessedComputable
heightProcessedComputable
styleProcessedComputable
classesProcessedComputable
links*Ref
selectedAction*Ref
selectedNode*Ref
draggingNode*Ref
receivingNode*Ref
mousePosition*Ref
setReceivingNode*TSFunctionType
setDraggingNode*TSFunctionType

Props ​

NameType
link*BoardNodeLink
dragging*BoardNode | null
dragged{
x: number;
y: number;
}

BoardNodeAction Component ​

Props ​

NameType
node*BoardNode
nodeType*GenericNodeType
actionsGenericBoardNodeAction[]
isSelected*boolean
selectedAction*GenericBoardNodeAction | null

Events ​

Name
clickAction

BoardNode Component ​

Props ​

NameType
node*BoardNode
nodeType*GenericNodeType
dragging*BoardNode | null
dragged{
x: number;
y: number;
}
hasDraggedboolean
receivingNodeboolean
isSelected*boolean
selectedAction*GenericBoardNodeAction | null

Events ​

Name
mouseDown
endDragging
clickAction
- diff --git a/api/modules/features/challenge.html b/api/modules/features/challenge.html index 63f4aa29..1c87798a 100644 --- a/api/modules/features/challenge.html +++ b/api/modules/features/challenge.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/challenges/challenge ​

Interfaces ​

BaseChallenge ​

• BaseChallenge: Object

The properties that are added onto a processed ChallengeOptions to create a Challenge.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
activePersistent<boolean>Whether or not this challenge is currently active.
canCompleteRef<DecimalSource>The current amount of times this challenge can be completed.
complete(remainInChallenge?: boolean) => voidA function to complete this challenge.
completedRef<boolean>Whether or not this challenge has been completed.
completionsPersistent<DecimalSource>The current number of times this challenge has been completed.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
maxedRef<boolean>Whether or not this challenge's completion count is at its limit.
toggleVoidFunctionA function to enter or leave the challenge.
typetypeof ChallengeTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/challenges/challenge.tsx:90


ChallengeOptions ​

• ChallengeOptions: Object

An object that configures a Challenge.

NameTypeDescription
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.
onComplete?VoidFunctionA function that is called when the challenge is completed.
onEnter?VoidFunctionA function that is called when the challenge is entered.
onExit?VoidFunctionA function that is called when the challenge is exited.
requirementsRequirementsThe requirement(s) to complete this challenge.
reset?GenericResetThe 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 ​

profectus/src/features/challenges/challenge.tsx:46

Type Aliases ​

Challenge ​

Ƭ 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>> ; requirements: GetComputableType<T["requirements"]> ; style: GetComputableType<T["style"]> ; visibility: GetComputableTypeWithDefault<T["visibility"], Visible> }>

An object that represents a feature that can be entered and exited, and have one or more completions with scaling requirements.

Type parameters ​

NameType
Textends ChallengeOptions

Defined in ​

profectus/src/features/challenges/challenge.tsx:119


GenericChallenge ​

Ƭ GenericChallenge: Replace<Challenge<ChallengeOptions>, { canStart: ProcessedComputable<boolean> ; completionLimit: ProcessedComputable<DecimalSource> ; mark: ProcessedComputable<boolean> ; visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Challenge object.

Defined in ​

profectus/src/features/challenges/challenge.tsx:134

Variables ​

ChallengeType ​

• Const ChallengeType: typeof ChallengeType

A symbol used to identify Challenge features.

Defined in ​

profectus/src/features/challenges/challenge.tsx:41

Functions ​

createActiveChallenge ​

â–¸ createActiveChallenge(challenges): Ref<GenericChallenge | null>

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)

Parameters ​
NameTypeDescription
challengesGenericChallenge[]The list of challenges that are mutually exclusive
Returns ​

Ref<GenericChallenge | null>

Defined in ​

profectus/src/features/challenges/challenge.tsx:338


createChallenge ​

â–¸ createChallenge<T>(optionsFunc, ...decorators): Challenge<T>

Lazily creates a challenge with the given options.

Type parameters ​
NameType
Textends ChallengeOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseChallenge, GenericChallenge>Challenge options.
...decoratorsGenericDecorator[]-
Returns ​

Challenge<T>

Defined in ​

profectus/src/features/challenges/challenge.tsx:148


isAnyChallengeActive ​

â–¸ isAnyChallengeActive(challenges): Ref<boolean>

Utility for reporting if any challenge in a list is currently active. Intended for preventing entering a challenge if another is already active.

Parameters ​
NameTypeDescription
challengesGenericChallenge[] | Ref<null | GenericChallenge>List of challenges that are mutually exclusive
Returns ​

Ref<boolean>

Defined in ​

profectus/src/features/challenges/challenge.tsx:348


setupAutoComplete ​

â–¸ setupAutoComplete(challenge, autoActive?, exitOnComplete?): WatchStopHandle

This will automatically complete a challenge when it's requirements are met.

Parameters ​
NameTypeDefault valueDescription
challengeGenericChallengeundefinedThe challenge to auto-complete
autoActiveComputable<boolean>trueWhether or not auto-completing should currently occur
exitOnCompletebooleantrueWhether or not to exit the challenge after auto-completion
Returns ​

WatchStopHandle

Defined in ​

profectus/src/features/challenges/challenge.tsx:318

Components ​

Challenge Component ​

Props ​

NameType
active*processedPropType<boolean>(Boolean)
maxed*processedPropType<boolean>(Boolean)
canComplete*processedPropType<boolean>(Boolean)
displayprocessedPropType<UnwrapRef<GenericChallenge["display"]>>(
String,
Object,
Function
)
requirementsprocessedPropType<Requirements>(Object, Array)
visibility*processedPropType<Visibility | boolean>(Number, Boolean)
styleprocessedPropType<StyleValue>(String, Object, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
completed*processedPropType<boolean>(Boolean)
canStart*processedPropType<boolean>(Boolean)
markprocessedPropType<boolean | string>(Boolean, String)
id*string
toggle*VoidFunction
- diff --git a/api/modules/features/clickable.html b/api/modules/features/clickable.html index 21b5b959..38f6fa97 100644 --- a/api/modules/features/clickable.html +++ b/api/modules/features/clickable.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/clickables/clickable ​

Interfaces ​

BaseClickable ​

• BaseClickable: Object

The properties that are added onto a processed ClickableOptions to create an Clickable.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
typetypeof ClickableTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/clickables/clickable.ts:61


ClickableOptions ​

• ClickableOptions: Object

An object that configures a Clickable.

NameTypeDescription
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) => voidA function that is called when the clickable is clicked.
onHold?VoidFunctionA function that is called when the clickable is held down.
small?booleanToggles 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 ​

profectus/src/features/clickables/clickable.ts:29

Type Aliases ​

Clickable ​

Ƭ 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> }>

An object that represents a feature that can be clicked or held down.

Type parameters ​

NameType
Textends ClickableOptions

Defined in ​

profectus/src/features/clickables/clickable.ts:73


GenericClickable ​

Ƭ GenericClickable: Replace<Clickable<ClickableOptions>, { canClick: ProcessedComputable<boolean> ; visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Clickable object.

Defined in ​

profectus/src/features/clickables/clickable.ts:86

Variables ​

ClickableType ​

• Const ClickableType: typeof ClickableType

A symbol used to identify Clickable features.

Defined in ​

profectus/src/features/clickables/clickable.ts:24

Functions ​

createClickable ​

â–¸ createClickable<T>(optionsFunc?, ...decorators): Clickable<T>

Lazily creates a clickable with the given options.

Type parameters ​
NameType
Textends ClickableOptions
Parameters ​
NameTypeDescription
optionsFunc?OptionsFunc<T, BaseClickable, GenericClickable>Clickable options.
...decoratorsGenericDecorator[]-
Returns ​

Clickable<T>

Defined in ​

profectus/src/features/clickables/clickable.ts:98


setupAutoClick ​

â–¸ setupAutoClick(layer, clickable, autoActive?): Unsubscribe

Utility to auto click a clickable whenever it can be.

Parameters ​
NameTypeDefault valueDescription
layerBaseLayerundefinedThe layer the clickable is apart of
clickableGenericClickableundefinedThe clicker to click automatically
autoActiveComputable<boolean>trueWhether or not the clickable should currently be auto-clicking
Returns ​

Unsubscribe

Defined in ​

profectus/src/features/clickables/clickable.ts:192

Components ​

Clickable Component ​

Props ​

NameType
display*processedPropType<UnwrapRef<GenericClickable["display"]>>(
Object,
String,
Function
)
visibility*processedPropType<Visibility | boolean>(Number, Boolean)
styleprocessedPropType<StyleValue>(Object, String, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
onClick(e?: MouseEvent | TouchEvent) => void
onHoldVoidFunction
canClick*processedPropType<boolean>(Boolean)
smallboolean
markprocessedPropType<boolean | string>(Boolean, String)
id*string
- diff --git a/api/modules/features/conversion.html b/api/modules/features/conversion.html index 6ce23561..9231e793 100644 --- a/api/modules/features/conversion.html +++ b/api/modules/features/conversion.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/conversion ​

Interfaces ​

BaseConversion ​

• BaseConversion: Object

The properties that are added onto a processed ConversionOptions to create a Conversion.

NameTypeDescription
convertVoidFunctionThe function that performs the actual conversion.

Defined in ​

profectus/src/features/conversion.ts:80


ConversionOptions ​

• ConversionOptions: Object

An object that configures a Conversion.

NameTypeDescription
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.
baseResourceResource<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?VoidFunctionThe 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) => InvertibleFormulaThe formula used to determine how much gainResource should be earned by this converting. The passed value will be a Formula representing the baseResource variable.
gainResourceResource<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) => voidA 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) => voidThe function that spends the baseResource as part of the conversion. Defaults to setting the baseResource amount to 0.

Defined in ​

profectus/src/features/conversion.ts:18

Type Aliases ​

Conversion ​

Ƭ 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"] }>

An object that converts one Resource into another at a given rate.

Type parameters ​

NameType
Textends ConversionOptions

Defined in ​

profectus/src/features/conversion.ts:88


GenericConversion ​

Ƭ GenericConversion: Replace<Conversion<ConversionOptions>, { actualGain: ProcessedComputable<DecimalSource> ; buyMax: ProcessedComputable<boolean> ; currentAt: ProcessedComputable<DecimalSource> ; currentGain: ProcessedComputable<DecimalSource> ; nextAt: ProcessedComputable<DecimalSource> ; spend: (amountGained: DecimalSource) => void }>

A type that matches any valid Conversion object.

Defined in ​

profectus/src/features/conversion.ts:102

Functions ​

createCanConvertRequirement ​

â–¸ createCanConvertRequirement(conversion, minGainAmount?, display?): Requirement

Creates requirement that is met when the conversion hits a specified gain amount

Parameters ​
NameTypeDefault valueDescription
conversionGenericConversionundefinedThe conversion to check the gain amount of
minGainAmountComputable<DecimalSource>1The minimum gain amount that must be met for the requirement to be met
display?CoercableComponentundefined-
Returns ​

Requirement

Defined in ​

profectus/src/features/conversion.ts:302


createConversion ​

â–¸ createConversion<T>(optionsFunc, ...decorators): Conversion<T>

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.

See

Type parameters ​
NameType
Textends ConversionOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseConversion, GenericConversion>Conversion options.
...decoratorsGenericDecorator[]-
Returns ​

Conversion<T>

Defined in ​

profectus/src/features/conversion.ts:121


createCumulativeConversion ​

â–¸ createCumulativeConversion<S>(optionsFunc): Conversion<S>

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.

Type parameters ​
NameType
Sextends ConversionOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<S, BaseConversion, GenericConversion>Conversion options.
Returns ​

Conversion<S>

Defined in ​

profectus/src/features/conversion.ts:205


createIndependentConversion ​

â–¸ createIndependentConversion<S>(optionsFunc): Conversion<S>

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.

Type parameters ​
NameType
Sextends ConversionOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<S, BaseConversion, GenericConversion>Converison options.
Returns ​

Conversion<S>

Defined in ​

profectus/src/features/conversion.ts:216


setupPassiveGeneration ​

â–¸ setupPassiveGeneration(layer, conversion, rate?, cap?): void

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.

Parameters ​
NameTypeDefault valueDescription
layerBaseLayerundefinedThe layer this passive generation will be associated with. Typically this when calling this function from inside a layer's options function.
conversionGenericConversionundefinedThe conversion that will determine how much generation there is.
rateComputable<DecimalSource>1A multiplier to multiply against the conversion's currentGain.
capComputable<DecimalSource>Decimal.dInfA value that should not be passed via passive generation.
Returns ​

void

Defined in ​

profectus/src/features/conversion.ts:276

- diff --git a/api/modules/features/decorators/bonusDecorator.html b/api/modules/features/decorators/bonusDecorator.html index 83ac0176..aa363492 100644 --- a/api/modules/features/decorators/bonusDecorator.html +++ b/api/modules/features/decorators/bonusDecorator.html @@ -47,7 +47,7 @@ bonusCompletions: noPersist(otherChallenge.completions), ... }), bonusCompletionDecorator) as GenericChallenge & GenericBonusCompletionFeature

Defined in ​

profectus/src/features/decorators/bonusDecorator.ts:101

- diff --git a/api/modules/features/decorators/common.html b/api/modules/features/decorators/common.html index d0b893a5..1f83ba92 100644 --- a/api/modules/features/decorators/common.html +++ b/api/modules/features/decorators/common.html @@ -25,7 +25,7 @@ effect() { return Decimal.pow(2, this.amount); }, ... }), effectDecorator) as GenericUpgrade & GenericEffectFeature;

Defined in ​

profectus/src/features/decorators/common.ts:55

- diff --git a/api/modules/features/feature.html b/api/modules/features/feature.html index 54676151..a448c2e6 100644 --- a/api/modules/features/feature.html +++ b/api/modules/features/feature.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/feature ​

Enumerations ​

Visibility ​

• Visibility: Object

Enum for what the visibility of a feature or component should be

NameTypeDescription
Hidden1The feature or component should not appear but still take up space
None2The feature or component should not appear not take up space
Visible0The feature or component should be visible

Defined in ​

profectus/src/features/feature.ts:61

Type Aliases ​

CoercableComponent ​

Ƭ CoercableComponent: string | DefineComponent | JSXFunction

Any value that can be coerced into (or is) a vue component

Defined in ​

profectus/src/features/feature.ts:25


GenericComponent ​

Ƭ GenericComponent: DefineComponent<any, any, any>

A type that refers to any vue component

Defined in ​

profectus/src/features/feature.ts:35


JSXFunction ​

Ƭ 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

jsx

Defined in ​

profectus/src/features/feature.ts:21


OptionsFunc ​

Ƭ OptionsFunc<T, R, S>: (obj: R) => OptionsObject<T, R, S>

Type parameters ​

NameType
TT
Runknown
SR

Type declaration ​

â–¸ (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.

Parameters ​
NameType
objR
Returns ​

OptionsObject<T, R, S>

Defined in ​

profectus/src/features/feature.ts:45


OptionsObject ​

Ƭ OptionsObject<T, R, S>: T & Partial<R> & ThisType<T & S>

Type parameters ​

NameType
TT
Runknown
SR

Defined in ​

profectus/src/features/feature.ts:47


Replace ​

Ƭ 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

Type parameters ​

Name
T
S

Defined in ​

profectus/src/features/feature.ts:38


StyleValue ​

Ƭ 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.

Defined in ​

profectus/src/features/feature.ts:31

Variables ​

Component ​

• Const Component: typeof Component

A symbol to use as a key for a vue component a feature can be rendered with

See

VueFeature

Defined in ​

profectus/src/features/feature.ts:10


GatherProps ​

• 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

VueFeature

Defined in ​

profectus/src/features/feature.ts:15

Functions ​

excludeFeatures ​

â–¸ 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.

Parameters ​
NameTypeDescription
objRecord<string, unknown>The object to traverse
...typessymbol[]The feature types that will be skipped over
Returns ​

unknown[]

Defined in ​

profectus/src/features/feature.ts:130


findFeatures ​

â–¸ findFeatures(obj, ...types): unknown[]

Traverses an object and returns all features of the given type(s)

Parameters ​
NameTypeDescription
objRecord<string, unknown>The object to traverse
...typessymbol[]The feature types that will be searched for
Returns ​

unknown[]

Defined in ​

profectus/src/features/feature.ts:105


getUniqueID ​

â–¸ 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.

Parameters ​
NameTypeDefault valueDescription
prefixstring"feature-"A string to prepend to the id to make it more readable in the inspector tools
Returns ​

string

Defined in ​

profectus/src/features/feature.ts:56


isHidden ​

â–¸ isHidden(visibility): boolean

NameType
visibilityProcessedComputable<boolean | Visibility>

Defined in ​

profectus/src/features/feature.ts:75


isVisible ​

â–¸ isVisible(visibility): boolean

NameType
visibilityProcessedComputable<boolean | Visibility>

Defined in ​

profectus/src/features/feature.ts:70


jsx ​

â–¸ 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.

Parameters ​
NameType
func() => "" | Element
Returns ​

JSXFunction

Defined in ​

profectus/src/features/feature.ts:84


setDefault ​

â–¸ 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

Type parameters ​
NameType
TT
Kextends string | number | symbol
Parameters ​
NameType
objectT
keyK
valueT[K]
Returns ​

asserts object is Exclude<T, K> & Required<Pick<T, K>>

Defined in ​

profectus/src/features/feature.ts:90

- diff --git a/api/modules/features/grid.html b/api/modules/features/grid.html index 30db3bc8..a20f9c46 100644 --- a/api/modules/features/grid.html +++ b/api/modules/features/grid.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/grids/grid ​

Interfaces ​

BaseGrid ​

• BaseGrid: Object

The properties that are added onto a processed BoardOptions to create a Board.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
cellStatePersistent<Record<string | number, State>>The persistent state of this grid, which is a dictionary of cell states.
cellsRecord<string | number, GridCell>A dictionary of cells within this grid.
getID(id: string | number, state: State) => stringGet 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) => StateGet the persistent state of the given cell.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
setState(id: string | number, state: State) => voidSet the persistent state of the given cell.
typetypeof GridTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/grids/grid.ts:254


GridCell ​

• 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

NameTypeDescription
canClickbooleanWhether this cell can be clicked.
classes?Record<string, boolean>Dictionary of CSS classes to apply to this feature.
displayCoercableComponentThe main text that appears in the display.
idstringA unique identifier for the grid cell.
onClick?(e?: MouseEvent | TouchEvent) => voidA function that is called when the cell is clicked.
onHold?VoidFunctionA function that is called when the cell is held down.
startStateStateThe initial persistent state of this cell.
stateStateThe persistent state of this cell.
style?StyleValueCSS to apply to this feature.
title?CoercableComponentA header to appear at the top of the display.
visibilityboolean | VisibilityWhether this cell should be visible.

Defined in ​

profectus/src/features/grids/grid.ts:196


GridOptions ​

• GridOptions: Object

An object that configures a Grid.

NameTypeDescription
colsComputable<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.
getDisplayCellComputable<CoercableComponent>A computable to get the display component for a cell.
getStartStateComputable<State> | (id: string | number) => StateA 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) => voidA function that is called when a cell is clicked.
onHold?(id: string | number, state: State) => voidA function that is called when a cell is held down.
rowsComputable<number>The number of rows in the grid.
visibility?Computable<boolean | Visibility>Whether this grid should be visible.

Defined in ​

profectus/src/features/grids/grid.ts:224

Type Aliases ​

CellComputable ​

Ƭ CellComputable<T>: Computable<T> | (id: string | number, state: State) => T

A type representing a computable value for a cell in the grid.

Type parameters ​

Name
T

Defined in ​

profectus/src/features/grids/grid.ts:28


GenericGrid ​

Ƭ GenericGrid: Replace<Grid<GridOptions>, { getCanClick: ProcessedComputable<boolean> ; getVisibility: ProcessedComputable<Visibility | boolean> ; visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Grid object.

Defined in ​

profectus/src/features/grids/grid.ts:293


Grid ​

Ƭ 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.

Type parameters ​

NameType
Textends GridOptions

Defined in ​

profectus/src/features/grids/grid.ts:276

Variables ​

GridType ​

• Const GridType: typeof GridType

A symbol used to identify Grid features.

Defined in ​

profectus/src/features/grids/grid.ts:25

Functions ​

createGrid ​

â–¸ createGrid<T>(optionsFunc): Grid<T>

Lazily creates a grid with the given options.

Type parameters ​
NameType
Textends GridOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseGrid, GenericGrid>Grid options.
Returns ​

Grid<T>

Defined in ​

profectus/src/features/grids/grid.ts:306

Components ​

GridCell Component ​

Props ​

NameType
visibility*processedPropType<Visibility | boolean>(Number, Boolean)
onClick(e?: MouseEvent | TouchEvent) => void
onHoldVoidFunction
display*processedPropType<CoercableComponent>(Object, String, Function)
titleprocessedPropType<CoercableComponent>(Object, String, Function)
styleprocessedPropType<StyleValue>(String, Object, Array)
canClick*processedPropType<boolean>(Boolean)
id*string

Grid Component ​

Props ​

NameType
visibility*processedPropType<Visibility | boolean>(Number, Boolean)
rows*processedPropType<number>(Number)
cols*processedPropType<number>(Number)
cells*processedPropType<Record<string, GridCell>>(Object)
- diff --git a/api/modules/features/hotkey.html b/api/modules/features/hotkey.html index c57b0c87..f488d481 100644 --- a/api/modules/features/hotkey.html +++ b/api/modules/features/hotkey.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/hotkey ​

Interfaces ​

BaseHotkey ​

• BaseHotkey: Object

The properties that are added onto a processed HotkeyOptions to create an Hotkey.

NameTypeDescription
typetypeof HotkeyTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/hotkey.tsx:40


HotkeyOptions ​

• HotkeyOptions: Object

An object that configures a Hotkey.

NameTypeDescription
descriptionComputable<string>The description of this hotkey, to display in the settings.
enabled?Computable<boolean>Whether or not this hotkey is currently enabled.
keystringThe key tied to this hotkey
onPressVoidFunctionWhat to do upon pressing the key.

Defined in ​

profectus/src/features/hotkey.tsx:26

Type Aliases ​

GenericHotkey ​

Ƭ GenericHotkey: Replace<Hotkey<HotkeyOptions>, { enabled: ProcessedComputable<boolean> }>

A type that matches any valid Hotkey object.

Defined in ​

profectus/src/features/hotkey.tsx:55


Hotkey ​

Ƭ 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.

Type parameters ​

NameType
Textends HotkeyOptions

Defined in ​

profectus/src/features/hotkey.tsx:46

Variables ​

HotkeyType ​

• Const HotkeyType: typeof HotkeyType

A symbol used to identify Hotkey features.

Defined in ​

profectus/src/features/hotkey.tsx:21


hotkeys ​

• Const hotkeys: Record<string, GenericHotkey | undefined>

A dictionary of all hotkeys.

Defined in ​

profectus/src/features/hotkey.tsx:19

Functions ​

createHotkey ​

â–¸ createHotkey<T>(optionsFunc): Hotkey<T>

Lazily creates a hotkey with the given options.

Type parameters ​
NameType
Textends HotkeyOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseHotkey, GenericHotkey>Hotkey options.
Returns ​

Hotkey<T>

Defined in ​

profectus/src/features/hotkey.tsx:68

- diff --git a/api/modules/features/infobox.html b/api/modules/features/infobox.html index 2adcb4c6..02e47b0d 100644 --- a/api/modules/features/infobox.html +++ b/api/modules/features/infobox.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/infoboxes/infobox ​

Interfaces ​

BaseInfobox ​

• BaseInfobox: Object

The properties that are added onto a processed InfoboxOptions to create an Infobox.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
collapsedPersistent<boolean>Whether or not this infobox is collapsed.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
typetypeof InfoboxTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/infoboxes/infobox.ts:50


InfoboxOptions ​

• InfoboxOptions: Object

An object that configures an Infobox.

NameTypeDescription
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.
displayComputable<CoercableComponent>The main text that appears in the display.
style?Computable<StyleValue>CSS to apply to this feature.
titleComputable<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.

Defined in ​

profectus/src/features/infoboxes/infobox.ts:28

Type Aliases ​

GenericInfobox ​

Ƭ GenericInfobox: Replace<Infobox<InfoboxOptions>, { visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Infobox object.

Defined in ​

profectus/src/features/infoboxes/infobox.ts:79


Infobox ​

Ƭ 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.

Type parameters ​

NameType
Textends InfoboxOptions

Defined in ​

profectus/src/features/infoboxes/infobox.ts:64

Variables ​

InfoboxType ​

• Const InfoboxType: typeof InfoboxType

A symbol used to identify Infobox features.

Defined in ​

profectus/src/features/infoboxes/infobox.ts:23

Functions ​

createInfobox ​

â–¸ createInfobox<T>(optionsFunc): Infobox<T>

Lazily creates an infobox with the given options.

Type parameters ​
NameType
Textends InfoboxOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseInfobox, GenericInfobox>Infobox options.
Returns ​

Infobox<T>

Defined in ​

profectus/src/features/infoboxes/infobox.ts:90

Components ​

Infobox Component ​

Props ​

NameType
visibility*processedPropType<Visibility | boolean>(Number, Boolean)
display*processedPropType<CoercableComponent>(Object, String, Function)
title*processedPropType<CoercableComponent>(Object, String, Function)
colorprocessedPropType<string>(String)
collapsed*Ref<boolean>
styleprocessedPropType<StyleValue>(Object, String, Array)
titleStyleprocessedPropType<StyleValue>(Object, String, Array)
bodyStyleprocessedPropType<StyleValue>(Object, String, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
id*string
- diff --git a/api/modules/features/links.html b/api/modules/features/links.html index 28562441..e62ef68e 100644 --- a/api/modules/features/links.html +++ b/api/modules/features/links.html @@ -22,7 +22,7 @@
Skip to content
On this page
- diff --git a/api/modules/features/particles.html b/api/modules/features/particles.html index c60faad8..c11e684f 100644 --- a/api/modules/features/particles.html +++ b/api/modules/features/particles.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/particles/particles ​

Interfaces ​

BaseParticles ​

• BaseParticles: Object

The properties that are added onto a processed ParticlesOptions to create an Particles.

NameTypeDescription
[Component]GenericComponentThe 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
appRef<null | Application>The Pixi.JS Application powering this particles canvas.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
typetypeof ParticlesTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/particles/particles.tsx:31


ParticlesOptions ​

• ParticlesOptions: Object

An object that configures Particles.

NameTypeDescription
classes?Computable<Record<string, boolean>>Dictionary of CSS classes to apply to this feature.
onContainerResized?(boundingRect: DOMRect) => voidA function that is called when the particles canvas is resized.
onHotReload?VoidFunctionA 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.

Defined in ​

profectus/src/features/particles/particles.tsx:17

Type Aliases ​

GenericParticles ​

Ƭ GenericParticles: Particles<ParticlesOptions>

A type that matches any valid Particles object.

Defined in ​

profectus/src/features/particles/particles.tsx:63


Particles ​

Ƭ 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.

Type parameters ​

NameType
Textends ParticlesOptions

Defined in ​

profectus/src/features/particles/particles.tsx:54

Variables ​

ParticlesType ​

• Const ParticlesType: typeof ParticlesType

A symbol used to identify Particles features.

Defined in ​

profectus/src/features/particles/particles.tsx:12

Functions ​

createParticles ​

â–¸ createParticles<T>(optionsFunc?): Particles<T>

Lazily creates particles with the given options.

Type parameters ​
NameType
Textends ParticlesOptions
Parameters ​
NameTypeDescription
optionsFunc?OptionsFunc<T, BaseParticles, GenericParticles>Particles options.
Returns ​

Particles<T>

Defined in ​

profectus/src/features/particles/particles.tsx:69

Components ​

Particles Component ​

Props ​

NameType
styleprocessedPropType<StyleValue>(String, Object, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
onInit*(app: Application) => void
id*string
onContainerResized(rect: DOMRect) => void
onHotReloadVoidFunction
- diff --git a/api/modules/features/repeatable.html b/api/modules/features/repeatable.html index 8eba5dd6..d68978f9 100644 --- a/api/modules/features/repeatable.html +++ b/api/modules/features/repeatable.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/repeatable ​

Interfaces ​

BaseRepeatable ​

• BaseRepeatable: Object

The properties that are added onto a processed RepeatableOptions to create a Repeatable.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
amountPersistent<DecimalSource>The current amount this repeatable has.
amountToIncreaseRef<DecimalSource>How much amount can be increased by, or 1 if unclickable.
canClickProcessedComputable<boolean>Whether or not this repeatable can be clicked.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
maxedRef<boolean>Whether or not this repeatable's amount is at it's limit.
onClick(event?: MouseEvent | TouchEvent) => voidA function that gets called when this repeatable is clicked.
typetypeof RepeatableTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/repeatable.tsx:77


RepeatableOptions ​

• RepeatableOptions: Object

An object that configures a Repeatable.

NameTypeDescription
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?DecimalSourceThe 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.
requirementsRequirementsThe 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.

Defined in ​

profectus/src/features/repeatable.tsx:53

Type Aliases ​

GenericRepeatable ​

Ƭ GenericRepeatable: Replace<Repeatable<RepeatableOptions>, { limit: ProcessedComputable<DecimalSource> ; visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Repeatable object.

Defined in ​

profectus/src/features/repeatable.tsx:116


Repeatable ​

Ƭ Repeatable<T>: Replace<T & BaseRepeatable, { classes: GetComputableType<T["classes"]> ; display: Ref<CoercableComponent> ; limit: GetComputableTypeWithDefault<T["limit"], default> ; mark: GetComputableType<T["mark"]> ; 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.

Type parameters ​

NameType
Textends RepeatableOptions

Defined in ​

profectus/src/features/repeatable.tsx:101


RepeatableDisplay ​

Ƭ RepeatableDisplay: CoercableComponent | { description?: CoercableComponent ; effectDisplay?: CoercableComponent ; showAmount?: boolean ; title?: CoercableComponent }

A type that can be used to customize the Repeatable display.

Defined in ​

profectus/src/features/repeatable.tsx:39

Variables ​

RepeatableType ​

• Const RepeatableType: typeof RepeatableType

A symbol used to identify Repeatable features.

Defined in ​

profectus/src/features/repeatable.tsx:36

Functions ​

createRepeatable ​

â–¸ createRepeatable<T>(optionsFunc, ...decorators): Repeatable<T>

Lazily creates a repeatable with the given options.

Type parameters ​
NameType
Textends RepeatableOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseRepeatable, GenericRepeatable>Repeatable options.
...decoratorsGenericDecorator[]-
Returns ​

Repeatable<T>

Defined in ​

profectus/src/features/repeatable.tsx:128

- diff --git a/api/modules/features/reset.html b/api/modules/features/reset.html index 8b2cdc3c..16fe1365 100644 --- a/api/modules/features/reset.html +++ b/api/modules/features/reset.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/reset ​

Interfaces ​

BaseReset ​

• BaseReset: Object

The properties that are added onto a processed ResetOptions to create an Reset.

NameTypeDescription
idstringAn auto-generated ID for identifying which reset is being performed. Will not persist between refreshes or updates.
resetVoidFunctionTrigger the reset.
typetypeof ResetTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/reset.ts:31


ResetOptions ​

• ResetOptions: Object

An object that configures a Clickable.

NameTypeDescription
onReset?VoidFunctionA function that is called when the reset is performed.
thingsToResetComputable<unknown[]>List of things to reset. Can include objects which will be recursed over for persistent values.

Defined in ​

profectus/src/features/reset.ts:21

Type Aliases ​

GenericReset ​

Ƭ GenericReset: Reset<ResetOptions>

A type that matches any valid Reset object.

Defined in ​

profectus/src/features/reset.ts:49


Reset ​

Ƭ Reset<T>: Replace<T & BaseReset, { thingsToReset: GetComputableType<T["thingsToReset"]> }>

An object that represents a reset mechanic, which resets progress back to its initial state.

Type parameters ​

NameType
Textends ResetOptions

Defined in ​

profectus/src/features/reset.ts:41

Variables ​

ResetType ​

• Const ResetType: typeof ResetType

A symbol used to identify Reset features.

Defined in ​

profectus/src/features/reset.ts:16

Functions ​

createReset ​

â–¸ createReset<T>(optionsFunc): Reset<T>

Lazily creates a reset with the given options.

Type parameters ​
NameType
Textends ResetOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseReset, GenericReset>Reset options.
Returns ​

Reset<T>

Defined in ​

profectus/src/features/reset.ts:55


trackResetTime ​

â–¸ trackResetTime(layer, reset): Persistent<default>

Track the time since the specified reset last occured.

Parameters ​
NameTypeDescription
layerBaseLayerThe layer the reset is attached to
resetGenericResetThe reset mechanic to track the time since
Returns ​

Persistent<default>

Defined in ​

profectus/src/features/reset.ts:101

- diff --git a/api/modules/features/resource.html b/api/modules/features/resource.html index a20b2e89..01b0d70e 100644 --- a/api/modules/features/resource.html +++ b/api/modules/features/resource.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/resources/resource ​

Interfaces ​

Resource ​

• Resource<T>: Object

An object that represents a named and quantifiable resource in the game.

Type parameters ​

NameType
TDecimalSource
NameTypeDescription
[RefSymbol]trueType 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.
displayNamestringThe name of this resource.
precisionnumberWhen displaying the value of this resource, how many significant digits to display.
small?booleanWhether or not to display very small values using scientific notation, or rounding to 0.
valueT-

Defined in ​

profectus/src/features/resources/resource.ts:12

Functions ​

createResource ​

â–¸ createResource<T>(defaultValue, displayName?, precision?, small?): Resource<T> & Persistent<T> & { [NonPersistent]: Resource<T> }

Creates a resource.

Type parameters ​
NameType
Textends State
Parameters ​
NameTypeDescription
defaultValueTThe initial value of the resource
displayName?stringThe human readable name of this resource
precision?numberThe number of significant digits to display by default
small?booleanWhether or not to display very small values or round to 0, by default
Returns ​

Resource<T> & Persistent<T> & { [NonPersistent]: Resource<T> }

Other signatures ​

â–¸ createResource<T>(defaultValue, displayName?, precision?, small?): Resource<T>

NameType
defaultValueRef<T>
displayName?string
precision?number
small?boolean

Defined in ​

profectus/src/features/resources/resource.ts:28

profectus/src/features/resources/resource.ts:34

profectus/src/features/resources/resource.ts:40


displayResource ​

â–¸ displayResource(resource, overrideAmount?): string

Utility for displaying a resource with the correct precision.

Parameters ​
NameType
resourceResource<DecimalSource>
overrideAmount?DecimalSource
Returns ​

string

Defined in ​

profectus/src/features/resources/resource.ts:153


trackBest ​

â–¸ trackBest(resource): Ref<DecimalSource>

Returns a reference to the highest amount of the resource ever owned, which is updated automatically.

Parameters ​
NameType
resourceResource<DecimalSource>
Returns ​

Ref<DecimalSource>

Defined in ​

profectus/src/features/resources/resource.ts:64


trackOOMPS ​

â–¸ 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.

Parameters ​
NameType
resourceResource<DecimalSource>
pointGain?ComputedRef<DecimalSource>
Returns ​

Ref<string>

Defined in ​

profectus/src/features/resources/resource.ts:94


trackTotal ​

â–¸ trackTotal(resource): Ref<DecimalSource>

Returns a reference to the total amount of the resource gained, updated automatically. "Refunds" count as gain.

Parameters ​
NameType
resourceResource<DecimalSource>
Returns ​

Ref<DecimalSource>

Defined in ​

profectus/src/features/resources/resource.ts:78


unwrapResource ​

â–¸ unwrapResource(resource): Resource

Utility for unwrapping a resource that may or may not be inside a ref.

Parameters ​
NameType
resourceProcessedComputable<Resource<DecimalSource>>
Returns ​

Resource

Defined in ​

profectus/src/features/resources/resource.ts:162

Components ​

MainDisplay Component ​

Props ​

NameType
resource*Resource
colorstring
classesRecord
styleStyleValue
effectDisplayCoercableComponent

Resource Component ​

Props ​

NameType
resource*Resource
color*string
- diff --git a/api/modules/features/tabs/tab.html b/api/modules/features/tabs/tab.html index 58a55018..9911c56d 100644 --- a/api/modules/features/tabs/tab.html +++ b/api/modules/features/tabs/tab.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/tabs/tab ​

Interfaces ​

BaseTab ​

• BaseTab: Object

The properties that are added onto a processed TabOptions to create an Tab.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
typetypeof TabTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/tabs/tab.ts:31


TabOptions ​

• TabOptions: Object

An object that configures a Tab.

NameTypeDescription
classes?Computable<Record<string, boolean>>Dictionary of CSS classes to apply to this feature.
displayComputable<CoercableComponent>The display to use for this tab.
style?Computable<StyleValue>CSS to apply to this feature.

Defined in ​

profectus/src/features/tabs/tab.ts:19

Type Aliases ​

GenericTab ​

Ƭ GenericTab: Tab<TabOptions>

A type that matches any valid Tab object.

Defined in ​

profectus/src/features/tabs/tab.ts:56


Tab ​

Ƭ 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

Type parameters ​

NameType
Textends TabOptions

Defined in ​

profectus/src/features/tabs/tab.ts:46

Variables ​

TabType ​

• Const TabType: typeof TabType

A symbol used to identify Tab features.

Defined in ​

profectus/src/features/tabs/tab.ts:14

Functions ​

createTab ​

â–¸ createTab<T>(optionsFunc): Tab<T>

Lazily creates a tab with the given options.

Type parameters ​
NameType
Textends TabOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseTab, GenericTab>Tab options.
Returns ​

Tab<T>

Defined in ​

profectus/src/features/tabs/tab.ts:62

- diff --git a/api/modules/features/tabs/tabFamily.html b/api/modules/features/tabs/tabFamily.html index a3eed8e7..3d54b9e3 100644 --- a/api/modules/features/tabs/tabFamily.html +++ b/api/modules/features/tabs/tabFamily.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/tabs/tabFamily ​

Interfaces ​

BaseTabButton ​

• BaseTabButton: Object

The properties that are added onto a processed TabButtonOptions to create an TabButton.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
typetypeof TabButtonTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/tabs/tabFamily.ts:58


BaseTabFamily ​

• BaseTabFamily: Object

The properties that are added onto a processed TabFamilyOptions to create an TabFamily.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
activeTabRef<null | CoercableComponent | GenericTab>The currently active tab, if any.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
selectedPersistent<string>The name of the tab that is currently active.
tabsRecord<string, TabButtonOptions>All the tabs within this family.
typetypeof TabFamilyTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/tabs/tabFamily.ts:108


TabButtonOptions ​

• TabButtonOptions: Object

An object that configures a TabButton.

NameTypeDescription
classes?Computable<Record<string, boolean>>Dictionary of CSS classes to apply to this feature.
displayComputable<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.
tabComputable<CoercableComponent | GenericTab>The tab to display when this button is clicked.
visibility?Computable<boolean | Visibility>Whether this tab button should be visible.

Defined in ​

profectus/src/features/tabs/tabFamily.ts:40


TabFamilyOptions ​

• TabFamilyOptions: Object

An object that configures a TabFamily.

NameTypeDescription
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.

Defined in ​

profectus/src/features/tabs/tabFamily.ts:92

Type Aliases ​

GenericTabButton ​

Ƭ GenericTabButton: Replace<TabButton<TabButtonOptions>, { visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid TabButton object.

Defined in ​

profectus/src/features/tabs/tabFamily.ts:82


GenericTabFamily ​

Ƭ GenericTabFamily: Replace<TabFamily<TabFamilyOptions>, { visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid TabFamily object.

Defined in ​

profectus/src/features/tabs/tabFamily.ts:138


TabButton ​

Ƭ 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

TabFamily

Type parameters ​

NameType
Textends TabButtonOptions

Defined in ​

profectus/src/features/tabs/tabFamily.ts:69


TabFamily ​

Ƭ TabFamily<T>: Replace<T & BaseTabFamily, { tabs: Record<string, GenericTabButton> ; visibility: GetComputableTypeWithDefault<T["visibility"], Visible> }>

An object that represents a tabbed interface.

See

TabFamily

Type parameters ​

NameType
Textends TabFamilyOptions

Defined in ​

profectus/src/features/tabs/tabFamily.ts:129

Variables ​

TabButtonType ​

• Const TabButtonType: typeof TabButtonType

A symbol used to identify TabButton features.

Defined in ​

profectus/src/features/tabs/tabFamily.ts:33


TabFamilyType ​

• Const TabFamilyType: typeof TabFamilyType

A symbol used to identify TabFamily features.

Defined in ​

profectus/src/features/tabs/tabFamily.ts:35

Functions ​

createTabFamily ​

â–¸ createTabFamily<T>(tabs, optionsFunc?): TabFamily<T>

Lazily creates a tab family with the given options.

Type parameters ​
NameType
Textends TabFamilyOptions
Parameters ​
NameTypeDescription
tabsRecord<string, () => TabButtonOptions>-
optionsFunc?OptionsFunc<T, BaseTabFamily, GenericTabFamily>Tab family options.
Returns ​

TabFamily<T>

Defined in ​

profectus/src/features/tabs/tabFamily.ts:149

- diff --git a/api/modules/features/tooltip.html b/api/modules/features/tooltip.html index 4c114f49..7b29b35a 100644 --- a/api/modules/features/tooltip.html +++ b/api/modules/features/tooltip.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/tooltips/tooltip ​

Interfaces ​

BaseTooltip ​

• BaseTooltip: Object

The properties that are added onto a processed TooltipOptions to create an Tooltip.

NameType
pinned?Ref<boolean>

Defined in ​

profectus/src/features/tooltips/tooltip.ts:47


TooltipOptions ​

• TooltipOptions: Object

An object that configures a Tooltip.

NameTypeDescription
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
displayComputable<CoercableComponent>The text to display inside the tooltip.
pinnable?booleanWhether 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.

Defined in ​

profectus/src/features/tooltips/tooltip.ts:27

Type Aliases ​

GenericTooltip ​

Ƭ GenericTooltip: Replace<Tooltip<TooltipOptions>, { direction: ProcessedComputable<Direction> ; pinnable: boolean ; pinned: Ref<boolean> | undefined }>

A type that matches any valid Tooltip object.

Defined in ​

profectus/src/features/tooltips/tooltip.ts:67


Tooltip ​

Ƭ Tooltip<T>: Replace<T & BaseTooltip, { classes: GetComputableType<T["classes"]> ; direction: GetComputableTypeWithDefault<T["direction"], Up> ; display: GetComputableType<T["display"]> ; pinnable: undefined extends T["pinnable"] ? 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.

Type parameters ​

NameType
Textends TooltipOptions

Defined in ​

profectus/src/features/tooltips/tooltip.ts:52

Functions ​

addTooltip ​

â–¸ addTooltip<T>(element, options): Tooltip<T>

Creates a tooltip on the given element with the given options.

Type parameters ​
NameType
Textends TooltipOptions
Parameters ​
NameTypeDescription
elementVueFeatureThe renderable feature to display the tooltip on.
optionsT & ThisType<Tooltip<T>> & Partial<BaseTooltip>Tooltip options.
Returns ​

Tooltip<T>

Defined in ​

profectus/src/features/tooltips/tooltip.ts:81

Components ​

Tooltip Component ​

Props ​

NameType
elementVueFeature
display*processedPropType<CoercableComponent>(Object, String, Function)
styleprocessedPropType<StyleValue>(Object, String, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
directionprocessedPropType<Direction>(String)
xoffsetprocessedPropType<string>(String)
yoffsetprocessedPropType<string>(String)
pinnedPersistent<boolean>

Slots ​

Name
default
- diff --git a/api/modules/features/tree.html b/api/modules/features/tree.html index 80137627..8ce17c5a 100644 --- a/api/modules/features/tree.html +++ b/api/modules/features/tree.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/trees/tree ​

Interfaces ​

BaseTree ​

• BaseTree: Object

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
isResettingRef<boolean>A flag that is true while the reset is still propagating through the tree.
linksRef<Link[]>The link objects for each of the branches of the tree.
reset(node: GenericTreeNode) => voidCause a reset on this node and propagate it through the tree according to resetPropagation.
resettingNodeRef<null | GenericTreeNode>A reference to the node that caused the currently propagating reset.
typetypeof TreeTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/trees/tree.ts:222


BaseTreeNode ​

• BaseTreeNode: Object

The properties that are added onto a processed TreeNodeOptions to create an TreeNode.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
typetypeof TreeNodeTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/trees/tree.ts:65


TreeBranch ​

• TreeBranch: Object

Represents a branch between two nodes in a tree.

NameTypeDescription
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?stringIdentifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-atomic?BooleanishIndicates 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?BooleanishIndicates 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?NumberishDefines the total number of columns in a table, grid, or treegrid. See aria-colindex.
aria-colindex?NumberishDefines 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?NumberishDefines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. See - aria-colindex - aria-rowspan.
aria-controls?stringIdentifies 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?stringIdentifies the element (or elements) that describes the object. See aria-labelledby
aria-details?stringIdentifies the element that provides a detailed, extended description for the object. See aria-describedby.
aria-disabled?BooleanishIndicates 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?stringIdentifies the element that provides an error message for the object. See - aria-invalid - aria-describedby.
aria-expanded?BooleanishIndicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
aria-flowto?stringIdentifies 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?BooleanishIndicates 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?BooleanishIndicates 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?stringIndicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
aria-label?stringDefines a string value that labels the current element. See aria-labelledby.
aria-labelledby?stringIdentifies the element (or elements) that labels the current element. See aria-describedby.
aria-level?NumberishDefines 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?BooleanishIndicates whether an element is modal when displayed.
aria-multiline?BooleanishIndicates whether a text box accepts multiple lines of input or only a single line.
aria-multiselectable?BooleanishIndicates 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?stringIdentifies 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?stringDefines 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?NumberishDefines 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?BooleanishIndicates 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?BooleanishIndicates that user input is required on the element before a form may be submitted.
aria-roledescription?stringDefines a human-readable, author-localized description for the role of an element.
aria-rowcount?NumberishDefines the total number of rows in a table, grid, or treegrid. See aria-rowindex.
aria-rowindex?NumberishDefines 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?NumberishDefines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. See - aria-rowindex - aria-colspan.
aria-selected?BooleanishIndicates the current "selected" state of various widgets. See - aria-checked - aria-pressed.
aria-setsize?NumberishDefines 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?NumberishDefines the maximum allowed value for a range widget.
aria-valuemin?NumberishDefines the minimum allowed value for a range widget.
aria-valuenow?NumberishDefines the current value for a range widget. See aria-valuetext.
aria-valuetext?stringDefines 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?anySVG 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-
endNodeGenericTreeNode-
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-
startNodeGenericTreeNode-
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-

Defined in ​

profectus/src/features/trees/tree.ts:197


TreeNodeOptions ​

• TreeNodeOptions: Object

An object that configures a TreeNode.

NameTypeDescription
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) => voidA function that is called when the tree node is clicked.
onHold?VoidFunctionA function that is called when the tree node is held down.
reset?GenericResetA 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 ​

profectus/src/features/trees/tree.ts:37


TreeOptions ​

• TreeOptions: Object

An object that configures a Tree.

NameTypeDescription
branches?Computable<TreeBranch[]>The branches between nodes within this tree.
leftSideNodes?Computable<GenericTreeNode[]>Nodes to show on the left side of the tree.
nodesComputable<GenericTreeNode[][]>The nodes within the tree, in a 2D array.
onReset?(node: GenericTreeNode) => voidA function that is called when a node within the tree is reset.
resetPropagation?ResetPropagationHow 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.

Defined in ​

profectus/src/features/trees/tree.ts:205

Type Aliases ​

GenericTree ​

Ƭ GenericTree: Replace<Tree<TreeOptions>, { visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Tree object.

Defined in ​

profectus/src/features/trees/tree.ts:254


GenericTreeNode ​

Ƭ GenericTreeNode: Replace<TreeNode<TreeNodeOptions>, { canClick: ProcessedComputable<boolean> ; visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid TreeNode object.

Defined in ​

profectus/src/features/trees/tree.ts:92


ResetPropagation ​

Ƭ ResetPropagation: (tree: GenericTree, resettingNode: GenericTreeNode) => void

Type declaration ​

â–¸ (tree, resettingNode): void

A function that is used to propagate resets through a tree.

Parameters ​
NameType
treeGenericTree
resettingNodeGenericTreeNode
Returns ​

void

Defined in ​

profectus/src/features/trees/tree.ts:308


Tree ​

Ƭ 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.

Type parameters ​

NameType
Textends TreeOptions

Defined in ​

profectus/src/features/trees/tree.ts:242


TreeNode ​

Ƭ 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.

Type parameters ​

NameType
Textends TreeNodeOptions

Defined in ​

profectus/src/features/trees/tree.ts:77

Variables ​

TreeNodeType ​

• Const TreeNodeType: typeof TreeNodeType

A symbol used to identify TreeNode features.

Defined in ​

profectus/src/features/trees/tree.ts:30


TreeType ​

• Const TreeType: typeof TreeType

A symbol used to identify Tree features.

Defined in ​

profectus/src/features/trees/tree.ts:32

Functions ​

branchedResetPropagation ​

â–¸ branchedResetPropagation(tree, resettingNode): void

Propagate resets down the branches of the tree.

Parameters ​
NameType
treeGenericTree
resettingNodeGenericTreeNode
Returns ​

void

Defined in ​

profectus/src/features/trees/tree.ts:337


createResourceTooltip ​

â–¸ 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.

Parameters ​
NameTypeDefault value
resourceResource<DecimalSource>undefined
requiredResourcenull | Resource<DecimalSource>null
requirementComputable<DecimalSource>0
Returns ​

Ref<string>

Defined in ​

profectus/src/features/trees/tree.ts:376


createTree ​

â–¸ createTree<T>(optionsFunc): Tree<T>

Lazily creates a tree with the given options.

Type parameters ​
NameType
Textends TreeOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseTree, GenericTree>Tree options.
Returns ​

Tree<T>

Defined in ​

profectus/src/features/trees/tree.ts:265


createTreeNode ​

â–¸ createTreeNode<T>(optionsFunc?, ...decorators): TreeNode<T>

Lazily creates a tree node with the given options.

Type parameters ​
NameType
Textends TreeNodeOptions
Parameters ​
NameTypeDescription
optionsFunc?OptionsFunc<T, BaseTreeNode, GenericTreeNode>Tree Node options.
...decoratorsGenericDecorator[]-
Returns ​

TreeNode<T>

Defined in ​

profectus/src/features/trees/tree.ts:104


defaultResetPropagation ​

â–¸ defaultResetPropagation(tree, resettingNode): void

Propagate resets down the tree by resetting every node in a lower row.

Parameters ​
NameType
treeGenericTree
resettingNodeGenericTreeNode
Returns ​

void

Defined in ​

profectus/src/features/trees/tree.ts:313


invertedResetPropagation ​

â–¸ invertedResetPropagation(tree, resettingNode): void

Propagate resets down the tree by resetting every node in a lower row.

Parameters ​
NameType
treeGenericTree
resettingNodeGenericTreeNode
Returns ​

void

Defined in ​

profectus/src/features/trees/tree.ts:325

Components ​

Tree Component ​

Props ​

NameType
nodes*processedPropType<GenericTreeNode[][]>(Array)
leftSideNodesprocessedPropType<GenericTreeNode[]>(Array)
rightSideNodesprocessedPropType<GenericTreeNode[]>(Array)
branchesprocessedPropType<TreeBranch[]>(Array)

TreeNode Component ​

Props ​

NameType
displayprocessedPropType<CoercableComponent>(Object, String, Function)
visibility*processedPropType<Visibility | boolean>(Number, Boolean)
styleprocessedPropType<StyleValue>(String, Object, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
onClick(e?: MouseEvent | TouchEvent) => void
onHoldVoidFunction
colorprocessedPropType<string>(String)
glowColorprocessedPropType<string>(String)
canClick*processedPropType<boolean>(Boolean)
markprocessedPropType<boolean | string>(Boolean, String)
id*string
- diff --git a/api/modules/features/upgrade.html b/api/modules/features/upgrade.html index 2e61bc54..5dcc6293 100644 --- a/api/modules/features/upgrade.html +++ b/api/modules/features/upgrade.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: features/upgrades/upgrade ​

Interfaces ​

BaseUpgrade ​

• BaseUpgrade: Object

The properties that are added onto a processed UpgradeOptions to create an Upgrade.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
boughtPersistent<boolean>Whether or not this upgrade has been purchased.
canPurchaseRef<boolean>Whether or not the upgrade can currently be purchased.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
purchaseVoidFunctionPurchase the upgrade
typetypeof UpgradeTypeA symbol that helps identify features of the same type.

Defined in ​

profectus/src/features/upgrades/upgrade.ts:76


UpgradeOptions ​

• UpgradeOptions: Object

An object that configures a Upgrade.

NameTypeDescription
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?VoidFunctionA function that is called when the upgrade is purchased.
requirementsRequirementsThe requirements to purchase this upgrade.
style?Computable<StyleValue>CSS to apply to this feature.
visibility?Computable<boolean | Visibility>Whether this clickable should be visible.

Defined in ​

profectus/src/features/upgrades/upgrade.ts:46

Type Aliases ​

GenericUpgrade ​

Ƭ GenericUpgrade: Replace<Upgrade<UpgradeOptions>, { visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Upgrade object.

Defined in ​

profectus/src/features/upgrades/upgrade.ts:107


Upgrade ​

Ƭ 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.

Type parameters ​

NameType
Textends UpgradeOptions

Defined in ​

profectus/src/features/upgrades/upgrade.ts:94

Variables ​

UpgradeType ​

• Const UpgradeType: typeof UpgradeType

A symbol used to identify Upgrade features.

Defined in ​

profectus/src/features/upgrades/upgrade.ts:41

Functions ​

createUpgrade ​

â–¸ createUpgrade<T>(optionsFunc, ...decorators): Upgrade<T>

Lazily creates an upgrade with the given options.

Type parameters ​
NameType
Textends UpgradeOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T, BaseUpgrade, GenericUpgrade>Upgrade options.
...decoratorsGenericDecorator[]-
Returns ​

Upgrade<T>

Defined in ​

profectus/src/features/upgrades/upgrade.ts:118


setupAutoPurchase ​

â–¸ setupAutoPurchase(layer, autoActive, upgrades?): void

Utility to auto purchase a list of upgrades whenever they're affordable.

Parameters ​
NameTypeDefault valueDescription
layerGenericLayerundefinedThe layer the upgrades are apart of
autoActiveComputable<boolean>undefinedWhether or not the upgrades should currently be auto-purchasing
upgradesGenericUpgrade[][]The specific upgrades to upgrade. If unspecified, uses all upgrades on the layer.
Returns ​

void

Defined in ​

profectus/src/features/upgrades/upgrade.ts:213

Components ​

Upgrade Component ​

Props ​

NameType
display*processedPropType<UnwrapRef<GenericUpgrade["display"]>>(String, Object, Function)
visibility*processedPropType<Visibility | boolean>(Number, Boolean)
styleprocessedPropType<StyleValue>(String, Object, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
requirements*Requirements
canPurchase*processedPropType<boolean>(Boolean)
bought*processedPropType<boolean>(Boolean)
markprocessedPropType<boolean | string>(Boolean, String)
id*string
purchase*VoidFunction
- diff --git a/api/modules/game/events.html b/api/modules/game/events.html index 48a3f14b..70ca07b0 100644 --- a/api/modules/game/events.html +++ b/api/modules/game/events.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/events ​

Interfaces ​

GlobalEvents ​

• GlobalEvents: Object

All types of events able to be sent or emitted from the global event bus.

NameTypeDescription
addLayer(layer: GenericLayer, saveData: Record<string, unknown>) => voidSent whenever a layer is added.
fontsLoadedVoidFunctionUsing 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.
gameWonVoidFunctionSent when the game has ended.
loadSettings(settings: Partial<Settings>) => voidSent 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.
onLoadVoidFunctionSent whenever a save has finished loading. Happens when the page is opened and upon switching saves in the saves manager.
removeLayer(layer: GenericLayer) => voidSent whenever a layer is removed.
reset(reset: GenericReset) => void-
setupVue(vue: App<any>) => voidSent 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) => voidSent every game tick. Runs the life cycle of the project.

Defined in ​

profectus/src/game/events.ts:7

profectus/src/features/reset.ts:125

Variables ​

globalBus ​

• Const globalBus: Emitter<GlobalEvents>

A global event bus for hooking into GlobalEvents.

Defined in ​

profectus/src/game/events.ts:55

- diff --git a/api/modules/game/formulas/formulas.html b/api/modules/game/formulas/formulas.html index 5c753ad6..536fe6fd 100644 --- a/api/modules/game/formulas/formulas.html +++ b/api/modules/game/formulas/formulas.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/formulas/formulas ​

Classes ​

InternalFormula ​

• Abstract InternalFormula<T>: Object

Type parameters ​

NameType
Textends [FormulaSource] | FormulaSource[]
NameType
constructor<T>(options: FormulaOptions<T>) => InternalFormula<T>
applySubstitutionundefined | SubstitutionFunction<T>
divide<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
divideBy<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
dividedBy<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
innermostVariableundefined | ProcessedComputable<DecimalSource>
inputsT
internalEvaluateundefined | EvaluateFunction<T>
internalIntegrateundefined | IntegrateFunction<T>
internalIntegrateInnerundefined | IntegrateFunction<T>
internalInvertundefined | InvertFunction<T>
internalVariablesnumber
logarithm<T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula
minus<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
multiply<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
negate<T>(this: T) => T(this: GenericFormula) => GenericFormula
negated<T>(this: T) => T(this: GenericFormula) => GenericFormula
plus<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
reciprocal<T>(this: T) => T(this: FormulaSource) => GenericFormula
reciprocate<T>(this: T) => T(this: FormulaSource) => GenericFormula
sgn() => default<[FormulaSource]>
subtract<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
times<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
clampMax(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
clampMin(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
divide<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
divideBy<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
dividedBy<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
logarithm<T>(value: T, base: FormulaSource) => T<T>(value: FormulaSource, base: T) => T(value: FormulaSource, base: FormulaSource) => default<[FormulaSource, FormulaSource]>
max(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
maxabs(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
min(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
minabs(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
minus<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
multiply<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
negate<T>(value: T) => T(value: FormulaSource) => GenericFormula
negated<T>(value: T) => T(value: FormulaSource) => GenericFormula
plus<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => InternalFormula<[FormulaSource, FormulaSource]>
reciprocal<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
reciprocate<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
sgn(value: FormulaSource) => default<[FormulaSource]>
subtract<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
times<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
abs() => default<[FormulaSource]>
absLog10() => default<[FormulaSource]>
acos<T>(this: T) => T(this: FormulaSource) => GenericFormula
acosh<T>(this: T) => T(this: FormulaSource) => GenericFormula
add<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
asin<T>(this: T) => T(this: FormulaSource) => GenericFormula
asinh<T>(this: T) => T(this: FormulaSource) => GenericFormula
atan<T>(this: T) => T(this: FormulaSource) => GenericFormula
atanh<T>(this: T) => T(this: FormulaSource) => GenericFormula
calculateConstantOfIntegration?() => default
cbrt<T>(this: T) => T(this: FormulaSource) => GenericFormula
ceil() => default<[FormulaSource]>
clamp(min: FormulaSource, max: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
clampMax(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
clampMin(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
conditional(condition: Computable<boolean>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
cos<T>(this: T) => T(this: FormulaSource) => GenericFormula
cosh<T>(this: T) => T(this: FormulaSource) => GenericFormula
cube<T>(this: T) => T(this: FormulaSource) => GenericFormula
div<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
equals(other: GenericFormula) => boolean
evaluate(variable?: DecimalSource) => DecimalSource
evaluateIntegral?(variable?: DecimalSource) => DecimalSource
exp<T>(this: T) => T(this: FormulaSource) => GenericFormula
factorial() => default<[FormulaSource]>
floor() => default<[FormulaSource]>
gamma() => default<[FormulaSource]>
getIntegralFormula?(stack?: SubstitutionStack) => GenericFormula
hasVariable() => boolean
if(condition: Computable<boolean>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
invert?(value: DecimalSource) => DecimalSource
invertIntegral?(value: DecimalSource) => DecimalSource
isIntegrable() => this is IntegrableFormula
isIntegralInvertible() => this is InvertibleIntegralFormula
isInvertible() => this is InvertibleFormula
iteratedexp<T>(this: T, height?: FormulaSource, payload?: FormulaSource) => InvertibleFormula(this: FormulaSource, height?: FormulaSource, payload?: FormulaSource) => GenericFormula
iteratedlog(base: FormulaSource, times: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
lambertw<T>(this: T) => InvertibleFormula(this: FormulaSource) => GenericFormula
layeradd<T>(this: T, diff: FormulaSource, base?: FormulaSource) => InvertibleFormula(this: FormulaSource, diff: FormulaSource, base?: FormulaSource) => GenericFormula
layeradd10(diff: FormulaSource) => default<[FormulaSource, FormulaSource]>
ln<T>(this: T) => T(this: FormulaSource) => GenericFormula
lngamma() => default<[FormulaSource]>
log<T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula
log10<T>(this: T) => T(this: FormulaSource) => GenericFormula
log2<T>(this: T) => T(this: FormulaSource) => GenericFormula
max(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
maxabs(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
min(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
minabs(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
mul<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
neg<T>(this: T) => T(this: GenericFormula) => GenericFormula
pLog10() => default<[FormulaSource]>
pentate(height: FormulaSource, payload: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
pow<T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula
pow10<T>(this: T) => T(this: FormulaSource) => GenericFormula
pow_base<T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula
recip<T>(this: T) => T(this: FormulaSource) => GenericFormula
root<T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula
round() => default<[FormulaSource]>
setupConstant(__namedParameters: { inputs: [FormulaSource] }) => InternalFormulaProperties<T>
setupFormula(options: GeneralFormulaOptions<T>) => InternalFormulaProperties<T>
setupVariable(__namedParameters: { variable: ProcessedComputable<DecimalSource> }) => InternalFormulaProperties<T>
sign() => default<[FormulaSource]>
sin<T>(this: T) => T(this: FormulaSource) => GenericFormula
sinh<T>(this: T) => T(this: FormulaSource) => GenericFormula
slog<T>(this: T, base?: FormulaSource) => InvertibleFormula(this: FormulaSource, base?: FormulaSource) => GenericFormula
sqr<T>(this: T) => T(this: FormulaSource) => GenericFormula
sqrt<T>(this: T) => T(this: FormulaSource) => GenericFormula
ssqrt<T>(this: T) => InvertibleFormula(this: FormulaSource) => GenericFormula
step(start: Computable<DecimalSource>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
sub<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
tan<T>(this: T) => T(this: FormulaSource) => GenericFormula
tanh<T>(this: T) => T(this: FormulaSource) => GenericFormula
tetrate<T>(this: T, height?: FormulaSource, payload?: FormulaSource) => InvertibleFormula(this: FormulaSource, height?: FormulaSource, payload?: FormulaSource) => GenericFormula
trunc() => default<[FormulaSource]>
abs(value: FormulaSource) => default<[FormulaSource]>
absLog10(value: FormulaSource) => default<[FormulaSource]>
acos<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
acosh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
add<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => InternalFormula<[FormulaSource, FormulaSource]>
asin<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
asinh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
atan<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
atanh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
cbrt<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
ceil(value: FormulaSource) => default<[FormulaSource]>
clamp(value: FormulaSource, min: FormulaSource, max: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
conditional(value: FormulaSource, condition: Computable<boolean>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula, elseFormulaModifier?: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
constant(value: ProcessedComputable<DecimalSource>) => InvertibleIntegralFormula
cos<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
cosh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
cube<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
div<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
exp<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
factorial(value: FormulaSource) => default<[FormulaSource]>
floor(value: FormulaSource) => default<[FormulaSource]>
gamma(value: FormulaSource) => default<[FormulaSource]>
if(value: FormulaSource, condition: Computable<boolean>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula, elseFormulaModifier?: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
iteratedexp<T>(value: T, height?: FormulaSource, payload?: FormulaSource) => InvertibleFormula(value: FormulaSource, height?: FormulaSource, payload?: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
iteratedlog(value: FormulaSource, base: FormulaSource, times: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
lambertw<T>(value: T) => InvertibleFormula(value: FormulaSource) => default<[FormulaSource]>
layeradd<T>(value: T, diff: FormulaSource, base?: FormulaSource) => InvertibleFormula(value: FormulaSource, diff: FormulaSource, base?: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
layeradd10(value: FormulaSource, diff: FormulaSource) => default<[FormulaSource, FormulaSource]>
ln<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
lngamma(value: FormulaSource) => default<[FormulaSource]>
log<T>(value: T, base: FormulaSource) => T<T>(value: FormulaSource, base: T) => T(value: FormulaSource, base: FormulaSource) => default<[FormulaSource, FormulaSource]>
log10<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
log2<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
mul<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
neg<T>(value: T) => T(value: FormulaSource) => GenericFormula
pLog10(value: FormulaSource) => default<[FormulaSource]>
pentate(value: FormulaSource, height: FormulaSource, payload: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
pow<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
pow10<T>(value: T) => T(value: FormulaSource) => GenericFormula
pow_base<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
recip<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
root<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
round(value: FormulaSource) => default<[FormulaSource]>
sign(value: FormulaSource) => default<[FormulaSource]>
sin<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
sinh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
slog<T>(value: T, base?: FormulaSource) => InvertibleFormula(value: FormulaSource, base?: FormulaSource) => default<[FormulaSource, FormulaSource]>
sqr<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
sqrt<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
ssqrt<T>(value: T) => InvertibleFormula(value: FormulaSource) => default<[FormulaSource]>
step(value: FormulaSource, start: Computable<DecimalSource>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
sub<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
tan<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
tanh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
tetrate<T>(value: T, height?: FormulaSource, payload?: FormulaSource) => InvertibleFormula(value: FormulaSource, height?: FormulaSource, payload?: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
trunc(value: FormulaSource) => default<[FormulaSource]>
variable(value: ProcessedComputable<DecimalSource>) => InvertibleIntegralFormula

Defined in ​

profectus/src/game/formulas/formulas.ts:43

profectus/src/game/formulas/formulas.ts:51


default ​

• 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

Type parameters ​

NameType
Textends [FormulaSource] | FormulaSource[]
NameType
constructor<T>(options: FormulaOptions<T>) => default<T>
applySubstitutionundefined | SubstitutionFunction<T>
divide<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
divideBy<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
dividedBy<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
innermostVariableundefined | ProcessedComputable<DecimalSource>
inputsT
integralFormulaundefined | GenericFormula
internalEvaluateundefined | EvaluateFunction<T>
internalIntegrateundefined | IntegrateFunction<T>
internalIntegrateInnerundefined | IntegrateFunction<T>
internalInvertundefined | InvertFunction<T>
internalVariablesnumber
logarithm<T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula
minus<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
multiply<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
negate<T>(this: T) => T(this: GenericFormula) => GenericFormula
negated<T>(this: T) => T(this: GenericFormula) => GenericFormula
plus<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
reciprocal<T>(this: T) => T(this: FormulaSource) => GenericFormula
reciprocate<T>(this: T) => T(this: FormulaSource) => GenericFormula
sgn() => default<[FormulaSource]>
subtract<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
times<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
clampMax(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
clampMin(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
divide<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
divideBy<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
dividedBy<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
logarithm<T>(value: T, base: FormulaSource) => T<T>(value: FormulaSource, base: T) => T(value: FormulaSource, base: FormulaSource) => default<[FormulaSource, FormulaSource]>
max(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
maxabs(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
min(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
minabs(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
minus<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
multiply<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
negate<T>(value: T) => T(value: FormulaSource) => GenericFormula
negated<T>(value: T) => T(value: FormulaSource) => GenericFormula
plus<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => InternalFormula<[FormulaSource, FormulaSource]>
reciprocal<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
reciprocate<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
sgn(value: FormulaSource) => default<[FormulaSource]>
subtract<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
times<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
abs() => default<[FormulaSource]>
absLog10() => default<[FormulaSource]>
acos<T>(this: T) => T(this: FormulaSource) => GenericFormula
acosh<T>(this: T) => T(this: FormulaSource) => GenericFormula
add<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
asin<T>(this: T) => T(this: FormulaSource) => GenericFormula
asinh<T>(this: T) => T(this: FormulaSource) => GenericFormula
atan<T>(this: T) => T(this: FormulaSource) => GenericFormula
atanh<T>(this: T) => T(this: FormulaSource) => GenericFormula
calculateConstantOfIntegration() => default
cbrt<T>(this: T) => T(this: FormulaSource) => GenericFormula
ceil() => default<[FormulaSource]>
clamp(min: FormulaSource, max: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
clampMax(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
clampMin(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
conditional(condition: Computable<boolean>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
cos<T>(this: T) => T(this: FormulaSource) => GenericFormula
cosh<T>(this: T) => T(this: FormulaSource) => GenericFormula
cube<T>(this: T) => T(this: FormulaSource) => GenericFormula
div<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
equals(other: GenericFormula) => boolean
evaluate(variable?: DecimalSource) => DecimalSource
evaluateIntegral(variable?: DecimalSource) => DecimalSource
exp<T>(this: T) => T(this: FormulaSource) => GenericFormula
factorial() => default<[FormulaSource]>
floor() => default<[FormulaSource]>
gamma() => default<[FormulaSource]>
getIntegralFormula(stack?: SubstitutionStack) => GenericFormula
hasVariable() => boolean
if(condition: Computable<boolean>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
invert(value: DecimalSource) => DecimalSource
invertIntegral(value: DecimalSource) => DecimalSource
isIntegrable() => this is IntegrableFormula
isIntegralInvertible() => this is InvertibleIntegralFormula
isInvertible() => this is InvertibleFormula
iteratedexp<T>(this: T, height?: FormulaSource, payload?: FormulaSource) => InvertibleFormula(this: FormulaSource, height?: FormulaSource, payload?: FormulaSource) => GenericFormula
iteratedlog(base: FormulaSource, times: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
lambertw<T>(this: T) => InvertibleFormula(this: FormulaSource) => GenericFormula
layeradd<T>(this: T, diff: FormulaSource, base?: FormulaSource) => InvertibleFormula(this: FormulaSource, diff: FormulaSource, base?: FormulaSource) => GenericFormula
layeradd10(diff: FormulaSource) => default<[FormulaSource, FormulaSource]>
ln<T>(this: T) => T(this: FormulaSource) => GenericFormula
lngamma() => default<[FormulaSource]>
log<T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula
log10<T>(this: T) => T(this: FormulaSource) => GenericFormula
log2<T>(this: T) => T(this: FormulaSource) => GenericFormula
max(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
maxabs(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
min(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
minabs(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
mul<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
neg<T>(this: T) => T(this: GenericFormula) => GenericFormula
pLog10() => default<[FormulaSource]>
pentate(height: FormulaSource, payload: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
pow<T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula
pow10<T>(this: T) => T(this: FormulaSource) => GenericFormula
pow_base<T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula
recip<T>(this: T) => T(this: FormulaSource) => GenericFormula
root<T>(this: T, value: FormulaSource) => T<T>(this: FormulaSource, value: T) => T(this: FormulaSource, value: FormulaSource) => GenericFormula
round() => default<[FormulaSource]>
sign() => default<[FormulaSource]>
sin<T>(this: T) => T(this: FormulaSource) => GenericFormula
sinh<T>(this: T) => T(this: FormulaSource) => GenericFormula
slog<T>(this: T, base?: FormulaSource) => InvertibleFormula(this: FormulaSource, base?: FormulaSource) => GenericFormula
sqr<T>(this: T) => T(this: FormulaSource) => GenericFormula
sqrt<T>(this: T) => T(this: FormulaSource) => GenericFormula
ssqrt<T>(this: T) => InvertibleFormula(this: FormulaSource) => GenericFormula
step(start: Computable<DecimalSource>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
sub<T>(this: T, value: FormulaSource) => T<T>(this: GenericFormula, value: T) => T(this: GenericFormula, value: FormulaSource) => GenericFormula
tan<T>(this: T) => T(this: FormulaSource) => GenericFormula
tanh<T>(this: T) => T(this: FormulaSource) => GenericFormula
tetrate<T>(this: T, height?: FormulaSource, payload?: FormulaSource) => InvertibleFormula(this: FormulaSource, height?: FormulaSource, payload?: FormulaSource) => GenericFormula
trunc() => default<[FormulaSource]>
abs(value: FormulaSource) => default<[FormulaSource]>
absLog10(value: FormulaSource) => default<[FormulaSource]>
acos<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
acosh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
add<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => InternalFormula<[FormulaSource, FormulaSource]>
asin<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
asinh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
atan<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
atanh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
cbrt<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
ceil(value: FormulaSource) => default<[FormulaSource]>
clamp(value: FormulaSource, min: FormulaSource, max: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
conditional(value: FormulaSource, condition: Computable<boolean>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula, elseFormulaModifier?: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
constant(value: ProcessedComputable<DecimalSource>) => InvertibleIntegralFormula
cos<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
cosh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
cube<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
div<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
exp<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
factorial(value: FormulaSource) => default<[FormulaSource]>
floor(value: FormulaSource) => default<[FormulaSource]>
gamma(value: FormulaSource) => default<[FormulaSource]>
if(value: FormulaSource, condition: Computable<boolean>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula, elseFormulaModifier?: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
iteratedexp<T>(value: T, height?: FormulaSource, payload?: FormulaSource) => InvertibleFormula(value: FormulaSource, height?: FormulaSource, payload?: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
iteratedlog(value: FormulaSource, base: FormulaSource, times: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
lambertw<T>(value: T) => InvertibleFormula(value: FormulaSource) => default<[FormulaSource]>
layeradd<T>(value: T, diff: FormulaSource, base?: FormulaSource) => InvertibleFormula(value: FormulaSource, diff: FormulaSource, base?: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
layeradd10(value: FormulaSource, diff: FormulaSource) => default<[FormulaSource, FormulaSource]>
ln<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
lngamma(value: FormulaSource) => default<[FormulaSource]>
log<T>(value: T, base: FormulaSource) => T<T>(value: FormulaSource, base: T) => T(value: FormulaSource, base: FormulaSource) => default<[FormulaSource, FormulaSource]>
log10<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
log2<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
mul<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
neg<T>(value: T) => T(value: FormulaSource) => GenericFormula
pLog10(value: FormulaSource) => default<[FormulaSource]>
pentate(value: FormulaSource, height: FormulaSource, payload: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
pow<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
pow10<T>(value: T) => T(value: FormulaSource) => GenericFormula
pow_base<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
recip<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
root<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
round(value: FormulaSource) => default<[FormulaSource]>
sign(value: FormulaSource) => default<[FormulaSource]>
sin<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
sinh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
slog<T>(value: T, base?: FormulaSource) => InvertibleFormula(value: FormulaSource, base?: FormulaSource) => default<[FormulaSource, FormulaSource]>
sqr<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
sqrt<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource, FormulaSource]>
ssqrt<T>(value: T) => InvertibleFormula(value: FormulaSource) => default<[FormulaSource]>
step(value: FormulaSource, start: Computable<DecimalSource>, formulaModifier: (value: InvertibleIntegralFormula) => GenericFormula) => default<[FormulaSource]>
sub<T>(value: T, other: FormulaSource) => T<T>(value: FormulaSource, other: T) => T(value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>
tan<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
tanh<T>(value: T) => T(value: FormulaSource) => default<[FormulaSource]>
tetrate<T>(value: T, height?: FormulaSource, payload?: FormulaSource) => InvertibleFormula(value: FormulaSource, height?: FormulaSource, payload?: FormulaSource) => default<[FormulaSource, FormulaSource, FormulaSource]>
trunc(value: FormulaSource) => default<[FormulaSource]>
variable(value: ProcessedComputable<DecimalSource>) => InvertibleIntegralFormula

Defined in ​

profectus/src/game/formulas/formulas.ts:1249

Functions ​

calculateCost ​

â–¸ calculateCost(formula, amountToBuy, cumulativeCost?, directSum?): DecimalSource

Utility for calculating the cost of a formula for a given amount of purchases. If cumulativeCost is changed to false, the calculation will be much faster with higher numbers.

Parameters ​
NameTypeDescription
formulaInvertibleFormulaThe formula to use for calculating buy max from
amountToBuyDecimalSourceThe amount of purchases to calculate the cost for
cumulativeCost?trueWhether or not to count spent resources on each purchase or not. If true, costs will be approximated for performance, skewing towards higher cost
directSum?numberHow many purchases to manually sum for improved accuracy. If not specified, defaults to 10 when cost is cumulative and 0 when not
Returns ​

DecimalSource

Other signatures ​

â–¸ calculateCost(formula, amountToBuy, cumulativeCost, directSum?): DecimalSource

NameType
formulaInvertibleIntegralFormula
amountToBuyDecimalSource
cumulativeCostboolean
directSum?number

Defined in ​

profectus/src/game/formulas/formulas.ts:1498

profectus/src/game/formulas/formulas.ts:1504

profectus/src/game/formulas/formulas.ts:1510


calculateMaxAffordable ​

â–¸ calculateMaxAffordable(formula, resource, cumulativeCost?, directSum?, maxBulkAmount?): ComputedRef<default | 0>

Utility for calculating the maximum amount of purchases possible with a given formula and resource. If cumulativeCost is changed to false, the calculation will be much faster with higher numbers.

Parameters ​
NameTypeDefault valueDescription
formulaGenericFormulaundefinedThe formula to use for calculating buy max from
resourceResource<DecimalSource>undefinedThe resource used when purchasing (is only read from)
cumulativeCostComputable<boolean>trueWhether or not to count spent resources on each purchase or not. If true, costs will be approximated for performance, skewing towards fewer purchases
directSum?Computable<number>undefinedHow many of the most expensive purchases should be manually summed for better accuracy. If unspecified uses 10 when spending resources and 0 when not
maxBulkAmountComputable<DecimalSource>Decimal.dInfCap on how many can be purchased at once. If equal to 1 or lte to directSum then the formula does not need to be invertible. Defaults to Infinity.
Returns ​

ComputedRef<default | 0>

Defined in ​

profectus/src/game/formulas/formulas.ts:1419


findNonInvertible ​

â–¸ findNonInvertible(formula): GenericFormula | null

Utility for recursively searching through a formula for the cause of non-invertibility.

Parameters ​
NameTypeDescription
formulaGenericFormulaThe formula to search for a non-invertible formula within
Returns ​

GenericFormula | null

Defined in ​

profectus/src/game/formulas/formulas.ts:1375


hasVariable ​

â–¸ hasVariable(value): value is InvertibleFormula

NameType
valueFormulaSource

Defined in ​

profectus/src/game/formulas/formulas.ts:24


printFormula ​

â–¸ printFormula(formula): string

Stringifies a formula so it's more easy to read in the console

Parameters ​
NameTypeDescription
formulaFormulaSourceThe formula to print
Returns ​

string

Defined in ​

profectus/src/game/formulas/formulas.ts:1393


unrefFormulaSource ​

â–¸ unrefFormulaSource(value, variable?): DecimalSource

NameType
valueFormulaSource
variable?DecimalSource

Defined in ​

profectus/src/game/formulas/formulas.ts:28

- diff --git a/api/modules/game/formulas/operations.html b/api/modules/game/formulas/operations.html index 2aba3dd0..a6e7bf7d 100644 --- a/api/modules/game/formulas/operations.html +++ b/api/modules/game/formulas/operations.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/formulas/operations ​

Functions ​

applySubstitutionDiv ​

â–¸ applySubstitutionDiv(value, lhs, rhs): GenericFormula

NameType
valueGenericFormula
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:217


applySubstitutionMul ​

â–¸ applySubstitutionMul(value, lhs, rhs): GenericFormula

NameType
valueGenericFormula
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:173


applySubstitutionNeg ​

â–¸ applySubstitutionNeg(value): GenericFormula

NameType
valueGenericFormula

Defined in ​

profectus/src/game/formulas/operations.ts:31


createPassthroughBinaryFormula ​

â–¸ createPassthroughBinaryFormula(operation): (value: FormulaSource, other: FormulaSource) => default<[FormulaSource, FormulaSource]>

NameType
operation(a: DecimalSource, b: DecimalSource) => DecimalSource

Defined in ​

profectus/src/game/formulas/operations.ts:912


integrateAcos ​

â–¸ integrateAcos(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:744


integrateAcosh ​

â–¸ integrateAcosh(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:874


integrateAdd ​

â–¸ integrateAdd(stack, lhs, rhs): InvertibleIntegralFormula | default<[FormulaSource, FormulaSource]>

NameType
stackSubstitutionStack
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:45


integrateAsin ​

â–¸ integrateAsin(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:721


integrateAsinh ​

â–¸ integrateAsinh(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:853


integrateAtan ​

â–¸ integrateAtan(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:767


integrateAtanh ​

â–¸ integrateAtanh(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:897


integrateCos ​

â–¸ integrateCos(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:679


integrateCosh ​

â–¸ integrateCosh(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:811


integrateDiv ​

â–¸ integrateDiv(stack, lhs, rhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:197


integrateExp ​

â–¸ integrateExp(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:515


integrateInnerAdd ​

â–¸ integrateInnerAdd(stack, lhs, rhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:65


integrateInnerSub ​

â–¸ integrateInnerSub(stack, lhs, rhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:119


integrateLn ​

â–¸ integrateLn(stack, lhs): InvertibleIntegralFormula | default<[GenericFormula]>

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:385


integrateLog ​

â–¸ integrateLog(stack, lhs, rhs): InvertibleIntegralFormula | default<[GenericFormula, FormulaSource]>

NameType
stackSubstitutionStack
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:312


integrateLog10 ​

â–¸ integrateLog10(stack, lhs): InvertibleIntegralFormula | default<[GenericFormula]>

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:273


integrateLog2 ​

â–¸ integrateLog2(stack, lhs): InvertibleIntegralFormula | default<[GenericFormula]>

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:349


integrateMul ​

â–¸ integrateMul(stack, lhs, rhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:153


integrateNeg ​

â–¸ integrateNeg(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:19


integratePow ​

â–¸ integratePow(stack, lhs, rhs): InvertibleIntegralFormula | default<[FormulaSource]> | InternalFormula<[FormulaSource, FormulaSource]>

NameType
stackSubstitutionStack
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:411


integratePow10 ​

â–¸ integratePow10(stack, lhs): InvertibleIntegralFormula | default<[FormulaSource]>

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:440


integratePowBase ​

â–¸ integratePowBase(stack, lhs, rhs): InvertibleIntegralFormula | default<[FormulaSource]> | InternalFormula<[FormulaSource, FormulaSource]>

NameType
stackSubstitutionStack
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:463


integrateRecip ​

â–¸ integrateRecip(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:239


integrateRoot ​

â–¸ integrateRoot(stack, lhs, rhs): InvertibleIntegralFormula | default<[FormulaSource]>

NameType
stackSubstitutionStack
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:494


integrateSin ​

â–¸ integrateSin(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:658


integrateSinh ​

â–¸ integrateSinh(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:790


integrateSub ​

â–¸ integrateSub(stack, lhs, rhs): InvertibleIntegralFormula | default<[FormulaSource, FormulaSource]>

NameType
stackSubstitutionStack
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:99


integrateTan ​

â–¸ integrateTan(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:700


integrateTanh ​

â–¸ integrateTanh(stack, lhs): GenericFormula

NameType
stackSubstitutionStack
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:832


invertAcos ​

â–¸ invertAcos(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:736


invertAcosh ​

â–¸ invertAcosh(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:866


invertAdd ​

â–¸ invertAdd(value, lhs, rhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:35


invertAsin ​

â–¸ invertAsin(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:713


invertAsinh ​

â–¸ invertAsinh(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:845


invertAtan ​

â–¸ invertAtan(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:759


invertAtanh ​

â–¸ invertAtanh(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:889


invertCos ​

â–¸ invertCos(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:671


invertCosh ​

â–¸ invertCosh(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:803


invertDiv ​

â–¸ invertDiv(value, lhs, rhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:187


invertExp ​

â–¸ invertExp(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:507


invertIteratedExp ​

â–¸ invertIteratedExp(value, lhs, height, payload): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
heightFormulaSource
payloadFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:560


invertLambertw ​

â–¸ invertLambertw(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:629


invertLayeradd ​

â–¸ invertLayeradd(value, lhs, diff, base): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
diffFormulaSource
baseFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:610


invertLn ​

â–¸ invertLn(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:365


invertLog ​

â–¸ invertLog(value, lhs, rhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:289


invertLog10 ​

â–¸ invertLog10(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:252


invertLog2 ​

â–¸ invertLog2(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:328


invertMul ​

â–¸ invertMul(value, lhs, rhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:143


invertNeg ​

â–¸ invertNeg(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:11


invertPow ​

â–¸ invertPow(value, lhs, rhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:401


invertPow10 ​

â–¸ invertPow10(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:432


invertPowBase ​

â–¸ invertPowBase(value, lhs, rhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:453


invertRecip ​

â–¸ invertRecip(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:231


invertRoot ​

â–¸ invertRoot(value, lhs, rhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:484


invertSin ​

â–¸ invertSin(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:650


invertSinh ​

â–¸ invertSinh(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:782


invertSlog ​

â–¸ invertSlog(value, lhs, rhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:594


invertSsqrt ​

â–¸ invertSsqrt(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:637


invertSub ​

â–¸ invertSub(value, lhs, rhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource
rhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:89


invertTan ​

â–¸ invertTan(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:692


invertTanh ​

â–¸ invertTanh(value, lhs): DecimalSource

NameType
valueDecimalSource
lhsFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:824


invertTetrate ​

â–¸ invertTetrate(value, base, height, payload): DecimalSource

NameType
valueDecimalSource
baseFormulaSource
heightFormulaSource
payloadFormulaSource

Defined in ​

profectus/src/game/formulas/operations.ts:537


iteratedLog ​

â–¸ iteratedLog(value, lhs?, times?): default

NameTypeDefault value
valueDecimalSourceundefined
lhsDecimalSource10
timesDecimalSource2

Defined in ​

profectus/src/game/formulas/operations.ts:580


iteratedexp ​

â–¸ iteratedexp(value, height?, payload?): default

NameTypeDefault value
valueDecimalSourceundefined
heightDecimalSource2
payloadDecimalSourceundefined

Defined in ​

profectus/src/game/formulas/operations.ts:551


layeradd ​

â–¸ layeradd(value, diff, base): default

NameType
valueDecimalSource
diffDecimalSource
baseDecimalSource

Defined in ​

profectus/src/game/formulas/operations.ts:605


passthrough ​

â–¸ passthrough<T>(value): T

NameType
valueT

Defined in ​

profectus/src/game/formulas/operations.ts:7


pentate ​

â–¸ pentate(value, height, payload): default

NameType
valueDecimalSource
heightDecimalSource
payloadDecimalSource

Defined in ​

profectus/src/game/formulas/operations.ts:645


slog ​

â–¸ slog(value, lhs?): default

NameTypeDefault value
valueDecimalSourceundefined
lhsDecimalSource10

Defined in ​

profectus/src/game/formulas/operations.ts:589


tetrate ​

â–¸ tetrate(value, height?, payload?): default

NameTypeDefault value
valueDecimalSourceundefined
heightDecimalSource2
payloadDecimalSourceundefined

Defined in ​

profectus/src/game/formulas/operations.ts:528

- diff --git a/api/modules/game/formulas/types.html b/api/modules/game/formulas/types.html index c94776a9..050a1bde 100644 --- a/api/modules/game/formulas/types.html +++ b/api/modules/game/formulas/types.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/formulas/types ​

Type Aliases ​

ConstantFormulaOptions ​

Ƭ ConstantFormulaOptions: Object

Type declaration ​

NameType
inputs[FormulaSource]

Defined in ​

profectus/src/game/formulas/types.d.ts:41


EvaluateFunction ​

Ƭ EvaluateFunction<T>: (this: InternalFormula<T>, ...inputs: GuardedFormulasToDecimals<T>) => DecimalSource

Type parameters ​

Name
T

Type declaration ​

â–¸ (this, ...inputs): DecimalSource

NameType
thisInternalFormula<T>
...inputsGuardedFormulasToDecimals<T>

Defined in ​

profectus/src/game/formulas/types.d.ts:20


FormulaOptions ​

Ƭ FormulaOptions<T>: VariableFormulaOptions | ConstantFormulaOptions | GeneralFormulaOptions<T>

Type parameters ​

NameType
Textends [FormulaSource] | FormulaSource[]

Defined in ​

profectus/src/game/formulas/types.d.ts:52


FormulaSource ​

Ƭ FormulaSource: ProcessedComputable<DecimalSource> | GenericFormula

Defined in ​

profectus/src/game/formulas/types.d.ts:7


FormulasToDecimals ​

Ƭ FormulasToDecimals<T>: { [K in keyof T]: DecimalSource }

Type parameters ​

NameType
Textends FormulaSource[]

Defined in ​

profectus/src/game/formulas/types.d.ts:71


GeneralFormulaOptions ​

Ƭ GeneralFormulaOptions<T>: Object

Type parameters ​

NameType
Textends [FormulaSource] | FormulaSource[]

Type declaration ​

NameType
applySubstitution?SubstitutionFunction<T>
evaluateEvaluateFunction<T>
inputsT
integrate?IntegrateFunction<T>
integrateInner?IntegrateFunction<T>
invert?InvertFunction<T>

Defined in ​

profectus/src/game/formulas/types.d.ts:44


GenericFormula ​

Ƭ GenericFormula: InternalFormula<any>

Defined in ​

profectus/src/game/formulas/types.d.ts:6


GuardedFormulasToDecimals ​

Ƭ GuardedFormulasToDecimals<T>: TupleGuard<T>

Type parameters ​

NameType
Textends FormulaSource[]

Defined in ​

profectus/src/game/formulas/types.d.ts:76


IntegrableFormula ​

Ƭ IntegrableFormula: InvertibleFormula & { calculateConstantOfIntegration: NonNullable<GenericFormula["calculateConstantOfIntegration"]> ; evaluateIntegral: NonNullable<GenericFormula["evaluateIntegral"]> ; getIntegralFormula: NonNullable<GenericFormula["getIntegralFormula"]> }

Defined in ​

profectus/src/game/formulas/types.d.ts:11


IntegrateFunction ​

Ƭ IntegrateFunction<T>: (this: InternalFormula<T>, stack: SubstitutionStack | undefined, ...inputs: T) => GenericFormula

Type parameters ​

Name
T

Type declaration ​

â–¸ (this, stack, ...inputs): GenericFormula

NameType
thisInternalFormula<T>
stackSubstitutionStack | undefined
...inputsT

Defined in ​

profectus/src/game/formulas/types.d.ts:29


InternalFormulaProperties ​

Ƭ InternalFormulaProperties<T>: Object

Type parameters ​

NameType
Textends [FormulaSource] | FormulaSource[]

Type declaration ​

NameType
applySubstitution?SubstitutionFunction<T>
innermostVariable?ProcessedComputable<DecimalSource>
inputsT
internalEvaluate?EvaluateFunction<T>
internalIntegrate?IntegrateFunction<T>
internalIntegrateInner?IntegrateFunction<T>
internalInvert?InvertFunction<T>
internalVariablesnumber

Defined in ​

profectus/src/game/formulas/types.d.ts:57


InvertFunction ​

Ƭ InvertFunction<T>: (this: InternalFormula<T>, value: DecimalSource, ...inputs: T) => DecimalSource

Type parameters ​

Name
T

Type declaration ​

â–¸ (this, value, ...inputs): DecimalSource

NameType
thisInternalFormula<T>
valueDecimalSource
...inputsT

Defined in ​

profectus/src/game/formulas/types.d.ts:24


InvertibleFormula ​

Ƭ InvertibleFormula: GenericFormula & { invert: NonNullable<GenericFormula["invert"]> }

Defined in ​

profectus/src/game/formulas/types.d.ts:8


InvertibleIntegralFormula ​

Ƭ InvertibleIntegralFormula: IntegrableFormula & { invertIntegral: NonNullable<GenericFormula["invertIntegral"]> }

Defined in ​

profectus/src/game/formulas/types.d.ts:16


SubstitutionFunction ​

Ƭ SubstitutionFunction<T>: (this: InternalFormula<T>, variable: GenericFormula, ...inputs: T) => GenericFormula

Type parameters ​

Name
T

Type declaration ​

â–¸ (this, variable, ...inputs): GenericFormula

NameType
thisInternalFormula<T>
variableGenericFormula
...inputsT

Defined in ​

profectus/src/game/formulas/types.d.ts:34


SubstitutionStack ​

Ƭ SubstitutionStack: (value: GenericFormula) => GenericFormula[] | undefined

Defined in ​

profectus/src/game/formulas/types.d.ts:68


TupleGuard ​

Ƭ TupleGuard<T>: T extends any[] ? FormulasToDecimals<T> : never

Type parameters ​

NameType
Textends any[]

Defined in ​

profectus/src/game/formulas/types.d.ts:75


VariableFormulaOptions ​

Ƭ VariableFormulaOptions: Object

Type declaration ​

NameType
variableProcessedComputable<DecimalSource>

Defined in ​

profectus/src/game/formulas/types.d.ts:40

- diff --git a/api/modules/game/gameLoop.html b/api/modules/game/gameLoop.html index e16566e2..3702e179 100644 --- a/api/modules/game/gameLoop.html +++ b/api/modules/game/gameLoop.html @@ -22,7 +22,7 @@
- diff --git a/api/modules/game/layers.html b/api/modules/game/layers.html index c7be1ca1..68c15f47 100644 --- a/api/modules/game/layers.html +++ b/api/modules/game/layers.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/layers ​

Interfaces ​

BaseLayer ​

• BaseLayer: Object

The properties that are added onto a processed LayerOptions to create a Layer

NameTypeDescription
emit<K>(...args: [K, ...Parameters<LayerEvents[K]>[]]) => voidA function to emit a LayerEvents event to this layer.
emitterEmitter<LayerEvents>An emitter for sending LayerEvents events for this layer.
idstringThe ID of the layer. Populated from the createLayer parameters. Used for saving and tracking open tabs.
minimizedPersistent<boolean>A persistent ref tracking if the tab is minimized or not.
nodesRef<Record<string, undefined | FeatureNode>>A map of FeatureNodes present in this layer's ContextComponent component.
on(...args: [event: keyof LayerEvents, cb: Function | Function | Function]) => UnsubscribeA function to register an event listener on emitter.

Defined in ​

profectus/src/game/layers.tsx:148


FeatureNode ​

• FeatureNode: Object

A feature's node in the DOM that has its size tracked.

NameType
elementHTMLElement
observerMutationObserver
rectDOMRect

Defined in ​

profectus/src/game/layers.tsx:28


LayerEvents ​

• LayerEvents: Object

All types of events able to be sent or emitted from a layer's emitter.

NameType
postUpdate(diff: number) => void
preUpdate(diff: number) => void
update(diff: number) => void

Defined in ​

profectus/src/game/layers.tsx:55


LayerOptions ​

• 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.

NameTypeDescription
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.
displayComputable<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.

Defined in ​

profectus/src/game/layers.tsx:107


Position ​

• Position: Object

An object representing the position of some entity.

NameTypeDescription
xnumberThe X component of the entity's position.
ynumberThe Y component of the entity's position.

Defined in ​

profectus/src/game/layers.tsx:95

Type Aliases ​

GenericLayer ​

Ƭ GenericLayer: Replace<Layer<LayerOptions>, { minWidth: ProcessedComputable<number> ; minimizable: ProcessedComputable<boolean> ; name: ProcessedComputable<string> }>

A type that matches any valid Layer object.

Defined in ​

profectus/src/game/layers.tsx:184


Layer ​

Ƭ 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.

Type parameters ​

NameType
Textends LayerOptions

Defined in ​

profectus/src/game/layers.tsx:168

Variables ​

BoundsInjectionKey ​

• 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.

Defined in ​

profectus/src/game/layers.tsx:52


NodesInjectionKey ​

• 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.

Defined in ​

profectus/src/game/layers.tsx:47


RegisterNodeInjectionKey ​

• 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.

Defined in ​

profectus/src/game/layers.tsx:37


UnregisterNodeInjectionKey ​

• 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.

Defined in ​

profectus/src/game/layers.tsx:42


addingLayers ​

• Const addingLayers: string[] = []

When creating layers, this array stores the layers currently being created, as a stack.

Defined in ​

profectus/src/game/layers.tsx:200


layers ​

• 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.

Defined in ​

profectus/src/game/layers.tsx:77


persistentRefs ​

• 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.

Defined in ​

profectus/src/game/layers.tsx:196

Functions ​

addLayer ​

â–¸ 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.

Parameters ​
NameTypeDescription
layerGenericLayerThe layer to add.
playerObjectThe player data object, which will have a data object for this layer.
player.layers?Record<string, Record<string, unknown>>-
Returns ​

void

Defined in ​

profectus/src/game/layers.tsx:286


createLayer ​

â–¸ createLayer<T>(id, optionsFunc): Layer<T>

Lazily creates a layer with the given options.

Type parameters ​
NameType
Textends LayerOptions
Parameters ​
NameTypeDescription
idstringThe ID this layer will have. See id.
optionsFuncOptionsFunc<T, BaseLayer>Layer options.
Returns ​

Layer<T>

Defined in ​

profectus/src/game/layers.tsx:206


getLayer ​

â–¸ getLayer<T>(layerID): T

Convenience method for getting a layer by its ID with correct typing.

Type parameters ​
NameType
Textends GenericLayer
Parameters ​
NameTypeDescription
layerIDstringThe ID of the layer to get.
Returns ​

T

Defined in ​

profectus/src/game/layers.tsx:313


reloadLayer ​

â–¸ 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.

Parameters ​
NameTypeDescription
layerGenericLayerLayer to remove and then re-add
Returns ​

void

Defined in ​

profectus/src/game/layers.tsx:334


removeLayer ​

â–¸ 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.

Parameters ​
NameTypeDescription
layerGenericLayerThe layer to remove.
Returns ​

void

Defined in ​

profectus/src/game/layers.tsx:322


setupLayerModal ​

â–¸ 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.

Parameters ​
NameTypeDescription
layerGenericLayerThe layer to display in the modal.
Returns ​

Object

NameType
modalJSXFunction
openModalVoidFunction

Defined in ​

profectus/src/game/layers.tsx:346

- diff --git a/api/modules/game/modifiers.html b/api/modules/game/modifiers.html index 1318afea..4716c825 100644 --- a/api/modules/game/modifiers.html +++ b/api/modules/game/modifiers.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/modifiers ​

Interfaces ​

AdditiveModifierOptions ​

• AdditiveModifierOptions: Object

An object that configures an additive modifier via createAdditiveModifier.

NameTypeDescription
addendComputable<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?booleanDetermines if numbers larger or smaller than 0 should be displayed as red.

Defined in ​

profectus/src/game/modifiers.tsx:53


ExponentialModifierOptions ​

• ExponentialModifierOptions: Object

An object that configures an exponential modifier via createExponentialModifier.

NameTypeDescription
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.
exponentComputable<DecimalSource>The amount to raise the input value to the power of.
smallerIsBetter?booleanDetermines if numbers larger or smaller than 1 should be displayed as red.
supportLowNumbers?booleanAdd 1 before calculating, then remove it afterwards. This prevents low numbers from becoming lower.

Defined in ​

profectus/src/game/modifiers.tsx:182


Modifier ​

• 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.

NameTypeDescription
apply(gain: DecimalSource) => DecimalSourceApplies 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) => GenericFormulaGet a formula for this modifier. Required by some features.
invert?(gain: DecimalSource) => DecimalSourceReverses the operation applied by the apply property. Required by some features.

Defined in ​

profectus/src/game/modifiers.tsx:22


ModifierSectionOptions ​

• ModifierSectionOptions: Object

An object that configures a modifier section via createModifierSection.

NameTypeDescription
base?DecimalSourceThe base value that'll be passed into the modifier. Defaults to 1.
baseText?CoercableComponentThe label to use for the base value. Defaults to "Base".
modifierWithRequired<Modifier, "description">The modifier to render.
smallerIsBetter?booleanDetermines if numbers larger or smaller than the base should be displayed as red.
subtitle?stringSmaller text that appears in the header after the title.
titlestringThe header for the section.
unit?stringThe unit of the value being modified, if any.

Defined in ​

profectus/src/game/modifiers.tsx:324


MultiplicativeModifierOptions ​

• MultiplicativeModifierOptions: Object

An object that configures an multiplicative modifier via createMultiplicativeModifier.

NameTypeDescription
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.
multiplierComputable<DecimalSource>The amount to multiply the input value by.
smallerIsBetter?booleanDetermines if numbers larger or smaller than 1 should be displayed as red.

Defined in ​

profectus/src/game/modifiers.tsx:118

Type Aliases ​

ModifierFromOptionalParams ​

Ƭ ModifierFromOptionalParams<T, S>: undefined extends T ? undefined extends S ? Omit<WithRequired<Modifier, "invert" | "getFormula">, "description" | "enabled"> : Omit<WithRequired<Modifier, "invert" | "enabled" | "getFormula">, "description"> : undefined extends S ? 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).

Type parameters ​

Name
T
S

Defined in ​

profectus/src/game/modifiers.tsx:44

Functions ​

createAdditiveModifier ​

â–¸ createAdditiveModifier<T>(optionsFunc): ModifierFromOptionalParams<T["description"], T["enabled"]>

Create a modifier that adds some value to the input value.

Type parameters ​
NameType
Textends AdditiveModifierOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T>Additive modifier options.
Returns ​

ModifierFromOptionalParams<T["description"], T["enabled"]>

Defined in ​

profectus/src/game/modifiers.tsx:68


createExponentialModifier ​

â–¸ createExponentialModifier<T>(optionsFunc): ModifierFromOptionalParams<T["description"], T["enabled"]>

Create a modifier that raises the input value to the power of some value.

Type parameters ​
NameType
Textends ExponentialModifierOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T>Exponential modifier options.
Returns ​

ModifierFromOptionalParams<T["description"], T["enabled"]>

Defined in ​

profectus/src/game/modifiers.tsx:199


createModifierSection ​

â–¸ createModifierSection(options): Element

Create a JSX element that displays a modifier. Intended to be used with the output from createSequentialModifier.

Parameters ​
NameTypeDescription
optionsModifierSectionOptionsModifier section options.
Returns ​

Element

Defined in ​

profectus/src/game/modifiers.tsx:346


createMultiplicativeModifier ​

â–¸ createMultiplicativeModifier<T>(optionsFunc): ModifierFromOptionalParams<T["description"], T["enabled"]>

Create a modifier that multiplies the input value by some value.

Type parameters ​
NameType
Textends MultiplicativeModifierOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T>Multiplicative modifier options.
Returns ​

ModifierFromOptionalParams<T["description"], T["enabled"]>

Defined in ​

profectus/src/game/modifiers.tsx:133


createSequentialModifier ​

â–¸ 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

createModifierSection.

Type parameters ​
NameType
Textends Modifier[]
ST extends WithRequired<Modifier, "invert">[] ? WithRequired<Modifier, "description" | "invert"> : Omit<WithRequired<Modifier, "description">, "invert">
Parameters ​
NameTypeDescription
modifiersFunc() => TThe modifiers to perform sequentially.
Returns ​

S

Defined in ​

profectus/src/game/modifiers.tsx:276

- diff --git a/api/modules/game/notifications.html b/api/modules/game/notifications.html index b01d3482..38446310 100644 --- a/api/modules/game/notifications.html +++ b/api/modules/game/notifications.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/notifications ​

Functions ​

createDismissableNotify ​

â–¸ 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.

Parameters ​
NameTypeDescription
elementVueFeatureThe element that will dismiss the notification on hover.
shouldNotifyRef<boolean> | () => booleanA function or ref that determines if the notif should be active currently or not.
Returns ​

Ref<boolean>

Defined in ​

profectus/src/game/notifications.ts:36


getHighNotifyStyle ​

â–¸ getHighNotifyStyle(): Object

Utility function to call getNotifyStyle with "high importance" parameters.

Returns ​

Object

NameType
borderColorstring
boxShadowstring
transformstring
zIndexnumber

Defined in ​

profectus/src/game/notifications.ts:27


getNotifyStyle ​

â–¸ 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.

Parameters ​
NameTypeDefault valueDescription
colorstring"white"The color of the glow effect.
strengthstring"8px"The strength of the glow effect - affects its spread.
Returns ​

Object

NameType
borderColorstring
boxShadowstring
transformstring
zIndexnumber

Defined in ​

profectus/src/game/notifications.ts:17

- diff --git a/api/modules/game/persistence.html b/api/modules/game/persistence.html index bb758796..a26509cf 100644 --- a/api/modules/game/persistence.html +++ b/api/modules/game/persistence.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/persistence ​

Type Aliases ​

NonPersistent ​

Ƭ NonPersistent<T>: WritableComputedRef<T> & { [DefaultValue]: T }

Type parameters ​

NameType
Textends State = State

Defined in ​

profectus/src/game/persistence.ts:38

profectus/src/game/persistence.ts:98


Persistent ​

Ƭ 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.

Type parameters ​

NameType
Textends State = State

Defined in ​

profectus/src/game/persistence.ts:71


State ​

Ƭ 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.

  • Decimals aren't allowed because we'd need to know to parse them back.
  • DecimalSources are allowed because the string is a valid value for them

Defined in ​

profectus/src/game/persistence.ts:60

Variables ​

CheckNaN ​

• Const CheckNaN: typeof CheckNaN

A symbol used in Persistent objects.

See

[CheckNaN]

Defined in ​

profectus/src/game/persistence.ts:48


DefaultValue ​

• Const DefaultValue: typeof DefaultValue

A symbol used in Persistent objects.

See

[DefaultValue]

Defined in ​

profectus/src/game/persistence.ts:23


Deleted ​

• Const Deleted: typeof Deleted

A symbol used in Persistent objects.

See

[Deleted]

Defined in ​

profectus/src/game/persistence.ts:33


NonPersistent ​

• Const NonPersistent: typeof NonPersistent

A symbol used in Persistent objects.

See

[NonPersistent]

Defined in ​

profectus/src/game/persistence.ts:38

profectus/src/game/persistence.ts:98


PersistentState ​

• Const PersistentState: typeof PersistentState

A symbol used in Persistent objects.

See

[PersistentState]

Defined in ​

profectus/src/game/persistence.ts:18


SaveDataPath ​

• Const SaveDataPath: typeof SaveDataPath

A symbol used in Persistent objects.

See

[SaveDataPath]

Defined in ​

profectus/src/game/persistence.ts:43


SkipPersistence ​

• Const SkipPersistence: typeof SkipPersistence

A symbol used to flag objects that should not be checked for persistent values.

Defined in ​

profectus/src/game/persistence.ts:53


StackTrace ​

• Const StackTrace: typeof StackTrace

A symbol used in Persistent objects.

See

[StackTrace]

Defined in ​

profectus/src/game/persistence.ts:28

Functions ​

deletePersistent ​

â–¸ 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.

Parameters ​
NameType
persistentPersistent<State>
Returns ​

void

Defined in ​

profectus/src/game/persistence.ts:244


isPersistent ​

â–¸ isPersistent(value): value is Persistent<State>

Type guard for whether an arbitrary value is a persistent ref

Parameters ​
NameTypeDescription
valueunknownThe value that may or may not be a persistent ref
Returns ​

value is Persistent<State>

Defined in ​

profectus/src/game/persistence.ts:194


noPersist ​

â–¸ 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.

Type parameters ​
NameType
Textends Ref<S, T> & { [CheckNaN]: boolean ; [DefaultValue]: S ; [Deleted]: boolean ; [NonPersistent]: NonPersistent<S> ; [PersistentState]: Ref<S> ; [SaveDataPath]: undefined | string[] ; [StackTrace]: string ; value: S }
Sextends State
Parameters ​
NameTypeDescription
persistentTThe persistent ref to unwrap, or an object to ignore all persistent refs within
Returns ​

T[typeof NonPersistent]

Other signatures ​

â–¸ noPersist<T>(persistent): T

NameType
persistentT

Defined in ​

profectus/src/game/persistence.ts:202

profectus/src/game/persistence.ts:205

profectus/src/game/persistence.ts:206


persistent ​

â–¸ 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.

Type parameters ​
NameType
Textends State
Parameters ​
NameTypeDefault valueDescription
defaultValueT | Ref<T>undefinedThe value the persistent ref should start at on fresh saves or when reset.
checkNaNbooleantrueWhether or not to check this ref for being NaN on set. Only use on refs that should always be DecimalSources.
Returns ​

Persistent<T>

Defined in ​

profectus/src/game/persistence.ts:130

- diff --git a/api/modules/game/player.html b/api/modules/game/player.html index 1244079b..05ce8f11 100644 --- a/api/modules/game/player.html +++ b/api/modules/game/player.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/player ​

Interfaces ​

Player ​

• Player: Object

The player save data object.

NameTypeDescription
autosavebooleanWhether or not to automatically save every couple of seconds and on tab close.
devSpeednull | numberA multiplier for time passing. Set to 0 when the game is paused.
idstringThe ID of this save.
keepGoingbooleanWhether or not to continue playing after hasWon is true.
layersRecord<string, LayerData<unknown>>A dictionary of layer save data.
modIDstringThe ID of this project, to make sure saves aren't imported into the wrong project.
modVersionstringThe version of the project this save was created by. Used for upgrading saves for new versions.
namestringThe display name of this save.
offlineProdbooleanWhether or not to apply offline time when loading this save.
offlineTimenull | numberHow much offline time has been accumulated and not yet processed.
tabsstring[]The open tabs.
timenumberThe current time this save was last opened at, in ms since the unix epoch.
timePlayednumberHow long, in ms, this game has been played.

Defined in ​

profectus/src/game/player.ts:5

Type Aliases ​

LayerData ​

Ƭ 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.

Type parameters ​

Name
T

Defined in ​

profectus/src/game/player.ts:35

Variables ​

default ​

• default: Object

Type declaration ​

NameTypeDescription
autosavebooleanWhether or not to automatically save every couple of seconds and on tab close.
devSpeednull | numberA multiplier for time passing. Set to 0 when the game is paused.
idstringThe ID of this save.
keepGoingbooleanWhether or not to continue playing after hasWon is true.
layersRecord<string, LayerData<unknown>>A dictionary of layer save data.
modIDstringThe ID of this project, to make sure saves aren't imported into the wrong project.
modVersionstringThe version of the project this save was created by. Used for upgrading saves for new versions.
namestringThe display name of this save.
offlineProdbooleanWhether or not to apply offline time when loading this save.
offlineTimenull | numberHow much offline time has been accumulated and not yet processed.
tabsstring[]The open tabs.
timenumberThe current time this save was last opened at, in ms since the unix epoch.
timePlayednumberHow long, in ms, this game has been played.

Defined in ​

profectus/src/game/player.ts:63

Functions ​

stringifySave ​

â–¸ stringifySave(player): string

Convert a player save data object into a JSON string. Unwraps refs.

Parameters ​
NameType
playerPlayer
Returns ​

string

Defined in ​

profectus/src/game/player.ts:66

- diff --git a/api/modules/game/requirements.html b/api/modules/game/requirements.html index b2a08618..2577d664 100644 --- a/api/modules/game/requirements.html +++ b/api/modules/game/requirements.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/requirements ​

Interfaces ​

CostRequirementOptions ​

• CostRequirementOptions: Object

An object that configures a Requirement based on a resource cost.

NameTypeDescription
costComputable<DecimalSource> | GenericFormulaThe 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.
cumulativeCost?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
directSum?Computable<number>When calculating requirement for multiple levels, how many should be directly summed for increase accuracy. High numbers can cause lag. Defaults to 10 if cumulative cost, 0 otherwise.
maxBulkAmount?Computable<DecimalSource>Upper limit on levels that can be performed at once. Defaults to 1.
pay?(amount?: DecimalSource) => voidPass-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.
resourceResource<DecimalSource>The resource that will be checked for meeting the cost.
visibility?Computable<boolean | Visible | None>Pass-through to visibility.

Defined in ​

profectus/src/game/requirements.tsx:68


Requirement ​

• Requirement: Object

An object that can be used to describe a requirement to perform some purchase or other action.

See

createCostRequirement

NameTypeDescription
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) => ElementThe display for this specific requirement. Required if visibility can be Visibility.Visible.
partialDisplay?(amount?: DecimalSource) => ElementThe display for this specific requirement. This is used for displays multiple requirements condensed. Required if visibility can be Visibility.Visible.
pay?(amount?: DecimalSource) => voidPerform any effects to the game state that should happen when the requirement gets triggered.
requirementMetProcessedComputable<boolean | DecimalSource>Whether or not this requirement has been met.
requiresPayProcessedComputable<boolean>Whether or not this requirement will need to affect the game state when whatever is using this requirement gets triggered.
visibilityProcessedComputable<boolean | Visible | None>Whether or not this requirement should be displayed in Vue Features. displayRequirements will respect this property.

Defined in ​

profectus/src/game/requirements.tsx:30

Type Aliases ​

CostRequirement ​

Ƭ CostRequirement: Replace<Requirement & CostRequirementOptions, { canMaximize: ProcessedComputable<boolean> ; cost: ProcessedComputable<DecimalSource> | GenericFormula ; cumulativeCost: ProcessedComputable<boolean> ; requiresPay: ProcessedComputable<boolean> ; visibility: ProcessedComputable<Visible | None | boolean> }>

Defined in ​

profectus/src/game/requirements.tsx:105


Requirements ​

Ƭ Requirements: Requirement | Requirement[]

Utility type for accepting 1 or more Requirements.

Defined in ​

profectus/src/game/requirements.tsx:65

Functions ​

createBooleanRequirement ​

â–¸ createBooleanRequirement(requirement, display?): Requirement

Creates a requirement based on a true/false value

Parameters ​
NameTypeDescription
requirementComputable<boolean>The boolean requirement to use
display?CoercableComponentHow to display this requirement to the user
Returns ​

Requirement

Defined in ​

profectus/src/game/requirements.tsx:252


createCostRequirement ​

â–¸ createCostRequirement<T>(optionsFunc): CostRequirement

Lazily creates a requirement with the given options, that is based on meeting an amount of a resource.

Type parameters ​
NameType
Textends CostRequirementOptions
Parameters ​
NameTypeDescription
optionsFuncOptionsFunc<T>Cost requirement options.
Returns ​

CostRequirement

Defined in ​

profectus/src/game/requirements.tsx:120


createVisibilityRequirement ​

â–¸ createVisibilityRequirement(feature): Requirement

Utility function for creating a requirement that a specified vue feature is visible

Parameters ​
NameTypeDescription
featureObjectThe feature to check the visibility of
feature.visibilityProcessedComputable<boolean | Visibility>-
Returns ​

Requirement

Defined in ​

profectus/src/game/requirements.tsx:237


displayRequirements ​

â–¸ displayRequirements(requirements, amount?): Element

Utility function for display 1+ requirements compactly.

Parameters ​
NameTypeDefault valueDescription
requirementsRequirementsundefinedThe 1+ requirements to display
amountDecimalSource1The amount of levels earned to be displayed
Returns ​

Element

Defined in ​

profectus/src/game/requirements.tsx:299


maxRequirementsMet ​

â–¸ 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.

Parameters ​
NameTypeDescription
requirementsRequirementsThe 1+ requirements to check
Returns ​

DecimalSource

Defined in ​

profectus/src/game/requirements.tsx:281


payByDivision ​

â–¸ payByDivision(this, amount?): void

NameType
thisCostRequirement
amount?DecimalSource

Defined in ​

profectus/src/game/requirements.tsx:351


payByReset ​

â–¸ payByReset(overrideDefaultValue?): (this: CostRequirement) => void

NameType
overrideDefaultValue?DecimalSource

Defined in ​

profectus/src/game/requirements.tsx:363


payRequirements ​

â–¸ payRequirements(requirements, amount?): void

Utility function for paying the costs for 1+ requirements

Parameters ​
NameTypeDefault valueDescription
requirementsRequirementsundefinedThe 1+ requirements to pay
amountDecimalSource1How many levels to pay for
Returns ​

void

Defined in ​

profectus/src/game/requirements.tsx:343


requirementsMet ​

â–¸ requirementsMet(requirements): boolean

Utility for checking if 1+ requirements are all met

Parameters ​
NameTypeDescription
requirementsRequirementsThe 1+ requirements to check
Returns ​

boolean

Defined in ​

profectus/src/game/requirements.tsx:269

- diff --git a/api/modules/game/settings.html b/api/modules/game/settings.html index f44463ff..95f9c0b0 100644 --- a/api/modules/game/settings.html +++ b/api/modules/game/settings.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/settings ​

Interfaces ​

Settings ​

• Settings: Object

The player's settings object.

NameTypeDescription
activestringThe ID of the active save.
alignUnitsbooleanWhether to align modifiers to the unit.
hideChallengesboolean-
msDisplayAchievementDisplay-
savesstring[]The IDs of all created saves.
showTPSbooleanWhether or not to show the current ticks per second in the lower left corner of the page.
themeThemesThe current theme to display the game in.
unthrottledbooleanWhether or not to cap the project at 20 ticks per second.

Defined in ​

profectus/src/game/settings.ts:10

profectus/src/features/achievements/achievement.tsx:295

profectus/src/features/challenges/challenge.tsx:358

Variables ​

default ​

• default: Settings

The player settings object. Stores data that persists across all saves. Automatically saved to localStorage whenever changed.

Defined in ​

profectus/src/game/settings.ts:56


gameComponents ​

• Const gameComponents: CoercableComponent[]

A list of components to add to the root of the page.

Defined in ​

profectus/src/game/settings.ts:119


infoComponents ​

• Const infoComponents: CoercableComponent[]

A list of components to show in the info modal.

Defined in ​

profectus/src/game/settings.ts:112


settingFields ​

• Const settingFields: CoercableComponent[]

A list of fields to append to the settings modal.

Defined in ​

profectus/src/game/settings.ts:105

Functions ​

hardResetSettings ​

â–¸ hardResetSettings(): void

A function that erases all player settings, including all saves.

Returns ​

void

Defined in ​

profectus/src/game/settings.ts:58


loadSettings ​

â–¸ 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.

Returns ​

void

Defined in ​

profectus/src/game/settings.ts:77


registerGameComponent ​

â–¸ registerGameComponent(component): void

Register a component to be displayed at the root of the page.

Parameters ​
NameType
componentCoercableComponent
Returns ​

void

Defined in ​

profectus/src/game/settings.ts:121


registerInfoComponent ​

â–¸ registerInfoComponent(component): void

Register a component to be displayed in the info modal.

Parameters ​
NameType
componentCoercableComponent
Returns ​

void

Defined in ​

profectus/src/game/settings.ts:114


registerSettingField ​

â–¸ registerSettingField(component): void

Register a field to be displayed in the settings modal.

Parameters ​
NameType
componentCoercableComponent
Returns ​

void

Defined in ​

profectus/src/game/settings.ts:107

- diff --git a/api/modules/game/state.html b/api/modules/game/state.html index a6a6e92b..00baeb2f 100644 --- a/api/modules/game/state.html +++ b/api/modules/game/state.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: game/state ​

Interfaces ​

Transient ​

• Transient: Object

An object of global data that is not persistent.

NameTypeDescription
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.
errorsError[]List of errors that have occurred, to show the user.
hasNaNbooleanWhether or not a NaN value has been detected and undealt with.
lastTenTicksnumber[]A list of the duration, in ms, of the last 10 game ticks. Used for calculating TPS.

Defined in ​

profectus/src/game/state.ts:6

Variables ​

default ​

• default: ShallowReactive<Transient>

The global transient state object.

Defined in ​

profectus/src/game/state.ts:26

- diff --git a/api/modules/lib/break_eternity.html b/api/modules/lib/break_eternity.html index c854f43d..d20706d1 100644 --- a/api/modules/lib/break_eternity.html +++ b/api/modules/lib/break_eternity.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: lib/break_eternity ​

Classes ​

default ​

• default: Object

The Decimal's value is simply mantissa * 10^exponent.

NameType
constructor(value?: DecimalSource) => default
layernumber
magnumber
signnumber
dInfdefault
dNaNdefault
dNegInfdefault
dNegOnedefault
dNumberMaxdefault
dNumberMindefault
dOnedefault
dTendefault
dTwodefault
dZerodefault
fromStringCacheLRUCache<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

Defined in ​

profectus/src/lib/break_eternity.ts:346

Type Aliases ​

CompareResult ​

Ƭ CompareResult: -1 | 0 | 1

Defined in ​

profectus/src/lib/break_eternity.ts:5


DecimalSource ​

Ƭ DecimalSource: default | number | string

Defined in ​

profectus/src/lib/break_eternity.ts:341

- diff --git a/api/modules/lib/collapseTransition.html b/api/modules/lib/collapseTransition.html index 158645db..2c0f0f75 100644 --- a/api/modules/lib/collapseTransition.html +++ b/api/modules/lib/collapseTransition.html @@ -22,7 +22,7 @@
- diff --git a/api/modules/lib/lru-cache.html b/api/modules/lib/lru-cache.html index 784d8a41..3bd259bf 100644 --- a/api/modules/lib/lru-cache.html +++ b/api/modules/lib/lru-cache.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: lib/lru-cache ​

Classes ​

LRUCache ​

• LRUCache<K, V>: Object

A LRU cache intended for caching pure functions.

Type parameters ​

Name
K
V
NameType
constructor<K, V>(maxSize: number) => LRUCache<K, V>
firstundefined | ListNode<K, V>
lastundefined | ListNode<K, V>
mapMap<K, ListNode<K, V>>
maxSizenumber
get size()number
get(key: K) => undefined | V
set(key: K, value: V) => void

Defined in ​

profectus/src/lib/lru-cache.ts:4

- diff --git a/api/modules/lib/pixi.html b/api/modules/lib/pixi.html index 724469c8..33138eb2 100644 --- a/api/modules/lib/pixi.html +++ b/api/modules/lib/pixi.html @@ -22,7 +22,7 @@
- diff --git a/api/modules/lib/pwa-register.html b/api/modules/lib/pwa-register.html index 5cc7bfe5..6f071b50 100644 --- a/api/modules/lib/pwa-register.html +++ b/api/modules/lib/pwa-register.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: lib/pwa-register ​

Interfaces ​

RegisterSWOptions ​

• RegisterSWOptions: Object

NameType
immediate?boolean
onNeedRefresh?() => void
onOfflineReady?() => void
onRegisterError?(error: any) => void
onRegistered?(registration: undefined | ServiceWorkerRegistration) => void

Defined in ​

profectus/src/lib/pwa-register.d.ts:4

Functions ​

useRegisterSW ​

â–¸ useRegisterSW(options?): Object

NameType
options?RegisterSWOptions

Defined in ​

profectus/src/lib/pwa-register.d.ts:12

- diff --git a/api/modules/lib/vue-panzoom.html b/api/modules/lib/vue-panzoom.html index 51698268..5ba8946a 100644 --- a/api/modules/lib/vue-panzoom.html +++ b/api/modules/lib/vue-panzoom.html @@ -22,7 +22,7 @@
- diff --git a/api/modules/lib/vue-textarea-autosize.html b/api/modules/lib/vue-textarea-autosize.html index b4ebfc8e..0fb78756 100644 --- a/api/modules/lib/vue-textarea-autosize.html +++ b/api/modules/lib/vue-textarea-autosize.html @@ -22,7 +22,7 @@
- diff --git a/api/modules/util/bignum.html b/api/modules/util/bignum.html index 4e32f878..5fa5adbc 100644 --- a/api/modules/util/bignum.html +++ b/api/modules/util/bignum.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: util/bignum ​

References ​

default ​

Re-exports default

Type Aliases ​

DecimalSource ​

Ƭ DecimalSource: DecimalSource

Defined in ​

profectus/src/util/bignum.ts:18

Functions ​

commaFormat ​

â–¸ commaFormat(num, precision): string

NameType
numDecimalSource
precisionnumber

Defined in ​

profectus/src/util/bignum.ts:8


exponentialFormat ​

â–¸ exponentialFormat(num, precision, mantissa?): string

NameTypeDefault value
numDecimalSourceundefined
precisionnumberundefined
mantissabooleantrue

Defined in ​

profectus/src/util/bignum.ts:7


format ​

â–¸ format(num, precision?, small?): string

NameType
numDecimalSource
precision?number
small?boolean

Defined in ​

profectus/src/util/bignum.ts:10


formatSmall ​

â–¸ formatSmall(x, precision?): string

NameType
xDecimalSource
precision?number

Defined in ​

profectus/src/util/bignum.ts:14


formatTime ​

â–¸ formatTime(seconds): string

NameType
secondsDecimalSource

Defined in ​

profectus/src/util/bignum.ts:12


formatWhole ​

â–¸ formatWhole(num): string

NameType
numDecimalSource

Defined in ​

profectus/src/util/bignum.ts:11


invertOOM ​

â–¸ invertOOM(x): default

NameType
xDecimalSource

Defined in ​

profectus/src/util/bignum.ts:15


regularFormat ​

â–¸ regularFormat(num, precision): string

NameType
numDecimalSource
precisionnumber

Defined in ​

profectus/src/util/bignum.ts:9


toPlaces ​

â–¸ toPlaces(x, precision, maxAccepted): string

NameType
xDecimalSource
precisionnumber
maxAcceptedDecimalSource

Defined in ​

profectus/src/util/bignum.ts:13

- diff --git a/api/modules/util/break_eternity.html b/api/modules/util/break_eternity.html index a1dc8624..ba705da8 100644 --- a/api/modules/util/break_eternity.html +++ b/api/modules/util/break_eternity.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: util/break_eternity ​

References ​

default ​

Re-exports default

Functions ​

commaFormat ​

â–¸ commaFormat(num, precision): string

NameType
numDecimalSource
precisionnumber

Defined in ​

profectus/src/util/break_eternity.ts:28


exponentialFormat ​

â–¸ exponentialFormat(num, precision, mantissa?): string

NameTypeDefault value
numDecimalSourceundefined
precisionnumberundefined
mantissabooleantrue

Defined in ​

profectus/src/util/break_eternity.ts:9


format ​

â–¸ format(num, precision?, small?): string

NameType
numDecimalSource
precision?number
small?boolean

Defined in ​

profectus/src/util/break_eternity.ts:69


formatSmall ​

â–¸ formatSmall(x, precision?): string

NameType
xDecimalSource
precision?number

Defined in ​

profectus/src/util/break_eternity.ts:185


formatTime ​

â–¸ formatTime(seconds): string

NameType
secondsDecimalSource

Defined in ​

profectus/src/util/break_eternity.ts:130


formatWhole ​

â–¸ formatWhole(num): string

NameType
numDecimalSource

Defined in ​

profectus/src/util/break_eternity.ts:116


invertOOM ​

â–¸ invertOOM(x): default

NameType
xDecimalSource

Defined in ​

profectus/src/util/break_eternity.ts:189


regularFormat ​

â–¸ regularFormat(num, precision): string

NameType
numDecimalSource
precisionnumber

Defined in ​

profectus/src/util/break_eternity.ts:43


toPlaces ​

â–¸ toPlaces(x, precision, maxAccepted): string

NameType
xDecimalSource
precisionnumber
maxAcceptedDecimalSource

Defined in ​

profectus/src/util/break_eternity.ts:173

- diff --git a/api/modules/util/common.html b/api/modules/util/common.html index ad8f8f7d..74783366 100644 --- a/api/modules/util/common.html +++ b/api/modules/util/common.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: util/common ​

Enumerations ​

Direction ​

• Direction: Object

NameType
Default"Up"
Down"Down"
Left"Left"
Right"Right"
Up"Up"

Defined in ​

profectus/src/util/common.ts:21

Type Aliases ​

ArrayElements ​

Ƭ ArrayElements<T>: T extends ReadonlyArray<infer S> ? S : never

Type parameters ​

NameType
Textends ReadonlyArray<unknown>

Defined in ​

profectus/src/util/common.ts:3


WithRequired ​

Ƭ WithRequired<T, K>: T &

Type parameters ​

NameType
TT
Kextends keyof T

Defined in ​

profectus/src/util/common.ts:1

Functions ​

camelToTitle ​

â–¸ camelToTitle(camel): string

NameType
camelstring

Defined in ​

profectus/src/util/common.ts:9


isFunction ​

â–¸ isFunction<T, S, R>(functionOrValue): functionOrValue is Function

NameType
functionOrValueR | (...args: S) => T

Defined in ​

profectus/src/util/common.ts:15

- diff --git a/api/modules/util/computed.html b/api/modules/util/computed.html index aa4524b4..55c537c4 100644 --- a/api/modules/util/computed.html +++ b/api/modules/util/computed.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: util/computed ​

Type Aliases ​

Computable ​

Ƭ Computable<T>: T | Ref<T> | () => T

Type parameters ​

Name
T

Defined in ​

profectus/src/util/computed.ts:8


ComputableKeysOf ​

Ƭ ComputableKeysOf<T>: Pick<T, { [K in keyof T]: T[K] extends Computable<unknown> ? K : never }[keyof T]>

Type parameters ​

Name
T

Defined in ​

profectus/src/util/computed.ts:22


GetComputableType ​

Ƭ GetComputableType<T>: T extends { [DoNotCache]: true } ? T : T extends () => infer S ? Ref<S> : undefined extends T ? undefined : T

Type parameters ​

Name
T

Defined in ​

profectus/src/util/computed.ts:10


GetComputableTypeWithDefault ​

Ƭ GetComputableTypeWithDefault<T, S>: undefined extends T ? S : GetComputableType<NonNullable<T>>

Type parameters ​

Name
T
S

Defined in ​

profectus/src/util/computed.ts:17


ProcessedComputable ​

Ƭ ProcessedComputable<T>: T | Ref<T>

Type parameters ​

Name
T

Defined in ​

profectus/src/util/computed.ts:9


UnwrapComputableType ​

Ƭ UnwrapComputableType<T>: T extends Ref<infer S> ? S : T extends () => infer S ? S : T

Type parameters ​

Name
T

Defined in ​

profectus/src/util/computed.ts:20

Variables ​

DoNotCache ​

• Const DoNotCache: typeof DoNotCache

Defined in ​

profectus/src/util/computed.ts:6

Functions ​

convertComputable ​

â–¸ convertComputable<T>(obj): ProcessedComputable<T>

NameType
objComputable<T>

Defined in ​

profectus/src/util/computed.ts:50


processComputable ​

â–¸ processComputable<T, S>(obj, key): asserts obj is T & { [K in string | number | symbol]: ProcessedComputable<UnwrapComputableType<T[S]>> }

NameType
objT
keyS

Defined in ​

profectus/src/util/computed.ts:31

- diff --git a/api/modules/util/proxies.html b/api/modules/util/proxies.html index 210d0078..6fefb9c5 100644 --- a/api/modules/util/proxies.html +++ b/api/modules/util/proxies.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: util/proxies ​

Type Aliases ​

Proxied ​

Ƭ 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

Type parameters ​

Name
T

Defined in ​

profectus/src/util/proxies.ts:19


ProxiedWithState ​

Ƭ 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

Type parameters ​

Name
T

Defined in ​

profectus/src/util/proxies.ts:8

Variables ​

ProxyPath ​

• Const ProxyPath: typeof ProxyPath

Defined in ​

profectus/src/util/proxies.ts:6


ProxyState ​

• Const ProxyState: typeof ProxyState

Defined in ​

profectus/src/util/proxies.ts:5

Functions ​

createLazyProxy ​

â–¸ createLazyProxy<T, S>(objectFunc, baseObject?): T

NameType
objectFunc(this: S, baseObject: S) => T & S
baseObjectS

Defined in ​

profectus/src/util/proxies.ts:33

- diff --git a/api/modules/util/save.html b/api/modules/util/save.html index 735ae011..61d2158a 100644 --- a/api/modules/util/save.html +++ b/api/modules/util/save.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: util/save ​

Variables ​

loadingSave ​

• Const loadingSave: Ref<boolean>

Defined in ​

profectus/src/util/save.ts:89

Functions ​

deleteLowerSaves ​

â–¸ deleteLowerSaves(): void

Defined in ​

profectus/src/util/save.ts:155


getUniqueID ​

â–¸ getUniqueID(): string

Defined in ​

profectus/src/util/save.ts:80


hardReset ​

â–¸ hardReset(): Promise<void>

Defined in ​

profectus/src/util/save.ts:152


load ​

â–¸ load(): Promise<void>

Defined in ​

profectus/src/util/save.ts:35


loadSave ​

â–¸ loadSave(playerObj): Promise<void>

NameType
playerObjPartial<Player>

Defined in ​

profectus/src/util/save.ts:91


newSave ​

â–¸ newSave(): Player

Defined in ​

profectus/src/util/save.ts:70


save ​

â–¸ save(playerData?): string

NameType
playerData?Player

Defined in ​

profectus/src/util/save.ts:29


setupInitialStore ​

â–¸ setupInitialStore(player?): Player

NameType
playerPartial<Player>

Defined in ​

profectus/src/util/save.ts:9

- diff --git a/api/modules/util/vue.html b/api/modules/util/vue.html index 724ba1d4..deb5bcea 100644 --- a/api/modules/util/vue.html +++ b/api/modules/util/vue.html @@ -22,7 +22,7 @@
Skip to content
On this page

Module: util/vue ​

Interfaces ​

VueFeature ​

• VueFeature: Object

NameType
[Component]GenericComponent
[GatherProps]() => Record<string, unknown>

Defined in ​

profectus/src/util/vue.tsx:46

Type Aliases ​

PropTypes ​

Ƭ PropTypes: typeof Boolean | typeof String | typeof Number | typeof Function | typeof Object | typeof Array

Defined in ​

profectus/src/util/vue.tsx:216

Functions ​

coerceComponent ​

â–¸ coerceComponent(component, defaultWrapper?): DefineComponent

NameTypeDefault value
componentCoercableComponentundefined
defaultWrapperstring"span"

Defined in ​

profectus/src/util/vue.tsx:25


computeComponent ​

â–¸ computeComponent(component, defaultWrapper?): ShallowRef<Component | "">

NameTypeDefault value
componentRef<ProcessedComputable<CoercableComponent>>undefined
defaultWrapperstring"div"

Defined in ​

profectus/src/util/vue.tsx:175


computeOptionalComponent ​

â–¸ computeOptionalComponent(component, defaultWrapper?): ShallowRef<Component | "" | null>

NameTypeDefault value
componentRef<ProcessedComputable<undefined | CoercableComponent>>undefined
defaultWrapperstring"div"

Defined in ​

profectus/src/util/vue.tsx:185


getFirstFeature ​

â–¸ getFirstFeature<T>(features, filter): Object

NameType
featuresT[]
filter(feature: T) => boolean

Defined in ​

profectus/src/util/vue.tsx:155


isCoercableComponent ​

â–¸ isCoercableComponent(component): component is CoercableComponent

NameType
componentunknown

Defined in ​

profectus/src/util/vue.tsx:104


joinJSX ​

â–¸ joinJSX(objects, joiner): JSX.Element

NameType
objectsElement[]
joinerElement

Defined in ​

profectus/src/util/vue.tsx:94


processedPropType ​

â–¸ processedPropType<T>(...types): PropType<ProcessedComputable<T>>

NameType
...typesPropTypes[]

Defined in ​

profectus/src/util/vue.tsx:225


render ​

â–¸ render(object): JSX.Element | DefineComponent

NameType
objectCoercableComponent | VueFeature

Defined in ​

profectus/src/util/vue.tsx:51


renderCol ​

â–¸ renderCol(...objects): JSX.Element

NameType
...objects(CoercableComponent | VueFeature)[]

Defined in ​

profectus/src/util/vue.tsx:66


renderColJSX ​

â–¸ renderColJSX(...objects): JSX.Element

NameType
...objects(CoercableComponent | VueFeature)[]

Defined in ​

profectus/src/util/vue.tsx:90


renderJSX ​

â–¸ renderJSX(object): JSX.Element

NameType
objectCoercableComponent | VueFeature

Defined in ​

profectus/src/util/vue.tsx:70


renderRow ​

â–¸ renderRow(...objects): JSX.Element

NameType
...objects(CoercableComponent | VueFeature)[]

Defined in ​

profectus/src/util/vue.tsx:62


renderRowJSX ​

â–¸ renderRowJSX(...objects): JSX.Element

NameType
...objects(CoercableComponent | VueFeature)[]

Defined in ​

profectus/src/util/vue.tsx:86


setRefValue ​

â–¸ setRefValue<T>(ref, value): void

NameType
refRef<T | Ref<T>>
valueT

Defined in ​

profectus/src/util/vue.tsx:208


setupHoldToClick ​

â–¸ setupHoldToClick(onClick?, onHold?): Object

NameType
onClick?Ref<undefined | (e?: MouseEvent | TouchEvent) => void>
onHold?Ref<undefined | VoidFunction>

Defined in ​

profectus/src/util/vue.tsx:119


trackHover ​

â–¸ trackHover(element): Ref<boolean>

NameType
elementVueFeature

Defined in ​

profectus/src/util/vue.tsx:232


unwrapRef ​

â–¸ unwrapRef<T>(ref): T

NameType
refRef<ProcessedComputable<T>>

Defined in ​

profectus/src/util/vue.tsx:204


wrapRef ​

â–¸ wrapRef<T>(ref): ComputedRef<T>

NameType
refRef<ProcessedComputable<T>>

Defined in ​

profectus/src/util/vue.tsx:200

- diff --git a/api/overview.html b/api/overview.html index 5dad98c1..703f334f 100644 --- a/api/overview.html +++ b/api/overview.html @@ -22,7 +22,7 @@
- diff --git a/assets/guide_advanced-concepts_creating-features.md.083776fa.js b/assets/guide_advanced-concepts_creating-features.md.88ee9059.js similarity index 99% rename from assets/guide_advanced-concepts_creating-features.md.083776fa.js rename to assets/guide_advanced-concepts_creating-features.md.88ee9059.js index 1c9d3e4b..63337498 100644 --- a/assets/guide_advanced-concepts_creating-features.md.083776fa.js +++ b/assets/guide_advanced-concepts_creating-features.md.88ee9059.js @@ -1,4 +1,4 @@ -import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const d=JSON.parse('{"title":"Creating Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/creating-features.md","lastUpdated":1684369374000}'),o={name:"guide/advanced-concepts/creating-features.md"},t=n(`

Creating Features ​

Profectus is designed to encourage the developer to eventually start designing their own features for use in specific games. Features are designed to work where they require minimal (and typically zero) modifications around the code base - you simply write a single file for the feature, and any vue components it needs, and the act of importing that feature will set everything up. This also means you can share these features with others in entire collections, and any they don't use won't be present in the build output, won't be loaded, and won't affect the project in any way.

Creating the Feature ​

Every feature has a couple of types. They have the feature themselves, a generic version for convenience, and any constructor typically has an options type and a type that gets "added" to it to create the feature itself. These typically involve replacing some types to denote how various properties change from, for example, Computable<X> to ProcessedComputable<X>. You should be able to use any of the existing features as a reference for how these types look and work.

Most significantly, the base type should typically always have a type property pointing to a symbol unique to this feature, so they can be easily differentiated at runtime. If it's a feature that should be renderable, then it'll also need [Component] and [GatherProps] properties, which describe the vue component to use and how to get the props for it from this feature, as well as a unique ID for the feature's node. You can use the getUniqueID utility to help.

The constructor itself should do several things. They should take their options within a function, so that they're not resolved when the object is constructed. It should return a lazy proxy of the feature, which allows features to reference each other and only resolve themselves once every feature is defined. The constructor should create any persistent refs it may require outside of the lazy proxy - it won't have access to the options at this point, so it should make any it potentially may require. Any that turn out not being needed can be deleted. Inside the lazy proxy the constructor should create the options object, assign onto it every property from the base type, call processComputable on every computable type, and setDefault on any property with a default value. Then you should be able to simply return the options object, likely with a type cast, and the constructor will be complete.

Because typescript does not emit JS, if a property is supposed to be a function it is impossible to differentiate between a function that is itself the intended value or a function that returns the actual value. For this reason it is not recommended for any feature types to include properties that are Computable<Function>s, and all functions will be wrapped in computed. The notable exception to this is JSX, which uses a utility function to mark that a function should not be wrapped.

Vue Components ​

Any vue components you write need to do a couple things. Typically they'll need to type any props that come from computed properties appropriately, for which you can use the processedPropType utility - using it will look something like style: processedPropType<StyleValue>(String, Object, Array). You'll also want to make sure to unref any of these props you use in the template. style is an exception though, where it should actually be unreffed inside the GatherProps function or else it won't work with computed refs. The template should make sure to include a Node component with the feature's ID. Also, if there are custom displays this feature may have, you'll want to convert the CoercableComponent into a Vue component inside the setup function, typically using the computeComponent or computeOptionalComponent utilities.

Custom Settings ​

To add a setting to the options menu specific to this feature, you'll need to do three things, all inside the feature's file. First, extend the settings type with the name of the new setting. For example, here's how the challenge feature adds a setting to hide completed challenges:

ts
declare module "game/settings" {
+import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const d=JSON.parse('{"title":"Creating Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/creating-features.md","lastUpdated":1685337378000}'),o={name:"guide/advanced-concepts/creating-features.md"},t=n(`

Creating Features ​

Profectus is designed to encourage the developer to eventually start designing their own features for use in specific games. Features are designed to work where they require minimal (and typically zero) modifications around the code base - you simply write a single file for the feature, and any vue components it needs, and the act of importing that feature will set everything up. This also means you can share these features with others in entire collections, and any they don't use won't be present in the build output, won't be loaded, and won't affect the project in any way.

Creating the Feature ​

Every feature has a couple of types. They have the feature themselves, a generic version for convenience, and any constructor typically has an options type and a type that gets "added" to it to create the feature itself. These typically involve replacing some types to denote how various properties change from, for example, Computable<X> to ProcessedComputable<X>. You should be able to use any of the existing features as a reference for how these types look and work.

Most significantly, the base type should typically always have a type property pointing to a symbol unique to this feature, so they can be easily differentiated at runtime. If it's a feature that should be renderable, then it'll also need [Component] and [GatherProps] properties, which describe the vue component to use and how to get the props for it from this feature, as well as a unique ID for the feature's node. You can use the getUniqueID utility to help.

The constructor itself should do several things. They should take their options within a function, so that they're not resolved when the object is constructed. It should return a lazy proxy of the feature, which allows features to reference each other and only resolve themselves once every feature is defined. The constructor should create any persistent refs it may require outside of the lazy proxy - it won't have access to the options at this point, so it should make any it potentially may require. Any that turn out not being needed can be deleted. Inside the lazy proxy the constructor should create the options object, assign onto it every property from the base type, call processComputable on every computable type, and setDefault on any property with a default value. Then you should be able to simply return the options object, likely with a type cast, and the constructor will be complete.

Because typescript does not emit JS, if a property is supposed to be a function it is impossible to differentiate between a function that is itself the intended value or a function that returns the actual value. For this reason it is not recommended for any feature types to include properties that are Computable<Function>s, and all functions will be wrapped in computed. The notable exception to this is JSX, which uses a utility function to mark that a function should not be wrapped.

Vue Components ​

Any vue components you write need to do a couple things. Typically they'll need to type any props that come from computed properties appropriately, for which you can use the processedPropType utility - using it will look something like style: processedPropType<StyleValue>(String, Object, Array). You'll also want to make sure to unref any of these props you use in the template. style is an exception though, where it should actually be unreffed inside the GatherProps function or else it won't work with computed refs. The template should make sure to include a Node component with the feature's ID. Also, if there are custom displays this feature may have, you'll want to convert the CoercableComponent into a Vue component inside the setup function, typically using the computeComponent or computeOptionalComponent utilities.

Custom Settings ​

To add a setting to the options menu specific to this feature, you'll need to do three things, all inside the feature's file. First, extend the settings type with the name of the new setting. For example, here's how the challenge feature adds a setting to hide completed challenges:

ts
declare module "game/settings" {
     interface Settings {
         hideChallenges: boolean;
     }
diff --git a/assets/guide_advanced-concepts_creating-features.md.083776fa.lean.js b/assets/guide_advanced-concepts_creating-features.md.88ee9059.lean.js
similarity index 85%
rename from assets/guide_advanced-concepts_creating-features.md.083776fa.lean.js
rename to assets/guide_advanced-concepts_creating-features.md.88ee9059.lean.js
index dabaa3d8..13c3a2fe 100644
--- a/assets/guide_advanced-concepts_creating-features.md.083776fa.lean.js
+++ b/assets/guide_advanced-concepts_creating-features.md.88ee9059.lean.js
@@ -1 +1 @@
-import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const d=JSON.parse('{"title":"Creating Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/creating-features.md","lastUpdated":1684369374000}'),o={name:"guide/advanced-concepts/creating-features.md"},t=n("",19),l=[t];function p(r,c,i,y,F,D){return a(),e("div",null,l)}const C=s(o,[["render",p]]);export{d as __pageData,C as default};
+import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const d=JSON.parse('{"title":"Creating Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/creating-features.md","lastUpdated":1685337378000}'),o={name:"guide/advanced-concepts/creating-features.md"},t=n("",19),l=[t];function p(r,c,i,y,F,D){return a(),e("div",null,l)}const C=s(o,[["render",p]]);export{d as __pageData,C as default};
diff --git a/assets/guide_advanced-concepts_dynamic-layers.md.f04ecae7.js b/assets/guide_advanced-concepts_dynamic-layers.md.9ec766d2.js
similarity index 98%
rename from assets/guide_advanced-concepts_dynamic-layers.md.f04ecae7.js
rename to assets/guide_advanced-concepts_dynamic-layers.md.9ec766d2.js
index caa33567..1b65cf15 100644
--- a/assets/guide_advanced-concepts_dynamic-layers.md.f04ecae7.js
+++ b/assets/guide_advanced-concepts_dynamic-layers.md.9ec766d2.js
@@ -1,4 +1,4 @@
-import{_ as a,c as s,o as e,N as n}from"./chunks/framework.0799945b.js";const D=JSON.parse('{"title":"Dynamic Layers","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/dynamic-layers.md","lastUpdated":1684369374000}'),o={name:"guide/advanced-concepts/dynamic-layers.md"},l=n(`

Dynamic Layers ​

You can dynamically add and remove layers using the addLayer and removeLayer functions. It's important to note that removing a layer does not affect the player's save data. You can safely add and remove the same layer without losing any progress. For instances where the structure of a layer changes, such as when adding a new feature, use the reloadLayer function.

When procedurally generating layers with similar structures, consider using a utility function like the one below. This function allows you to access a correctly typed reference to a layer with a specified ID easily:

ts
function getDynLayer(id: string): DynamicLayer {
+import{_ as a,c as s,o as e,N as n}from"./chunks/framework.0799945b.js";const D=JSON.parse('{"title":"Dynamic Layers","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/dynamic-layers.md","lastUpdated":1685337378000}'),o={name:"guide/advanced-concepts/dynamic-layers.md"},l=n(`

Dynamic Layers ​

You can dynamically add and remove layers using the addLayer and removeLayer functions. It's important to note that removing a layer does not affect the player's save data. You can safely add and remove the same layer without losing any progress. For instances where the structure of a layer changes, such as when adding a new feature, use the reloadLayer function.

When procedurally generating layers with similar structures, consider using a utility function like the one below. This function allows you to access a correctly typed reference to a layer with a specified ID easily:

ts
function getDynLayer(id: string): DynamicLayer {
   const layer = layers[id];
   if (!layer) throw "Layer does not exist";
   return layer as DynamicLayer; // you might need an "as unknown" after layer
diff --git a/assets/guide_advanced-concepts_dynamic-layers.md.f04ecae7.lean.js b/assets/guide_advanced-concepts_dynamic-layers.md.9ec766d2.lean.js
similarity index 85%
rename from assets/guide_advanced-concepts_dynamic-layers.md.f04ecae7.lean.js
rename to assets/guide_advanced-concepts_dynamic-layers.md.9ec766d2.lean.js
index 6907e791..b36b0166 100644
--- a/assets/guide_advanced-concepts_dynamic-layers.md.f04ecae7.lean.js
+++ b/assets/guide_advanced-concepts_dynamic-layers.md.9ec766d2.lean.js
@@ -1 +1 @@
-import{_ as a,c as s,o as e,N as n}from"./chunks/framework.0799945b.js";const D=JSON.parse('{"title":"Dynamic Layers","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/dynamic-layers.md","lastUpdated":1684369374000}'),o={name:"guide/advanced-concepts/dynamic-layers.md"},l=n("",6),t=[l];function r(p,c,y,i,d,u){return e(),s("div",null,t)}const h=a(o,[["render",r]]);export{D as __pageData,h as default};
+import{_ as a,c as s,o as e,N as n}from"./chunks/framework.0799945b.js";const D=JSON.parse('{"title":"Dynamic Layers","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/dynamic-layers.md","lastUpdated":1685337378000}'),o={name:"guide/advanced-concepts/dynamic-layers.md"},l=n("",6),t=[l];function r(p,c,y,i,d,u){return e(),s("div",null,t)}const h=a(o,[["render",r]]);export{D as __pageData,h as default};
diff --git a/assets/guide_advanced-concepts_nodes.md.0c181795.js b/assets/guide_advanced-concepts_nodes.md.92611da2.js
similarity index 99%
rename from assets/guide_advanced-concepts_nodes.md.0c181795.js
rename to assets/guide_advanced-concepts_nodes.md.92611da2.js
index b6d7e966..361e8d08 100644
--- a/assets/guide_advanced-concepts_nodes.md.0c181795.js
+++ b/assets/guide_advanced-concepts_nodes.md.92611da2.js
@@ -1,4 +1,4 @@
-import{_ as s,c as n,o as a,N as o}from"./chunks/framework.0799945b.js";const C=JSON.parse('{"title":"Nodes","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/nodes.md","lastUpdated":1684369374000}'),l={name:"guide/advanced-concepts/nodes.md"},e=o(`

Nodes ​

Features rendered in the DOM should include a Node component, which registers itself to the nearest Context component (usually within the Layer's component) and tracks the bounding rect (both size and position) of the DOM element. Access the DOM element for a feature via its unique id property within layer.nodes, provided it currently exists.

This is useful for features with complex displays, such as particle effects positioned relative to another feature or drawing links between different nodes. To illustrate this, let's look at a complete example of using layer.nodes to get a node's bounding rect and then placing a particle effect using it. Here's an example from Kronos:

ts
const particlesEmitter = ref(particles.addEmitter(element.particlesConfig));
+import{_ as s,c as n,o as a,N as o}from"./chunks/framework.0799945b.js";const C=JSON.parse('{"title":"Nodes","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/nodes.md","lastUpdated":1685337378000}'),l={name:"guide/advanced-concepts/nodes.md"},e=o(`

Nodes ​

Features rendered in the DOM should include a Node component, which registers itself to the nearest Context component (usually within the Layer's component) and tracks the bounding rect (both size and position) of the DOM element. Access the DOM element for a feature via its unique id property within layer.nodes, provided it currently exists.

This is useful for features with complex displays, such as particle effects positioned relative to another feature or drawing links between different nodes. To illustrate this, let's look at a complete example of using layer.nodes to get a node's bounding rect and then placing a particle effect using it. Here's an example from Kronos:

ts
const particlesEmitter = ref(particles.addEmitter(element.particlesConfig));
 const updateParticleEffect = async ([shouldEmit, rect, boundingRect]: [
     boolean,
     DOMRect | undefined,
diff --git a/assets/guide_advanced-concepts_nodes.md.0c181795.lean.js b/assets/guide_advanced-concepts_nodes.md.92611da2.lean.js
similarity index 84%
rename from assets/guide_advanced-concepts_nodes.md.0c181795.lean.js
rename to assets/guide_advanced-concepts_nodes.md.92611da2.lean.js
index caf16fc0..4d91632b 100644
--- a/assets/guide_advanced-concepts_nodes.md.0c181795.lean.js
+++ b/assets/guide_advanced-concepts_nodes.md.92611da2.lean.js
@@ -1 +1 @@
-import{_ as s,c as n,o as a,N as o}from"./chunks/framework.0799945b.js";const C=JSON.parse('{"title":"Nodes","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/nodes.md","lastUpdated":1684369374000}'),l={name:"guide/advanced-concepts/nodes.md"},e=o("",6),p=[e];function t(c,r,y,D,F,i){return a(),n("div",null,p)}const d=s(l,[["render",t]]);export{C as __pageData,d as default};
+import{_ as s,c as n,o as a,N as o}from"./chunks/framework.0799945b.js";const C=JSON.parse('{"title":"Nodes","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/nodes.md","lastUpdated":1685337378000}'),l={name:"guide/advanced-concepts/nodes.md"},e=o("",6),p=[e];function t(c,r,y,D,F,i){return a(),n("div",null,p)}const d=s(l,[["render",t]]);export{C as __pageData,d as default};
diff --git a/assets/guide_creating-your-project_changelog.md.a35dd134.js b/assets/guide_creating-your-project_changelog.md.d8a46ee2.js
similarity index 98%
rename from assets/guide_creating-your-project_changelog.md.a35dd134.js
rename to assets/guide_creating-your-project_changelog.md.d8a46ee2.js
index 77d4da2d..16289ac0 100644
--- a/assets/guide_creating-your-project_changelog.md.a35dd134.js
+++ b/assets/guide_creating-your-project_changelog.md.d8a46ee2.js
@@ -1,4 +1,4 @@
-import{_ as s,c as a,o as n,N as e}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Changelog","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/changelog.md","lastUpdated":1684369374000}'),l={name:"guide/creating-your-project/changelog.md"},o=e(`

Changelog ​

This is a Vue component stored at /src/data/Changelog.vue used to display all the changes version to version. You can use any features you'd like within here, but it's recommended to simply add new <details> elements for each new major release, and mark the most recent one as open by default. It is strongly advised to not change any of the code relating to making the changelog appear in a modal.

There is a single version included by default that can serve as a reference of how it is recommended to add a version to the changelog:

html
<details open>
+import{_ as s,c as a,o as n,N as e}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Changelog","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/changelog.md","lastUpdated":1685337378000}'),l={name:"guide/creating-your-project/changelog.md"},o=e(`

Changelog ​

This is a Vue component stored at /src/data/Changelog.vue used to display all the changes version to version. You can use any features you'd like within here, but it's recommended to simply add new <details> elements for each new major release, and mark the most recent one as open by default. It is strongly advised to not change any of the code relating to making the changelog appear in a modal.

There is a single version included by default that can serve as a reference of how it is recommended to add a version to the changelog:

html
<details open>
 	<summary>v0.0 Initial Commit - <time>2021-09-04</time></summary>
 	This is the first release :D
 	<ul>
diff --git a/assets/guide_creating-your-project_changelog.md.a35dd134.lean.js b/assets/guide_creating-your-project_changelog.md.d8a46ee2.lean.js
similarity index 85%
rename from assets/guide_creating-your-project_changelog.md.a35dd134.lean.js
rename to assets/guide_creating-your-project_changelog.md.d8a46ee2.lean.js
index 3149af03..eedfa308 100644
--- a/assets/guide_creating-your-project_changelog.md.a35dd134.lean.js
+++ b/assets/guide_creating-your-project_changelog.md.d8a46ee2.lean.js
@@ -1 +1 @@
-import{_ as s,c as a,o as n,N as e}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Changelog","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/changelog.md","lastUpdated":1684369374000}'),l={name:"guide/creating-your-project/changelog.md"},o=e("",6),t=[o];function p(c,r,D,i,F,y){return n(),a("div",null,t)}const h=s(l,[["render",p]]);export{g as __pageData,h as default};
+import{_ as s,c as a,o as n,N as e}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Changelog","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/changelog.md","lastUpdated":1685337378000}'),l={name:"guide/creating-your-project/changelog.md"},o=e("",6),t=[o];function p(c,r,D,i,F,y){return n(),a("div",null,t)}const h=s(l,[["render",p]]);export{g as __pageData,h as default};
diff --git a/assets/guide_creating-your-project_project-entry.md.2f833a37.js b/assets/guide_creating-your-project_project-entry.md.58e6fdcf.js
similarity index 98%
rename from assets/guide_creating-your-project_project-entry.md.2f833a37.js
rename to assets/guide_creating-your-project_project-entry.md.58e6fdcf.js
index bc668bab..1f2b9074 100644
--- a/assets/guide_creating-your-project_project-entry.md.2f833a37.js
+++ b/assets/guide_creating-your-project_project-entry.md.58e6fdcf.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Project Entry","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/project-entry.md","lastUpdated":1684369374000}'),s={name:"guide/creating-your-project/project-entry.md"},r=o('

Project Entry ​

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.

Required Exports ​

getInitialLayers ​

  • Type: (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.

hasWon ​

  • Type: 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:

ts
export const hasWon = computed(() => Decimal.gte(resource.value, 10));

fixOldSave ​

  • Type: (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.

',17),n=[r];function l(i,p,c,d,h,y){return t(),a("div",null,n)}const g=e(s,[["render",l]]);export{f as __pageData,g as default}; +import{_ as e,c as a,o as t,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Project Entry","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/project-entry.md","lastUpdated":1685337378000}'),s={name:"guide/creating-your-project/project-entry.md"},r=o('

Project Entry ​

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.

Required Exports ​

getInitialLayers ​

  • Type: (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.

hasWon ​

  • Type: 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:

ts
export const hasWon = computed(() => Decimal.gte(resource.value, 10));

fixOldSave ​

  • Type: (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.

',17),n=[r];function l(i,p,c,d,h,y){return t(),a("div",null,n)}const g=e(s,[["render",l]]);export{f as __pageData,g as default}; diff --git a/assets/guide_creating-your-project_project-entry.md.2f833a37.lean.js b/assets/guide_creating-your-project_project-entry.md.58e6fdcf.lean.js similarity index 85% rename from assets/guide_creating-your-project_project-entry.md.2f833a37.lean.js rename to assets/guide_creating-your-project_project-entry.md.58e6fdcf.lean.js index bea86e66..5879af66 100644 --- a/assets/guide_creating-your-project_project-entry.md.2f833a37.lean.js +++ b/assets/guide_creating-your-project_project-entry.md.58e6fdcf.lean.js @@ -1 +1 @@ -import{_ as e,c as a,o as t,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Project Entry","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/project-entry.md","lastUpdated":1684369374000}'),s={name:"guide/creating-your-project/project-entry.md"},r=o("",17),n=[r];function l(i,p,c,d,h,y){return t(),a("div",null,n)}const g=e(s,[["render",l]]);export{f as __pageData,g as default}; +import{_ as e,c as a,o as t,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Project Entry","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/project-entry.md","lastUpdated":1685337378000}'),s={name:"guide/creating-your-project/project-entry.md"},r=o("",17),n=[r];function l(i,p,c,d,h,y){return t(),a("div",null,n)}const g=e(s,[["render",l]]);export{f as __pageData,g as default}; diff --git a/assets/guide_creating-your-project_project-info.md.09b65ab7.js b/assets/guide_creating-your-project_project-info.md.c56eeb0f.js similarity index 99% rename from assets/guide_creating-your-project_project-info.md.09b65ab7.js rename to assets/guide_creating-your-project_project-info.md.c56eeb0f.js index 672b5053..5daa10f7 100644 --- a/assets/guide_creating-your-project_project-info.md.09b65ab7.js +++ b/assets/guide_creating-your-project_project-info.md.c56eeb0f.js @@ -1 +1 @@ -import{_ as e,c as a,o,N as t}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Project Info","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/project-info.md","lastUpdated":1684369374000}'),i={name:"guide/creating-your-project/project-info.md"},l=t('

Project Info ​

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.

Basic Config ​

title ​

  • Type: string
  • Default: 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.

description ​

  • Type: string
  • Default: A project made in Profectus

A description of the project, which will be used when the project is installed as a Progressive Web Application.

id ​

  • Type: string
  • Default: ""

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.

author ​

  • Type: string
  • Default: ""

The author of the project, which will appear in the info tab.

discordName ​

  • Type: string
  • Default: 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.

  • Type: string
  • Default: https://discord.gg/yJ4fjnjU54

The link for the discord server to point users to. See discordName for more details.

Version Config ​

versionNumber ​

  • Type: string
  • Default: 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.

versionTitle ​

  • Type: string
  • Default: 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.

Display Config ​

allowGoBack ​

  • Type: boolean
  • Default: 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).

defaultShowSmall ​

  • Type: boolean
  • Default: 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.

defaultDecimalsShown ​

  • Type: number
  • Default: 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.

useHeader ​

  • Type: boolean
  • Default: 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.

  • Type: string | null
  • Default: 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.

  • Type: string
  • Default: ""

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.

initialTabs ​

  • Type: string[]
  • Default: ["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.

Advanced Config ​

maxTickLength ​

  • Type: number
  • Default: 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.

offlineLimit ​

  • Type: number
  • Default: 1

The max amount of time that can be stored as offline time, in hours.

enablePausing ​

  • Type: boolean
  • Default: 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).

exportEncoding ​

  • Type: base64 | lz | plain
  • Default: 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.

',66),r=[l];function n(s,d,c,h,u,p){return o(),a("div",null,r)}const m=e(i,[["render",n]]);export{b as __pageData,m as default}; +import{_ as e,c as a,o,N as t}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Project Info","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/project-info.md","lastUpdated":1685337378000}'),i={name:"guide/creating-your-project/project-info.md"},l=t('

Project Info ​

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.

Basic Config ​

title ​

  • Type: string
  • Default: 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.

description ​

  • Type: string
  • Default: A project made in Profectus

A description of the project, which will be used when the project is installed as a Progressive Web Application.

id ​

  • Type: string
  • Default: ""

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.

author ​

  • Type: string
  • Default: ""

The author of the project, which will appear in the info tab.

discordName ​

  • Type: string
  • Default: 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.

  • Type: string
  • Default: https://discord.gg/yJ4fjnjU54

The link for the discord server to point users to. See discordName for more details.

Version Config ​

versionNumber ​

  • Type: string
  • Default: 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.

versionTitle ​

  • Type: string
  • Default: 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.

Display Config ​

allowGoBack ​

  • Type: boolean
  • Default: 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).

defaultShowSmall ​

  • Type: boolean
  • Default: 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.

defaultDecimalsShown ​

  • Type: number
  • Default: 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.

useHeader ​

  • Type: boolean
  • Default: 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.

  • Type: string | null
  • Default: 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.

  • Type: string
  • Default: ""

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.

initialTabs ​

  • Type: string[]
  • Default: ["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.

Advanced Config ​

maxTickLength ​

  • Type: number
  • Default: 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.

offlineLimit ​

  • Type: number
  • Default: 1

The max amount of time that can be stored as offline time, in hours.

enablePausing ​

  • Type: boolean
  • Default: 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).

exportEncoding ​

  • Type: base64 | lz | plain
  • Default: 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.

',66),r=[l];function n(s,d,c,h,u,p){return o(),a("div",null,r)}const m=e(i,[["render",n]]);export{b as __pageData,m as default}; diff --git a/assets/guide_creating-your-project_project-info.md.09b65ab7.lean.js b/assets/guide_creating-your-project_project-info.md.c56eeb0f.lean.js similarity index 85% rename from assets/guide_creating-your-project_project-info.md.09b65ab7.lean.js rename to assets/guide_creating-your-project_project-info.md.c56eeb0f.lean.js index 261d44d6..04dfeff7 100644 --- a/assets/guide_creating-your-project_project-info.md.09b65ab7.lean.js +++ b/assets/guide_creating-your-project_project-info.md.c56eeb0f.lean.js @@ -1 +1 @@ -import{_ as e,c as a,o,N as t}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Project Info","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/project-info.md","lastUpdated":1684369374000}'),i={name:"guide/creating-your-project/project-info.md"},l=t("",66),r=[l];function n(s,d,c,h,u,p){return o(),a("div",null,r)}const m=e(i,[["render",n]]);export{b as __pageData,m as default}; +import{_ as e,c as a,o,N as t}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Project Info","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/project-info.md","lastUpdated":1685337378000}'),i={name:"guide/creating-your-project/project-info.md"},l=t("",66),r=[l];function n(s,d,c,h,u,p){return o(),a("div",null,r)}const m=e(i,[["render",n]]);export{b as __pageData,m as default}; diff --git a/assets/guide_creating-your-project_themes.md.8044ebae.js b/assets/guide_creating-your-project_themes.md.270c3647.js similarity index 97% rename from assets/guide_creating-your-project_themes.md.8044ebae.js rename to assets/guide_creating-your-project_themes.md.270c3647.js index dd75e9dc..41077b31 100644 --- a/assets/guide_creating-your-project_themes.md.8044ebae.js +++ b/assets/guide_creating-your-project_themes.md.270c3647.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Themes","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/themes.md","lastUpdated":1684369374000}'),i={name:"guide/creating-your-project/themes.md"},s=o('

Themes ​

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.

Modifying Themes ​

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.

Theme Options ​

floatingTabs ​

  • Type: 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.

mergeAdjacent ​

  • Type: 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.

',15),n=[s];function r(h,l,d,c,m,p){return a(),t("div",null,n)}const b=e(i,[["render",r]]);export{g as __pageData,b as default}; +import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Themes","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/themes.md","lastUpdated":1685337378000}'),i={name:"guide/creating-your-project/themes.md"},s=o('

Themes ​

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.

Modifying Themes ​

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.

Theme Options ​

floatingTabs ​

  • Type: 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.

mergeAdjacent ​

  • Type: 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.

',15),n=[s];function r(h,l,d,c,m,p){return a(),t("div",null,n)}const b=e(i,[["render",r]]);export{g as __pageData,b as default}; diff --git a/assets/guide_creating-your-project_themes.md.8044ebae.lean.js b/assets/guide_creating-your-project_themes.md.270c3647.lean.js similarity index 84% rename from assets/guide_creating-your-project_themes.md.8044ebae.lean.js rename to assets/guide_creating-your-project_themes.md.270c3647.lean.js index 9d96a50b..c6402f99 100644 --- a/assets/guide_creating-your-project_themes.md.8044ebae.lean.js +++ b/assets/guide_creating-your-project_themes.md.270c3647.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Themes","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/themes.md","lastUpdated":1684369374000}'),i={name:"guide/creating-your-project/themes.md"},s=o("",15),n=[s];function r(h,l,d,c,m,p){return a(),t("div",null,n)}const b=e(i,[["render",r]]);export{g as __pageData,b as default}; +import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Themes","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/themes.md","lastUpdated":1685337378000}'),i={name:"guide/creating-your-project/themes.md"},s=o("",15),n=[s];function r(h,l,d,c,m,p){return a(),t("div",null,n)}const b=e(i,[["render",r]]);export{g as __pageData,b as default}; diff --git a/assets/guide_creating-your-project_utils.md.f2f7a981.js b/assets/guide_creating-your-project_utils.md.4760f329.js similarity index 95% rename from assets/guide_creating-your-project_utils.md.f2f7a981.js rename to assets/guide_creating-your-project_utils.md.4760f329.js index 467ab705..d4bd4ddf 100644 --- a/assets/guide_creating-your-project_utils.md.f2f7a981.js +++ b/assets/guide_creating-your-project_utils.md.4760f329.js @@ -1 +1 @@ -import{_ as a,c as o,o as s,x as e,a as t}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Utilities","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/utils.md","lastUpdated":1684369374000}'),i={name:"guide/creating-your-project/utils.md"},n=e("h1",{id:"utilities",tabindex:"-1"},[t("Utilities "),e("a",{class:"header-anchor",href:"#utilities","aria-label":'Permalink to "Utilities"'},"​")],-1),r=e("p",null,"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.",-1),c=e("p",null,[t("These are perfect situations for utilities, and so to encourage creators to learn to identify and take advantage of these situations, a file called "),e("code",null,"src/data/common.tsx"),t(" 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.")],-1),l=[n,r,c];function d(u,h,p,f,m,_){return s(),o("div",null,l)}const k=a(i,[["render",d]]);export{b as __pageData,k as default}; +import{_ as a,c as o,o as s,x as e,a as t}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Utilities","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/utils.md","lastUpdated":1685337378000}'),i={name:"guide/creating-your-project/utils.md"},n=e("h1",{id:"utilities",tabindex:"-1"},[t("Utilities "),e("a",{class:"header-anchor",href:"#utilities","aria-label":'Permalink to "Utilities"'},"​")],-1),r=e("p",null,"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.",-1),c=e("p",null,[t("These are perfect situations for utilities, and so to encourage creators to learn to identify and take advantage of these situations, a file called "),e("code",null,"src/data/common.tsx"),t(" 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.")],-1),l=[n,r,c];function d(u,h,p,f,m,_){return s(),o("div",null,l)}const k=a(i,[["render",d]]);export{b as __pageData,k as default}; diff --git a/assets/guide_creating-your-project_utils.md.f2f7a981.lean.js b/assets/guide_creating-your-project_utils.md.4760f329.lean.js similarity index 95% rename from assets/guide_creating-your-project_utils.md.f2f7a981.lean.js rename to assets/guide_creating-your-project_utils.md.4760f329.lean.js index 467ab705..d4bd4ddf 100644 --- a/assets/guide_creating-your-project_utils.md.f2f7a981.lean.js +++ b/assets/guide_creating-your-project_utils.md.4760f329.lean.js @@ -1 +1 @@ -import{_ as a,c as o,o as s,x as e,a as t}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Utilities","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/utils.md","lastUpdated":1684369374000}'),i={name:"guide/creating-your-project/utils.md"},n=e("h1",{id:"utilities",tabindex:"-1"},[t("Utilities "),e("a",{class:"header-anchor",href:"#utilities","aria-label":'Permalink to "Utilities"'},"​")],-1),r=e("p",null,"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.",-1),c=e("p",null,[t("These are perfect situations for utilities, and so to encourage creators to learn to identify and take advantage of these situations, a file called "),e("code",null,"src/data/common.tsx"),t(" 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.")],-1),l=[n,r,c];function d(u,h,p,f,m,_){return s(),o("div",null,l)}const k=a(i,[["render",d]]);export{b as __pageData,k as default}; +import{_ as a,c as o,o as s,x as e,a as t}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Utilities","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-your-project/utils.md","lastUpdated":1685337378000}'),i={name:"guide/creating-your-project/utils.md"},n=e("h1",{id:"utilities",tabindex:"-1"},[t("Utilities "),e("a",{class:"header-anchor",href:"#utilities","aria-label":'Permalink to "Utilities"'},"​")],-1),r=e("p",null,"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.",-1),c=e("p",null,[t("These are perfect situations for utilities, and so to encourage creators to learn to identify and take advantage of these situations, a file called "),e("code",null,"src/data/common.tsx"),t(" 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.")],-1),l=[n,r,c];function d(u,h,p,f,m,_){return s(),o("div",null,l)}const k=a(i,[["render",d]]);export{b as __pageData,k as default}; diff --git a/assets/guide_getting-started_examples.md.8f3101eb.js b/assets/guide_getting-started_examples.md.8f3101eb.js new file mode 100644 index 00000000..ff5b9bb7 --- /dev/null +++ b/assets/guide_getting-started_examples.md.8f3101eb.js @@ -0,0 +1 @@ +import{_ as o,c as n,x as e,a as t,C as a,o as s,D as i}from"./chunks/framework.0799945b.js";const O=JSON.parse('{"title":"Example Projects","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/examples.md","lastUpdated":1685337378000}'),l={name:"guide/getting-started/examples.md"},c=e("h1",{id:"example-projects",tabindex:"-1"},[t("Example Projects "),e("a",{class:"header-anchor",href:"#example-projects","aria-label":'Permalink to "Example Projects"'},"​")],-1),h={id:"planar-pioneers",tabindex:"-1"},p=e("a",{class:"header-anchor",href:"#planar-pioneers","aria-label":'Permalink to "Planar Pioneers "'},"​",-1),d=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/planar-pioneers/",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://galaxy.click/play/64",target:"_blank",rel:"noreferrer"},"View Project")],-1),_=e("p",null,"An incremental game with procedurally generated content.",-1),m={id:"this-crazy-idea",tabindex:"-1"},f=e("a",{class:"header-anchor",href:"#this-crazy-idea","aria-label":'Permalink to "this crazy idea "'},"​",-1),u=e("p",null,[e("a",{href:"https://gitlab.com/yhvr/to-be-named",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://galaxy.click/play/94",target:"_blank",rel:"noreferrer"},"View Project")],-1),g=e("p",null,[t('A "hopeless startup simulator", made for the '),e("a",{href:"https://itch.io/jam/profectus-creation-jam",target:"_blank",rel:"noreferrer"},"Profectus Creation Jam")],-1),b={id:"kronos",tabindex:"-1"},P=e("a",{class:"header-anchor",href:"#kronos","aria-label":'Permalink to "Kronos "'},"​",-1),x=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/kronos/",target:"_blank",rel:"noreferrer"},"View Source")],-1),k=e("p",null,"This is a project that's still under development but is a good resource for things like implementing custom features.",-1),y={id:"tmt-demo",tabindex:"-1"},w=e("a",{class:"header-anchor",href:"#tmt-demo","aria-label":'Permalink to "TMT-Demo "'},"​",-1),j=e("p",null,[e("a",{href:"https://github.com/profectus-engine/tmt-demo",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://profectus-engine.github.io/TMT-Demo/",target:"_blank",rel:"noreferrer"},"View Project")],-1),T=e("p",null,"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.",-1),v={id:"advent-incremental",tabindex:"-1"},V=e("a",{class:"header-anchor",href:"#advent-incremental","aria-label":'Permalink to "Advent Incremental "'},"​",-1),B=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/advent-Incremental/",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://www.thepaperpilot.org/advent/",target:"_blank",rel:"noreferrer"},"View Project")],-1),A=e("p",null,[t("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 "),e("a",{href:"https://github.com/thepaperpilot/advent-Incremental/tree/next",target:"_blank",rel:"noreferrer"},"here"),t(".")],-1),S={id:"primordia",tabindex:"-1"},D=e("a",{class:"header-anchor",href:"#primordia","aria-label":'Permalink to "Primordia "'},"​",-1),z=e("p",null,[e("a",{href:"https://github.com/Jacorb90/Primordial-Tree",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://jacorb90.me/Primordial-Tree/",target:"_blank",rel:"noreferrer"},"View Project")],-1),E=e("p",null,'A "The Prestige Tree" style incremental game, developed by the original creator of TPT.',-1);function I(M,N,$,C,J,K){const r=i("Badge");return s(),n("div",null,[c,e("h2",h,[t("Planar Pioneers "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),p]),d,_,e("h2",m,[t("this crazy idea "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),f]),u,g,e("h2",b,[t("Kronos "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),P]),x,k,e("h2",y,[t("TMT-Demo "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),w]),j,T,e("h2",v,[t("Advent Incremental "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),V]),B,A,e("h2",S,[t("Primordia "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),D]),z,E])}const q=o(l,[["render",I]]);export{O as __pageData,q as default}; diff --git a/assets/guide_getting-started_examples.md.8f3101eb.lean.js b/assets/guide_getting-started_examples.md.8f3101eb.lean.js new file mode 100644 index 00000000..ff5b9bb7 --- /dev/null +++ b/assets/guide_getting-started_examples.md.8f3101eb.lean.js @@ -0,0 +1 @@ +import{_ as o,c as n,x as e,a as t,C as a,o as s,D as i}from"./chunks/framework.0799945b.js";const O=JSON.parse('{"title":"Example Projects","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/examples.md","lastUpdated":1685337378000}'),l={name:"guide/getting-started/examples.md"},c=e("h1",{id:"example-projects",tabindex:"-1"},[t("Example Projects "),e("a",{class:"header-anchor",href:"#example-projects","aria-label":'Permalink to "Example Projects"'},"​")],-1),h={id:"planar-pioneers",tabindex:"-1"},p=e("a",{class:"header-anchor",href:"#planar-pioneers","aria-label":'Permalink to "Planar Pioneers "'},"​",-1),d=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/planar-pioneers/",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://galaxy.click/play/64",target:"_blank",rel:"noreferrer"},"View Project")],-1),_=e("p",null,"An incremental game with procedurally generated content.",-1),m={id:"this-crazy-idea",tabindex:"-1"},f=e("a",{class:"header-anchor",href:"#this-crazy-idea","aria-label":'Permalink to "this crazy idea "'},"​",-1),u=e("p",null,[e("a",{href:"https://gitlab.com/yhvr/to-be-named",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://galaxy.click/play/94",target:"_blank",rel:"noreferrer"},"View Project")],-1),g=e("p",null,[t('A "hopeless startup simulator", made for the '),e("a",{href:"https://itch.io/jam/profectus-creation-jam",target:"_blank",rel:"noreferrer"},"Profectus Creation Jam")],-1),b={id:"kronos",tabindex:"-1"},P=e("a",{class:"header-anchor",href:"#kronos","aria-label":'Permalink to "Kronos "'},"​",-1),x=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/kronos/",target:"_blank",rel:"noreferrer"},"View Source")],-1),k=e("p",null,"This is a project that's still under development but is a good resource for things like implementing custom features.",-1),y={id:"tmt-demo",tabindex:"-1"},w=e("a",{class:"header-anchor",href:"#tmt-demo","aria-label":'Permalink to "TMT-Demo "'},"​",-1),j=e("p",null,[e("a",{href:"https://github.com/profectus-engine/tmt-demo",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://profectus-engine.github.io/TMT-Demo/",target:"_blank",rel:"noreferrer"},"View Project")],-1),T=e("p",null,"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.",-1),v={id:"advent-incremental",tabindex:"-1"},V=e("a",{class:"header-anchor",href:"#advent-incremental","aria-label":'Permalink to "Advent Incremental "'},"​",-1),B=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/advent-Incremental/",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://www.thepaperpilot.org/advent/",target:"_blank",rel:"noreferrer"},"View Project")],-1),A=e("p",null,[t("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 "),e("a",{href:"https://github.com/thepaperpilot/advent-Incremental/tree/next",target:"_blank",rel:"noreferrer"},"here"),t(".")],-1),S={id:"primordia",tabindex:"-1"},D=e("a",{class:"header-anchor",href:"#primordia","aria-label":'Permalink to "Primordia "'},"​",-1),z=e("p",null,[e("a",{href:"https://github.com/Jacorb90/Primordial-Tree",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://jacorb90.me/Primordial-Tree/",target:"_blank",rel:"noreferrer"},"View Project")],-1),E=e("p",null,'A "The Prestige Tree" style incremental game, developed by the original creator of TPT.',-1);function I(M,N,$,C,J,K){const r=i("Badge");return s(),n("div",null,[c,e("h2",h,[t("Planar Pioneers "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),p]),d,_,e("h2",m,[t("this crazy idea "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),f]),u,g,e("h2",b,[t("Kronos "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),P]),x,k,e("h2",y,[t("TMT-Demo "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),w]),j,T,e("h2",v,[t("Advent Incremental "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),V]),B,A,e("h2",S,[t("Primordia "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),D]),z,E])}const q=o(l,[["render",I]]);export{O as __pageData,q as default}; diff --git a/assets/guide_getting-started_examples.md.d4b64671.js b/assets/guide_getting-started_examples.md.d4b64671.js deleted file mode 100644 index 2c4a3b6e..00000000 --- a/assets/guide_getting-started_examples.md.d4b64671.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o,c as n,x as e,a as t,C as a,o as s,D as i}from"./chunks/framework.0799945b.js";const J=JSON.parse('{"title":"Example Projects","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/examples.md","lastUpdated":1684369374000}'),l={name:"guide/getting-started/examples.md"},c=e("h1",{id:"example-projects",tabindex:"-1"},[t("Example Projects "),e("a",{class:"header-anchor",href:"#example-projects","aria-label":'Permalink to "Example Projects"'},"​")],-1),p={id:"planar-pioneers",tabindex:"-1"},h=e("a",{class:"header-anchor",href:"#planar-pioneers","aria-label":'Permalink to "Planar Pioneers "'},"​",-1),d=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/planar-pioneers/",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://galaxy.click/play/64",target:"_blank",rel:"noreferrer"},"View Project")],-1),m=e("p",null,"An incremental game with procedurally generated content.",-1),_={id:"kronos",tabindex:"-1"},f=e("a",{class:"header-anchor",href:"#kronos","aria-label":'Permalink to "Kronos "'},"​",-1),g=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/kronos/",target:"_blank",rel:"noreferrer"},"View Source")],-1),u=e("p",null,"This is a project that's still under development, but is a good resource for things like implementing custom features.",-1),b={id:"advent-incremental",tabindex:"-1"},P=e("a",{class:"header-anchor",href:"#advent-incremental","aria-label":'Permalink to "Advent Incremental "'},"​",-1),x=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/advent-Incremental/",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://www.thepaperpilot.org/advent/",target:"_blank",rel:"noreferrer"},"View Project")],-1),k=e("p",null,[t("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 "),e("a",{href:"https://github.com/thepaperpilot/advent-Incremental/tree/next",target:"_blank",rel:"noreferrer"},"here"),t(".")],-1),w={id:"primordia",tabindex:"-1"},y=e("a",{class:"header-anchor",href:"#primordia","aria-label":'Permalink to "Primordia "'},"​",-1),T=e("p",null,[e("a",{href:"https://github.com/Jacorb90/Primordial-Tree",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://jacorb90.me/Primordial-Tree/",target:"_blank",rel:"noreferrer"},"View Project")],-1),j=e("p",null,'A "The Prestige Tree" style incremental game, developed by the original creator of TPT.',-1),v={id:"tmt-demo",tabindex:"-1"},V=e("a",{class:"header-anchor",href:"#tmt-demo","aria-label":'Permalink to "TMT-Demo "'},"​",-1),B=e("p",null,[e("a",{href:"https://github.com/profectus-engine/tmt-demo",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://profectus-engine.github.io/TMT-Demo/",target:"_blank",rel:"noreferrer"},"View Project")],-1),A=e("p",null,"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.",-1);function D(S,E,I,M,N,$){const r=i("Badge");return s(),n("div",null,[c,e("h2",p,[t("Planar Pioneers "),a(r,{type:"warning",text:"Profectus 0.6"}),t(),h]),d,m,e("h2",_,[t("Kronos "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),f]),g,u,e("h2",b,[t("Advent Incremental "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),P]),x,k,e("h2",w,[t("Primordia "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),y]),T,j,e("h2",v,[t("TMT-Demo "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),V]),B,A])}const K=o(l,[["render",D]]);export{J as __pageData,K as default}; diff --git a/assets/guide_getting-started_examples.md.d4b64671.lean.js b/assets/guide_getting-started_examples.md.d4b64671.lean.js deleted file mode 100644 index 2c4a3b6e..00000000 --- a/assets/guide_getting-started_examples.md.d4b64671.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o,c as n,x as e,a as t,C as a,o as s,D as i}from"./chunks/framework.0799945b.js";const J=JSON.parse('{"title":"Example Projects","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/examples.md","lastUpdated":1684369374000}'),l={name:"guide/getting-started/examples.md"},c=e("h1",{id:"example-projects",tabindex:"-1"},[t("Example Projects "),e("a",{class:"header-anchor",href:"#example-projects","aria-label":'Permalink to "Example Projects"'},"​")],-1),p={id:"planar-pioneers",tabindex:"-1"},h=e("a",{class:"header-anchor",href:"#planar-pioneers","aria-label":'Permalink to "Planar Pioneers "'},"​",-1),d=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/planar-pioneers/",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://galaxy.click/play/64",target:"_blank",rel:"noreferrer"},"View Project")],-1),m=e("p",null,"An incremental game with procedurally generated content.",-1),_={id:"kronos",tabindex:"-1"},f=e("a",{class:"header-anchor",href:"#kronos","aria-label":'Permalink to "Kronos "'},"​",-1),g=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/kronos/",target:"_blank",rel:"noreferrer"},"View Source")],-1),u=e("p",null,"This is a project that's still under development, but is a good resource for things like implementing custom features.",-1),b={id:"advent-incremental",tabindex:"-1"},P=e("a",{class:"header-anchor",href:"#advent-incremental","aria-label":'Permalink to "Advent Incremental "'},"​",-1),x=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/advent-Incremental/",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://www.thepaperpilot.org/advent/",target:"_blank",rel:"noreferrer"},"View Project")],-1),k=e("p",null,[t("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 "),e("a",{href:"https://github.com/thepaperpilot/advent-Incremental/tree/next",target:"_blank",rel:"noreferrer"},"here"),t(".")],-1),w={id:"primordia",tabindex:"-1"},y=e("a",{class:"header-anchor",href:"#primordia","aria-label":'Permalink to "Primordia "'},"​",-1),T=e("p",null,[e("a",{href:"https://github.com/Jacorb90/Primordial-Tree",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://jacorb90.me/Primordial-Tree/",target:"_blank",rel:"noreferrer"},"View Project")],-1),j=e("p",null,'A "The Prestige Tree" style incremental game, developed by the original creator of TPT.',-1),v={id:"tmt-demo",tabindex:"-1"},V=e("a",{class:"header-anchor",href:"#tmt-demo","aria-label":'Permalink to "TMT-Demo "'},"​",-1),B=e("p",null,[e("a",{href:"https://github.com/profectus-engine/tmt-demo",target:"_blank",rel:"noreferrer"},"View Source"),t(" | "),e("a",{href:"https://profectus-engine.github.io/TMT-Demo/",target:"_blank",rel:"noreferrer"},"View Project")],-1),A=e("p",null,"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.",-1);function D(S,E,I,M,N,$){const r=i("Badge");return s(),n("div",null,[c,e("h2",p,[t("Planar Pioneers "),a(r,{type:"warning",text:"Profectus 0.6"}),t(),h]),d,m,e("h2",_,[t("Kronos "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),f]),g,u,e("h2",b,[t("Advent Incremental "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),P]),x,k,e("h2",w,[t("Primordia "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),y]),T,j,e("h2",v,[t("TMT-Demo "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),V]),B,A])}const K=o(l,[["render",D]]);export{J as __pageData,K as default}; diff --git a/assets/guide_getting-started_first-layer.md.47c9f9be.js b/assets/guide_getting-started_first-layer.md.eea178cb.js similarity index 99% rename from assets/guide_getting-started_first-layer.md.47c9f9be.js rename to assets/guide_getting-started_first-layer.md.eea178cb.js index 925998e3..c0d09aca 100644 --- a/assets/guide_getting-started_first-layer.md.47c9f9be.js +++ b/assets/guide_getting-started_first-layer.md.eea178cb.js @@ -1,4 +1,4 @@ -import{_ as s,c as a,o as n,N as e}from"./chunks/framework.0799945b.js";const d=JSON.parse('{"title":"Your First Layer","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/first-layer.md","lastUpdated":1684369374000}'),o={name:"guide/getting-started/first-layer.md"},l=e(`

Your First Layer ​

This page is a guide on where to start with creating your very first layer. It is intended for developers who are first learning to use the engine.

Creating the layer ​

INFO

The template comes with a layer in projEntry.tsx and another in prestige.tsx. You can use those as a base instead of creating a new one from scratch.

To add a new layer, first create it via the createLayer function. You typically create a single layer per file, the first being in projEntry. After it is created, you'll need to add it to the returned array in getInitialLayers.

The createLayer function will need a unique ID for your layer and a function that constructs the layer. At a minimum, it needs a display property so Profectus knows what to render. It will look something like this:

ts
const id = "p";
+import{_ as s,c as a,o as n,N as e}from"./chunks/framework.0799945b.js";const d=JSON.parse('{"title":"Your First Layer","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/first-layer.md","lastUpdated":1685337378000}'),o={name:"guide/getting-started/first-layer.md"},l=e(`

Your First Layer ​

This page is a guide on where to start with creating your very first layer. It is intended for developers who are first learning to use the engine.

Creating the layer ​

INFO

The template comes with a layer in projEntry.tsx and another in prestige.tsx. You can use those as a base instead of creating a new one from scratch.

To add a new layer, first create it via the createLayer function. You typically create a single layer per file, the first being in projEntry. After it is created, you'll need to add it to the returned array in getInitialLayers.

The createLayer function will need a unique ID for your layer and a function that constructs the layer. At a minimum, it needs a display property so Profectus knows what to render. It will look something like this:

ts
const id = "p";
 const layer = createLayer(id, function (this: BaseLayer) {
     return {
         display: jsx(() => <>My layer</>)
diff --git a/assets/guide_getting-started_first-layer.md.47c9f9be.lean.js b/assets/guide_getting-started_first-layer.md.eea178cb.lean.js
similarity index 85%
rename from assets/guide_getting-started_first-layer.md.47c9f9be.lean.js
rename to assets/guide_getting-started_first-layer.md.eea178cb.lean.js
index f048cca6..d7d6da7d 100644
--- a/assets/guide_getting-started_first-layer.md.47c9f9be.lean.js
+++ b/assets/guide_getting-started_first-layer.md.eea178cb.lean.js
@@ -1 +1 @@
-import{_ as s,c as a,o as n,N as e}from"./chunks/framework.0799945b.js";const d=JSON.parse('{"title":"Your First Layer","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/first-layer.md","lastUpdated":1684369374000}'),o={name:"guide/getting-started/first-layer.md"},l=e("",32),p=[l];function t(r,c,i,y,D,F){return n(),a("div",null,p)}const C=s(o,[["render",t]]);export{d as __pageData,C as default};
+import{_ as s,c as a,o as n,N as e}from"./chunks/framework.0799945b.js";const d=JSON.parse('{"title":"Your First Layer","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/first-layer.md","lastUpdated":1685337378000}'),o={name:"guide/getting-started/first-layer.md"},l=e("",32),p=[l];function t(r,c,i,y,D,F){return n(),a("div",null,p)}const C=s(o,[["render",t]]);export{d as __pageData,C as default};
diff --git a/assets/guide_getting-started_setup.md.5a7ef6f7.js b/assets/guide_getting-started_setup.md.f1d88449.js
similarity index 99%
rename from assets/guide_getting-started_setup.md.5a7ef6f7.js
rename to assets/guide_getting-started_setup.md.f1d88449.js
index 2e1b4686..cfbac257 100644
--- a/assets/guide_getting-started_setup.md.5a7ef6f7.js
+++ b/assets/guide_getting-started_setup.md.f1d88449.js
@@ -1 +1 @@
-import{_ as e,c as t,o,N as a}from"./chunks/framework.0799945b.js";const r="/assets/workflow-perms.afbb596c.png",i="/assets/actionsbutton.f1ba9d8e.png",n="/assets/gh-pages.a24cefcf.png",y=JSON.parse('{"title":"Setting Up","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/setup.md","lastUpdated":1684369374000}'),s={name:"guide/getting-started/setup.md"},l=a('

Setting Up ​

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.

Local Development ​

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 dev 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.

Deploying ​

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".

workflow 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.

actions button

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.

github pages

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/.

Visual Studio Code Setup ​

If you don't have a preferred IDE, Profectus is developed in Visual Studio Code and is known to work well with it.

Recommendations:

  • Use Take Over Mode for proper type analysis
  • Turn off .value autocomplete by running the Preferences: Open Settings command and setting volar.autoCompleteRefs to false
  • Disable emmet expansions by setting emmet.showExpandedAbbreviation to "never", also in the preferences
  • Install the Vitest VS Code extension for running and debugging unit tests (if working on the engine itself)

Replit ​

As 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:

Run on Repl.it

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 ​

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.

',30),p=[l];function c(u,d,h,m,g,f){return o(),t("div",null,p)}const v=e(s,[["render",c]]);export{y as __pageData,v as default}; +import{_ as e,c as t,o,N as a}from"./chunks/framework.0799945b.js";const r="/assets/workflow-perms.afbb596c.png",i="/assets/actionsbutton.f1ba9d8e.png",n="/assets/gh-pages.a24cefcf.png",y=JSON.parse('{"title":"Setting Up","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/setup.md","lastUpdated":1685337378000}'),s={name:"guide/getting-started/setup.md"},l=a('

Setting Up ​

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.

Local Development ​

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 dev 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.

Deploying ​

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".

workflow 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.

actions button

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.

github pages

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/.

Visual Studio Code Setup ​

If you don't have a preferred IDE, Profectus is developed in Visual Studio Code and is known to work well with it.

Recommendations:

  • Use Take Over Mode for proper type analysis
  • Turn off .value autocomplete by running the Preferences: Open Settings command and setting volar.autoCompleteRefs to false
  • Disable emmet expansions by setting emmet.showExpandedAbbreviation to "never", also in the preferences
  • Install the Vitest VS Code extension for running and debugging unit tests (if working on the engine itself)

Replit ​

As 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:

Run on Repl.it

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 ​

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.

',30),p=[l];function c(u,d,h,m,g,f){return o(),t("div",null,p)}const v=e(s,[["render",c]]);export{y as __pageData,v as default}; diff --git a/assets/guide_getting-started_setup.md.5a7ef6f7.lean.js b/assets/guide_getting-started_setup.md.f1d88449.lean.js similarity index 87% rename from assets/guide_getting-started_setup.md.5a7ef6f7.lean.js rename to assets/guide_getting-started_setup.md.f1d88449.lean.js index 96c62096..60727fba 100644 --- a/assets/guide_getting-started_setup.md.5a7ef6f7.lean.js +++ b/assets/guide_getting-started_setup.md.f1d88449.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o,N as a}from"./chunks/framework.0799945b.js";const r="/assets/workflow-perms.afbb596c.png",i="/assets/actionsbutton.f1ba9d8e.png",n="/assets/gh-pages.a24cefcf.png",y=JSON.parse('{"title":"Setting Up","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/setup.md","lastUpdated":1684369374000}'),s={name:"guide/getting-started/setup.md"},l=a("",30),p=[l];function c(u,d,h,m,g,f){return o(),t("div",null,p)}const v=e(s,[["render",c]]);export{y as __pageData,v as default}; +import{_ as e,c as t,o,N as a}from"./chunks/framework.0799945b.js";const r="/assets/workflow-perms.afbb596c.png",i="/assets/actionsbutton.f1ba9d8e.png",n="/assets/gh-pages.a24cefcf.png",y=JSON.parse('{"title":"Setting Up","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/setup.md","lastUpdated":1685337378000}'),s={name:"guide/getting-started/setup.md"},l=a("",30),p=[l];function c(u,d,h,m,g,f){return o(),t("div",null,p)}const v=e(s,[["render",c]]);export{y as __pageData,v as default}; diff --git a/assets/guide_getting-started_updating.md.f471842e.js b/assets/guide_getting-started_updating.md.ec3df0e8.js similarity index 98% rename from assets/guide_getting-started_updating.md.f471842e.js rename to assets/guide_getting-started_updating.md.ec3df0e8.js index 4e40cf0d..b7ce3150 100644 --- a/assets/guide_getting-started_updating.md.f471842e.js +++ b/assets/guide_getting-started_updating.md.ec3df0e8.js @@ -1,3 +1,3 @@ -import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Updating Profectus","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/updating.md","lastUpdated":1684369374000}'),s={name:"guide/getting-started/updating.md"},n=o(`

Updating Profectus ​

Github ​

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:

bash
git remote add template https://github.com/profectus-engine/Profectus
+import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Updating Profectus","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/updating.md","lastUpdated":1685337378000}'),s={name:"guide/getting-started/updating.md"},n=o(`

Updating Profectus ​

Github ​

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:

bash
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.

Replit ​

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.

Glitch ​

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.

`,9),r=[n];function l(i,c,p,d,h,u){return a(),t("div",null,r)}const m=e(s,[["render",l]]);export{g as __pageData,m as default}; diff --git a/assets/guide_getting-started_updating.md.f471842e.lean.js b/assets/guide_getting-started_updating.md.ec3df0e8.lean.js similarity index 85% rename from assets/guide_getting-started_updating.md.f471842e.lean.js rename to assets/guide_getting-started_updating.md.ec3df0e8.lean.js index a4bcc23a..5b0785f6 100644 --- a/assets/guide_getting-started_updating.md.f471842e.lean.js +++ b/assets/guide_getting-started_updating.md.ec3df0e8.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Updating Profectus","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/updating.md","lastUpdated":1684369374000}'),s={name:"guide/getting-started/updating.md"},n=o("",9),r=[n];function l(i,c,p,d,h,u){return a(),t("div",null,r)}const m=e(s,[["render",l]]);export{g as __pageData,m as default}; +import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Updating Profectus","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/updating.md","lastUpdated":1685337378000}'),s={name:"guide/getting-started/updating.md"},n=o("",9),r=[n];function l(i,c,p,d,h,u){return a(),t("div",null,r)}const m=e(s,[["render",l]]);export{g as __pageData,m as default}; diff --git a/assets/guide_important-concepts_coercable.md.5e75d4e3.js b/assets/guide_important-concepts_coercable.md.4ac1576c.js similarity index 99% rename from assets/guide_important-concepts_coercable.md.5e75d4e3.js rename to assets/guide_important-concepts_coercable.md.4ac1576c.js index 7b46b946..b820cc28 100644 --- a/assets/guide_important-concepts_coercable.md.5e75d4e3.js +++ b/assets/guide_important-concepts_coercable.md.4ac1576c.js @@ -1,4 +1,4 @@ -import{_ as s,c as a,o as n,N as o}from"./chunks/framework.0799945b.js";const u=JSON.parse('{"title":"Coercable Components","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/coercable.md","lastUpdated":1684369374000}'),e={name:"guide/important-concepts/coercable.md"},l=o(`

Coercable Components ​

Most times a feature has some sort of dynamic display, it'll allow you to pass a "Coercable Component", or rather, something that can be coerced into a Vue component. This page goes over the different types of values you can use

Template Strings ​

If you provide a string, it will be wrapped in a component using it as the template. This is the simplest method, although not suitable for complex displays, and realistically cannot use Vue components as none are registered globally (by default). Recommended for static or simple dynamic displays, such as displays on features.

Template strings need to be wrapped in some HTML element. By default, they'll be wrapped in a <span> element, although certain features may wrap things in div or header elements instead, as appropriate.

Render Functions (JSX) ​

You can provide a render function and it will be wrapped in a component as well. The intended use for this is to write JSX inside a function, which will get automatically converted into a render function. You can read more about that process on the Vue docs on Render Functions & JSX. Note that JSX must be returned in a function - it does not work "standalone". The CoercableComponent type will enforce this for you. Also of note is that you can use <> and </> as wrappers to render multiple elements without a containing element, however keep in mind an empty JSX element such as jsx(() => <></>) is invalid and will fail to render.

JSX can use imported components, making this suited for writing the display properties on things like Tabs or Layers. There are also built-in functions to render features (either as their own or in a layout via renderRow and renderCol), so you don't need to import the Vue component for every feature you plan on using.

Typically a feature will accept a Computable<CoercableComponent>, which means functions would (normally) be wrapped in a computed (see Computable for more details). This would break render functions, so when passing a render function as a CoercableComponent it must be specially marked that it shouldn't be cached. You can use the built-in jsx function to mark a function for you.

Example ​

tsx
{
+import{_ as s,c as a,o as n,N as o}from"./chunks/framework.0799945b.js";const u=JSON.parse('{"title":"Coercable Components","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/coercable.md","lastUpdated":1685337378000}'),e={name:"guide/important-concepts/coercable.md"},l=o(`

Coercable Components ​

Most times a feature has some sort of dynamic display, it'll allow you to pass a "Coercable Component", or rather, something that can be coerced into a Vue component. This page goes over the different types of values you can use

Template Strings ​

If you provide a string, it will be wrapped in a component using it as the template. This is the simplest method, although not suitable for complex displays, and realistically cannot use Vue components as none are registered globally (by default). Recommended for static or simple dynamic displays, such as displays on features.

Template strings need to be wrapped in some HTML element. By default, they'll be wrapped in a <span> element, although certain features may wrap things in div or header elements instead, as appropriate.

Render Functions (JSX) ​

You can provide a render function and it will be wrapped in a component as well. The intended use for this is to write JSX inside a function, which will get automatically converted into a render function. You can read more about that process on the Vue docs on Render Functions & JSX. Note that JSX must be returned in a function - it does not work "standalone". The CoercableComponent type will enforce this for you. Also of note is that you can use <> and </> as wrappers to render multiple elements without a containing element, however keep in mind an empty JSX element such as jsx(() => <></>) is invalid and will fail to render.

JSX can use imported components, making this suited for writing the display properties on things like Tabs or Layers. There are also built-in functions to render features (either as their own or in a layout via renderRow and renderCol), so you don't need to import the Vue component for every feature you plan on using.

Typically a feature will accept a Computable<CoercableComponent>, which means functions would (normally) be wrapped in a computed (see Computable for more details). This would break render functions, so when passing a render function as a CoercableComponent it must be specially marked that it shouldn't be cached. You can use the built-in jsx function to mark a function for you.

Example ​

tsx
{
 	display: jsx(() => (
         <>
             <MainDisplay resource={points} color={color} />
diff --git a/assets/guide_important-concepts_coercable.md.5e75d4e3.lean.js b/assets/guide_important-concepts_coercable.md.4ac1576c.lean.js
similarity index 85%
rename from assets/guide_important-concepts_coercable.md.5e75d4e3.lean.js
rename to assets/guide_important-concepts_coercable.md.4ac1576c.lean.js
index 4000dd00..ae5f00a2 100644
--- a/assets/guide_important-concepts_coercable.md.5e75d4e3.lean.js
+++ b/assets/guide_important-concepts_coercable.md.4ac1576c.lean.js
@@ -1 +1 @@
-import{_ as s,c as a,o as n,N as o}from"./chunks/framework.0799945b.js";const u=JSON.parse('{"title":"Coercable Components","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/coercable.md","lastUpdated":1684369374000}'),e={name:"guide/important-concepts/coercable.md"},l=o("",17),t=[l];function p(r,c,i,y,F,d){return n(),a("div",null,t)}const C=s(e,[["render",p]]);export{u as __pageData,C as default};
+import{_ as s,c as a,o as n,N as o}from"./chunks/framework.0799945b.js";const u=JSON.parse('{"title":"Coercable Components","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/coercable.md","lastUpdated":1685337378000}'),e={name:"guide/important-concepts/coercable.md"},l=o("",17),t=[l];function p(r,c,i,y,F,d){return n(),a("div",null,t)}const C=s(e,[["render",p]]);export{u as __pageData,C as default};
diff --git a/assets/guide_important-concepts_features.md.40c1a025.js b/assets/guide_important-concepts_features.md.b922ebcf.js
similarity index 99%
rename from assets/guide_important-concepts_features.md.40c1a025.js
rename to assets/guide_important-concepts_features.md.b922ebcf.js
index 6289db94..1d692417 100644
--- a/assets/guide_important-concepts_features.md.40c1a025.js
+++ b/assets/guide_important-concepts_features.md.b922ebcf.js
@@ -1,4 +1,4 @@
-import{_ as e,c as s,o as a,N as n}from"./chunks/framework.0799945b.js";const D=JSON.parse('{"title":"Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/features.md","lastUpdated":1684369374000}'),t={name:"guide/important-concepts/features.md"},o=n(`

Features ​

A layer is made up of features. There are many types of features included in Profectus, and more can be created once you become familiar with the engine.

To create a feature, the feature type will have one or more functions to help you. They'll typically look something like this:

ts
const addGainUpgrade = createUpgrade(() => ({
+import{_ as e,c as s,o as a,N as n}from"./chunks/framework.0799945b.js";const D=JSON.parse('{"title":"Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/features.md","lastUpdated":1685337378000}'),t={name:"guide/important-concepts/features.md"},o=n(`

Features ​

A layer is made up of features. There are many types of features included in Profectus, and more can be created once you become familiar with the engine.

To create a feature, the feature type will have one or more functions to help you. They'll typically look something like this:

ts
const addGainUpgrade = createUpgrade(() => ({
     display: {
         title: "Generator of Genericness",
         description: "Gain 1 point every second"
diff --git a/assets/guide_important-concepts_features.md.40c1a025.lean.js b/assets/guide_important-concepts_features.md.b922ebcf.lean.js
similarity index 84%
rename from assets/guide_important-concepts_features.md.40c1a025.lean.js
rename to assets/guide_important-concepts_features.md.b922ebcf.lean.js
index a228dea8..bafa31b7 100644
--- a/assets/guide_important-concepts_features.md.40c1a025.lean.js
+++ b/assets/guide_important-concepts_features.md.b922ebcf.lean.js
@@ -1 +1 @@
-import{_ as e,c as s,o as a,N as n}from"./chunks/framework.0799945b.js";const D=JSON.parse('{"title":"Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/features.md","lastUpdated":1684369374000}'),t={name:"guide/important-concepts/features.md"},o=n("",12),l=[o];function p(r,c,i,y,d,u){return a(),s("div",null,l)}const C=e(t,[["render",p]]);export{D as __pageData,C as default};
+import{_ as e,c as s,o as a,N as n}from"./chunks/framework.0799945b.js";const D=JSON.parse('{"title":"Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/features.md","lastUpdated":1685337378000}'),t={name:"guide/important-concepts/features.md"},o=n("",12),l=[o];function p(r,c,i,y,d,u){return a(),s("div",null,l)}const C=e(t,[["render",p]]);export{D as __pageData,C as default};
diff --git a/assets/guide_important-concepts_formulas.md.63fd87c6.js b/assets/guide_important-concepts_formulas.md.63bf13f7.js
similarity index 99%
rename from assets/guide_important-concepts_formulas.md.63fd87c6.js
rename to assets/guide_important-concepts_formulas.md.63bf13f7.js
index 29a4fab6..aff80304 100644
--- a/assets/guide_important-concepts_formulas.md.63fd87c6.js
+++ b/assets/guide_important-concepts_formulas.md.63bf13f7.js
@@ -1,4 +1,4 @@
-import{_ as e,c as a,o as s,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Formulas","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/formulas.md","lastUpdated":1684369374000}'),t={name:"guide/important-concepts/formulas.md"},n=o(`

Formulas ​

Profectus utilizes formulas for various features, such as increasing requirements for repeatables and challenges or determining resource gains in conversions. These formulas often need to be inverted or integrated to enable features like buying multiple levels of a repeatable at once or determining when a conversion will increase resource gains. The Formula class can handle these operations, supporting every function Decimal does, while tracking the operations internally.

For example, a cost function like Decimal.pow(this.amount, 1.05).times(100) can be represented using a Formula: Formula.variable(this.amount).pow(1.05).times(100).

ts
const myRepeatable = createRepeatable(() => ({
+import{_ as e,c as a,o as s,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Formulas","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/formulas.md","lastUpdated":1685337378000}'),t={name:"guide/important-concepts/formulas.md"},n=o(`

Formulas ​

Profectus utilizes formulas for various features, such as increasing requirements for repeatables and challenges or determining resource gains in conversions. These formulas often need to be inverted or integrated to enable features like buying multiple levels of a repeatable at once or determining when a conversion will increase resource gains. The Formula class can handle these operations, supporting every function Decimal does, while tracking the operations internally.

For example, a cost function like Decimal.pow(this.amount, 1.05).times(100) can be represented using a Formula: Formula.variable(this.amount).pow(1.05).times(100).

ts
const myRepeatable = createRepeatable(() => ({
     requirements: createCostRequirement(() => ({
         resource: points,
         cost: Formula.variable(myRepeatable.amount).pow_base(1.05).times(100)
diff --git a/assets/guide_important-concepts_formulas.md.63fd87c6.lean.js b/assets/guide_important-concepts_formulas.md.63bf13f7.lean.js
similarity index 84%
rename from assets/guide_important-concepts_formulas.md.63fd87c6.lean.js
rename to assets/guide_important-concepts_formulas.md.63bf13f7.lean.js
index ad70b89b..27d78b1a 100644
--- a/assets/guide_important-concepts_formulas.md.63fd87c6.lean.js
+++ b/assets/guide_important-concepts_formulas.md.63bf13f7.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as s,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Formulas","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/formulas.md","lastUpdated":1684369374000}'),t={name:"guide/important-concepts/formulas.md"},n=o("",22),r=[n];function l(i,p,c,u,h,d){return s(),a("div",null,r)}const y=e(t,[["render",l]]);export{f as __pageData,y as default};
+import{_ as e,c as a,o as s,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Formulas","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/formulas.md","lastUpdated":1685337378000}'),t={name:"guide/important-concepts/formulas.md"},n=o("",22),r=[n];function l(i,p,c,u,h,d){return s(),a("div",null,r)}const y=e(t,[["render",l]]);export{f as __pageData,y as default};
diff --git a/assets/guide_important-concepts_layers.md.5afe5c4c.js b/assets/guide_important-concepts_layers.md.ca5bd4ed.js
similarity index 96%
rename from assets/guide_important-concepts_layers.md.5afe5c4c.js
rename to assets/guide_important-concepts_layers.md.ca5bd4ed.js
index eefcd443..25df436f 100644
--- a/assets/guide_important-concepts_layers.md.5afe5c4c.js
+++ b/assets/guide_important-concepts_layers.md.ca5bd4ed.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as r}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Layers","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/layers.md","lastUpdated":1684369374000}'),o={name:"guide/important-concepts/layers.md"},s=r('

Layers ​

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.

Lazy Proxies ​

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.

',6),i=[s];function n(c,l,d,h,y,p){return t(),a("div",null,i)}const _=e(o,[["render",n]]);export{f as __pageData,_ as default}; +import{_ as e,c as a,o as t,N as r}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Layers","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/layers.md","lastUpdated":1685337378000}'),o={name:"guide/important-concepts/layers.md"},s=r('

Layers ​

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.

Lazy Proxies ​

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.

',6),i=[s];function n(c,l,d,h,y,p){return t(),a("div",null,i)}const _=e(o,[["render",n]]);export{f as __pageData,_ as default}; diff --git a/assets/guide_important-concepts_layers.md.5afe5c4c.lean.js b/assets/guide_important-concepts_layers.md.ca5bd4ed.lean.js similarity index 84% rename from assets/guide_important-concepts_layers.md.5afe5c4c.lean.js rename to assets/guide_important-concepts_layers.md.ca5bd4ed.lean.js index 8c82f528..e163e0a1 100644 --- a/assets/guide_important-concepts_layers.md.5afe5c4c.lean.js +++ b/assets/guide_important-concepts_layers.md.ca5bd4ed.lean.js @@ -1 +1 @@ -import{_ as e,c as a,o as t,N as r}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Layers","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/layers.md","lastUpdated":1684369374000}'),o={name:"guide/important-concepts/layers.md"},s=r("",6),i=[s];function n(c,l,d,h,y,p){return t(),a("div",null,i)}const _=e(o,[["render",n]]);export{f as __pageData,_ as default}; +import{_ as e,c as a,o as t,N as r}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Layers","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/layers.md","lastUpdated":1685337378000}'),o={name:"guide/important-concepts/layers.md"},s=r("",6),i=[s];function n(c,l,d,h,y,p){return t(),a("div",null,i)}const _=e(o,[["render",n]]);export{f as __pageData,_ as default}; diff --git a/assets/guide_important-concepts_persistence.md.ff5308f4.js b/assets/guide_important-concepts_persistence.md.8c085a8c.js similarity index 98% rename from assets/guide_important-concepts_persistence.md.ff5308f4.js rename to assets/guide_important-concepts_persistence.md.8c085a8c.js index 897e2635..e47bdebd 100644 --- a/assets/guide_important-concepts_persistence.md.ff5308f4.js +++ b/assets/guide_important-concepts_persistence.md.8c085a8c.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,N as s}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Persistence","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/persistence.md","lastUpdated":1684369374000}'),r={name:"guide/important-concepts/persistence.md"},n=s('

Persistence ​

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.

',7),i=[n];function o(c,l,h,d,p,u){return a(),t("div",null,i)}const w=e(r,[["render",o]]);export{m as __pageData,w as default}; +import{_ as e,c as t,o as a,N as s}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Persistence","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/persistence.md","lastUpdated":1685337378000}'),r={name:"guide/important-concepts/persistence.md"},n=s('

Persistence ​

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.

',7),i=[n];function o(c,l,h,d,p,u){return a(),t("div",null,i)}const w=e(r,[["render",o]]);export{m as __pageData,w as default}; diff --git a/assets/guide_important-concepts_persistence.md.ff5308f4.lean.js b/assets/guide_important-concepts_persistence.md.8c085a8c.lean.js similarity index 85% rename from assets/guide_important-concepts_persistence.md.ff5308f4.lean.js rename to assets/guide_important-concepts_persistence.md.8c085a8c.lean.js index e768680a..3c3954de 100644 --- a/assets/guide_important-concepts_persistence.md.ff5308f4.lean.js +++ b/assets/guide_important-concepts_persistence.md.8c085a8c.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,N as s}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Persistence","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/persistence.md","lastUpdated":1684369374000}'),r={name:"guide/important-concepts/persistence.md"},n=s("",7),i=[n];function o(c,l,h,d,p,u){return a(),t("div",null,i)}const w=e(r,[["render",o]]);export{m as __pageData,w as default}; +import{_ as e,c as t,o as a,N as s}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Persistence","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/persistence.md","lastUpdated":1685337378000}'),r={name:"guide/important-concepts/persistence.md"},n=s("",7),i=[n];function o(c,l,h,d,p,u){return a(),t("div",null,i)}const w=e(r,[["render",o]]);export{m as __pageData,w as default}; diff --git a/assets/guide_important-concepts_reactivity.md.612c3628.js b/assets/guide_important-concepts_reactivity.md.6a2d1084.js similarity index 97% rename from assets/guide_important-concepts_reactivity.md.612c3628.js rename to assets/guide_important-concepts_reactivity.md.6a2d1084.js index 36654320..2bf2018b 100644 --- a/assets/guide_important-concepts_reactivity.md.612c3628.js +++ b/assets/guide_important-concepts_reactivity.md.6a2d1084.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Reactivity","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/reactivity.md","lastUpdated":1684369374000}'),r={name:"guide/important-concepts/reactivity.md"},s=o('

Reactivity ​

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.

Computable ​

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.

',7),i=[s];function n(c,u,d,l,p,h){return a(),t("div",null,i)}const y=e(r,[["render",n]]);export{f as __pageData,y as default}; +import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Reactivity","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/reactivity.md","lastUpdated":1685337378000}'),r={name:"guide/important-concepts/reactivity.md"},s=o('

Reactivity ​

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.

Computable ​

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.

',7),i=[s];function n(c,u,d,l,p,h){return a(),t("div",null,i)}const y=e(r,[["render",n]]);export{f as __pageData,y as default}; diff --git a/assets/guide_important-concepts_reactivity.md.612c3628.lean.js b/assets/guide_important-concepts_reactivity.md.6a2d1084.lean.js similarity index 85% rename from assets/guide_important-concepts_reactivity.md.612c3628.lean.js rename to assets/guide_important-concepts_reactivity.md.6a2d1084.lean.js index b9a6f7be..5f91b279 100644 --- a/assets/guide_important-concepts_reactivity.md.612c3628.lean.js +++ b/assets/guide_important-concepts_reactivity.md.6a2d1084.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Reactivity","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/reactivity.md","lastUpdated":1684369374000}'),r={name:"guide/important-concepts/reactivity.md"},s=o("",7),i=[s];function n(c,u,d,l,p,h){return a(),t("div",null,i)}const y=e(r,[["render",n]]);export{f as __pageData,y as default}; +import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Reactivity","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/reactivity.md","lastUpdated":1685337378000}'),r={name:"guide/important-concepts/reactivity.md"},s=o("",7),i=[s];function n(c,u,d,l,p,h){return a(),t("div",null,i)}const y=e(r,[["render",n]]);export{f as __pageData,y as default}; diff --git a/assets/guide_important-concepts_requirements.md.f50ff6cc.js b/assets/guide_important-concepts_requirements.md.9e8fd070.js similarity index 99% rename from assets/guide_important-concepts_requirements.md.f50ff6cc.js rename to assets/guide_important-concepts_requirements.md.9e8fd070.js index 96751b11..4f06702f 100644 --- a/assets/guide_important-concepts_requirements.md.f50ff6cc.js +++ b/assets/guide_important-concepts_requirements.md.9e8fd070.js @@ -1,4 +1,4 @@ -import{_ as e,c as s,o as t,N as a}from"./chunks/framework.0799945b.js";const y=JSON.parse('{"title":"Requirements","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/requirements.md","lastUpdated":1684369374000}'),n={name:"guide/important-concepts/requirements.md"},r=a(`

Requirements ​

The requirements system in Profectus is designed to handle various conditions that must be met before certain actions or features can be accessed by the player. These conditions can include resource amounts, completed challenges, or other milestones within the game.

Creating Requirements ​

To create a requirement, you can use one of the provided utility functions like createCostRequirement, createVisibilityRequirement, or createBooleanRequirement. These functions return a Requirement object with specific properties that define the requirement conditions.

Cost requirements are probably the most common requirement you'll be using. For something with multiple levels, like repeatables, you'll typically want to use a formula for the cost instead of a function, and the input to the formula will be the repeatable's amount property. Typically that means the code will look like this:

ts
createRepeatable(repeatable => ({
+import{_ as e,c as s,o as t,N as a}from"./chunks/framework.0799945b.js";const y=JSON.parse('{"title":"Requirements","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/requirements.md","lastUpdated":1685337378000}'),n={name:"guide/important-concepts/requirements.md"},r=a(`

Requirements ​

The requirements system in Profectus is designed to handle various conditions that must be met before certain actions or features can be accessed by the player. These conditions can include resource amounts, completed challenges, or other milestones within the game.

Creating Requirements ​

To create a requirement, you can use one of the provided utility functions like createCostRequirement, createVisibilityRequirement, or createBooleanRequirement. These functions return a Requirement object with specific properties that define the requirement conditions.

Cost requirements are probably the most common requirement you'll be using. For something with multiple levels, like repeatables, you'll typically want to use a formula for the cost instead of a function, and the input to the formula will be the repeatable's amount property. Typically that means the code will look like this:

ts
createRepeatable(repeatable => ({
   requirements: createCostRequirement(() => ({
     resource: points,
     cost: Formula.variable(repeatable.amount).add(1).times(100)
diff --git a/assets/guide_important-concepts_requirements.md.f50ff6cc.lean.js b/assets/guide_important-concepts_requirements.md.9e8fd070.lean.js
similarity index 85%
rename from assets/guide_important-concepts_requirements.md.f50ff6cc.lean.js
rename to assets/guide_important-concepts_requirements.md.9e8fd070.lean.js
index 0fc16fd9..d1862376 100644
--- a/assets/guide_important-concepts_requirements.md.f50ff6cc.lean.js
+++ b/assets/guide_important-concepts_requirements.md.9e8fd070.lean.js
@@ -1 +1 @@
-import{_ as e,c as s,o as t,N as a}from"./chunks/framework.0799945b.js";const y=JSON.parse('{"title":"Requirements","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/requirements.md","lastUpdated":1684369374000}'),n={name:"guide/important-concepts/requirements.md"},r=a("",14),o=[r];function i(l,p,c,u,m,h){return t(),s("div",null,o)}const q=e(n,[["render",i]]);export{y as __pageData,q as default};
+import{_ as e,c as s,o as t,N as a}from"./chunks/framework.0799945b.js";const y=JSON.parse('{"title":"Requirements","description":"","frontmatter":{},"headers":[],"relativePath":"guide/important-concepts/requirements.md","lastUpdated":1685337378000}'),n={name:"guide/important-concepts/requirements.md"},r=a("",14),o=[r];function i(l,p,c,u,m,h){return t(),s("div",null,o)}const q=e(n,[["render",i]]);export{y as __pageData,q as default};
diff --git a/assets/guide_index.md.585bfdde.js b/assets/guide_index.md.a9606b78.js
similarity index 98%
rename from assets/guide_index.md.585bfdde.js
rename to assets/guide_index.md.a9606b78.js
index fa3e94f0..0c638277 100644
--- a/assets/guide_index.md.585bfdde.js
+++ b/assets/guide_index.md.a9606b78.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[],"relativePath":"guide/index.md","lastUpdated":1684369374000}'),n={name:"guide/index.md"},r=o('

Introduction ​

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.

Should you use Profectus? ​

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.

Alternative Engines ​

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.

Design Philosophies ​

While absolute purity is impossible, design decisions have been and will continue to be made using these principles in mind.

  • An engine should be intuitive, and code readable without context
  • An engine should not constrain a creator
  • An engine should be consistent
  • An engine should be extensible, and those extensions sharable
  • An engine should be efficient
  • An engine should report issues early and thoroughly
  • Passing by reference is one honking great idea -- let's do more of that!
',14),i=[r];function s(l,u,h,d,p,c){return a(),t("div",null,i)}const f=e(n,[["render",s]]);export{m as __pageData,f as default}; +import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[],"relativePath":"guide/index.md","lastUpdated":1685337378000}'),n={name:"guide/index.md"},r=o('

Introduction ​

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.

Should you use Profectus? ​

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.

Alternative Engines ​

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.

Design Philosophies ​

While absolute purity is impossible, design decisions have been and will continue to be made using these principles in mind.

  • An engine should be intuitive, and code readable without context
  • An engine should not constrain a creator
  • An engine should be consistent
  • An engine should be extensible, and those extensions sharable
  • An engine should be efficient
  • An engine should report issues early and thoroughly
  • Passing by reference is one honking great idea -- let's do more of that!
',14),i=[r];function s(l,u,h,d,p,c){return a(),t("div",null,i)}const f=e(n,[["render",s]]);export{m as __pageData,f as default}; diff --git a/assets/guide_index.md.585bfdde.lean.js b/assets/guide_index.md.a9606b78.lean.js similarity index 84% rename from assets/guide_index.md.585bfdde.lean.js rename to assets/guide_index.md.a9606b78.lean.js index 812f6e3f..8db2b26f 100644 --- a/assets/guide_index.md.585bfdde.lean.js +++ b/assets/guide_index.md.a9606b78.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[],"relativePath":"guide/index.md","lastUpdated":1684369374000}'),n={name:"guide/index.md"},r=o("",14),i=[r];function s(l,u,h,d,p,c){return a(),t("div",null,i)}const f=e(n,[["render",s]]);export{m as __pageData,f as default}; +import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[],"relativePath":"guide/index.md","lastUpdated":1685337378000}'),n={name:"guide/index.md"},r=o("",14),i=[r];function s(l,u,h,d,p,c){return a(),t("div",null,i)}const f=e(n,[["render",s]]);export{m as __pageData,f as default}; diff --git a/assets/guide_migrations_0-6.md.c2d3eaf8.js b/assets/guide_migrations_0-6.md.575646c4.js similarity index 99% rename from assets/guide_migrations_0-6.md.c2d3eaf8.js rename to assets/guide_migrations_0-6.md.575646c4.js index aff0d081..689cbb44 100644 --- a/assets/guide_migrations_0-6.md.c2d3eaf8.js +++ b/assets/guide_migrations_0-6.md.575646c4.js @@ -1,4 +1,4 @@ -import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const o="/assets/persistence-error.537e237b.png",u=JSON.parse('{"title":"Migrating to Profectus 0.6","description":"","frontmatter":{},"headers":[],"relativePath":"guide/migrations/0-6.md","lastUpdated":1684369374000}'),t={name:"guide/migrations/0-6.md"},l=n(`

Migrating to Profectus 0.6 ​

Alongside the standard steps for Updating Profectus, this update contains numerous large or breaking changes. This guide will cover additional steps to follow after updating Profectus.

Fixing save data ​

This update introduces a major change in save data collection and storage. The change reduces save data size and fixes issues that can cause persistent values to reset to default values. Unfortunately, developers will need to mark which persistent value uses should be included in the save data and which are merely references. Let's go through an example:

ts
const flowers = createResource<DecimalSource>(0, "moly");
+import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const o="/assets/persistence-error.537e237b.png",u=JSON.parse('{"title":"Migrating to Profectus 0.6","description":"","frontmatter":{},"headers":[],"relativePath":"guide/migrations/0-6.md","lastUpdated":1685337378000}'),t={name:"guide/migrations/0-6.md"},l=n(`

Migrating to Profectus 0.6 ​

Alongside the standard steps for Updating Profectus, this update contains numerous large or breaking changes. This guide will cover additional steps to follow after updating Profectus.

Fixing save data ​

This update introduces a major change in save data collection and storage. The change reduces save data size and fixes issues that can cause persistent values to reset to default values. Unfortunately, developers will need to mark which persistent value uses should be included in the save data and which are merely references. Let's go through an example:

ts
const flowers = createResource<DecimalSource>(0, "moly");
 const job = createJob(name, () => ({
 	/** snip **/
     resource: flowers
diff --git a/assets/guide_migrations_0-6.md.c2d3eaf8.lean.js b/assets/guide_migrations_0-6.md.575646c4.lean.js
similarity index 86%
rename from assets/guide_migrations_0-6.md.c2d3eaf8.lean.js
rename to assets/guide_migrations_0-6.md.575646c4.lean.js
index 2aaa57a3..c6cd2695 100644
--- a/assets/guide_migrations_0-6.md.c2d3eaf8.lean.js
+++ b/assets/guide_migrations_0-6.md.575646c4.lean.js
@@ -1 +1 @@
-import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const o="/assets/persistence-error.537e237b.png",u=JSON.parse('{"title":"Migrating to Profectus 0.6","description":"","frontmatter":{},"headers":[],"relativePath":"guide/migrations/0-6.md","lastUpdated":1684369374000}'),t={name:"guide/migrations/0-6.md"},l=n("",52),p=[l];function r(c,i,y,D,d,A){return a(),e("div",null,p)}const F=s(t,[["render",r]]);export{u as __pageData,F as default};
+import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const o="/assets/persistence-error.537e237b.png",u=JSON.parse('{"title":"Migrating to Profectus 0.6","description":"","frontmatter":{},"headers":[],"relativePath":"guide/migrations/0-6.md","lastUpdated":1685337378000}'),t={name:"guide/migrations/0-6.md"},l=n("",52),p=[l];function r(c,i,y,D,d,A){return a(),e("div",null,p)}const F=s(t,[["render",r]]);export{u as __pageData,F as default};
diff --git a/assets/guide_recipes_particles.md.9d68cba4.js b/assets/guide_recipes_particles.md.72bcff9c.js
similarity index 99%
rename from assets/guide_recipes_particles.md.9d68cba4.js
rename to assets/guide_recipes_particles.md.72bcff9c.js
index 727c5dd2..ccc7d346 100644
--- a/assets/guide_recipes_particles.md.9d68cba4.js
+++ b/assets/guide_recipes_particles.md.72bcff9c.js
@@ -1,4 +1,4 @@
-import{_ as s,c as a,o as n,N as l}from"./chunks/framework.0799945b.js";const i=JSON.parse('{"title":"Particles","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/particles.md","lastUpdated":1684369374000}'),p={name:"guide/recipes/particles.md"},o=l(`

Particles ​

This is a more comprehensive example based on the Kronos example used in the nodes docs. You will design a particle effect, make it appear on another feature, and ensure it adapts to the game state.

Design the Effect ​

First, design the particle effect. Profectus uses pixi-particles, and you can use the online particle effect editor here. However, the editor returns an older format of the particle effect emitter config, so you'll need to convert it like this:

ts
import myParticleEffect from "myParticleEffect.json";
+import{_ as s,c as a,o as n,N as l}from"./chunks/framework.0799945b.js";const i=JSON.parse('{"title":"Particles","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/particles.md","lastUpdated":1685337378000}'),p={name:"guide/recipes/particles.md"},o=l(`

Particles ​

This is a more comprehensive example based on the Kronos example used in the nodes docs. You will design a particle effect, make it appear on another feature, and ensure it adapts to the game state.

Design the Effect ​

First, design the particle effect. Profectus uses pixi-particles, and you can use the online particle effect editor here. However, the editor returns an older format of the particle effect emitter config, so you'll need to convert it like this:

ts
import myParticleEffect from "myParticleEffect.json";
 import { upgradeConfig } from "@pixi/particle-emitter"
 
 const particleEffect = upgradeConfig(myParticleEffect);

Create the Particles ​

Next, create the particles feature and render it. You'll also want to track the bounding rect of the particle effects. Consider the following step:

ts
const particles = createParticles(() => ({
diff --git a/assets/guide_recipes_particles.md.9d68cba4.lean.js b/assets/guide_recipes_particles.md.72bcff9c.lean.js
similarity index 84%
rename from assets/guide_recipes_particles.md.9d68cba4.lean.js
rename to assets/guide_recipes_particles.md.72bcff9c.lean.js
index 1746bc8e..e664a9d2 100644
--- a/assets/guide_recipes_particles.md.9d68cba4.lean.js
+++ b/assets/guide_recipes_particles.md.72bcff9c.lean.js
@@ -1 +1 @@
-import{_ as s,c as a,o as n,N as l}from"./chunks/framework.0799945b.js";const i=JSON.parse('{"title":"Particles","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/particles.md","lastUpdated":1684369374000}'),p={name:"guide/recipes/particles.md"},o=l("",18),e=[o];function t(c,r,y,F,D,A){return n(),a("div",null,e)}const d=s(p,[["render",t]]);export{i as __pageData,d as default};
+import{_ as s,c as a,o as n,N as l}from"./chunks/framework.0799945b.js";const i=JSON.parse('{"title":"Particles","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/particles.md","lastUpdated":1685337378000}'),p={name:"guide/recipes/particles.md"},o=l("",18),e=[o];function t(c,r,y,F,D,A){return n(),a("div",null,e)}const d=s(p,[["render",t]]);export{i as __pageData,d as default};
diff --git a/assets/guide_recipes_prestige.md.7aaf3780.js b/assets/guide_recipes_prestige.md.ea2e4e7b.js
similarity index 99%
rename from assets/guide_recipes_prestige.md.7aaf3780.js
rename to assets/guide_recipes_prestige.md.ea2e4e7b.js
index e735b339..011e3e17 100644
--- a/assets/guide_recipes_prestige.md.7aaf3780.js
+++ b/assets/guide_recipes_prestige.md.ea2e4e7b.js
@@ -1,4 +1,4 @@
-import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const F=JSON.parse('{"title":"Prestige Mechanic","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/prestige.md","lastUpdated":1684369374000}'),o={name:"guide/recipes/prestige.md"},t=n(`

Prestige Mechanic ​

Prestige mechanics are a common feature in incremental games. They involve resetting a portion of the game's progress in exchange for a new currency that persists between these resets. Many games even have multiple layers of reset mechanics, each resetting everything that came before them.

Create a conversion ​

The first step is to create a conversion that will handle calculating the amount of prestige currency generated. In our example, let's assume there's a base layer called main and a prestige layer called prestige. This conversion will be based on the amount of points the player has, a resource within main. Here's an example conversion, using the formula from The Prestige Tree's prestige layer:

ts
const conversion = createCumulativeConversion(() => ({
+import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const F=JSON.parse('{"title":"Prestige Mechanic","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/prestige.md","lastUpdated":1685337378000}'),o={name:"guide/recipes/prestige.md"},t=n(`

Prestige Mechanic ​

Prestige mechanics are a common feature in incremental games. They involve resetting a portion of the game's progress in exchange for a new currency that persists between these resets. Many games even have multiple layers of reset mechanics, each resetting everything that came before them.

Create a conversion ​

The first step is to create a conversion that will handle calculating the amount of prestige currency generated. In our example, let's assume there's a base layer called main and a prestige layer called prestige. This conversion will be based on the amount of points the player has, a resource within main. Here's an example conversion, using the formula from The Prestige Tree's prestige layer:

ts
const conversion = createCumulativeConversion(() => ({
 	baseResource: main.points,
 	gainResource: noPersist(points),
 	formula: x => x.div(10).sqrt()
diff --git a/assets/guide_recipes_prestige.md.7aaf3780.lean.js b/assets/guide_recipes_prestige.md.ea2e4e7b.lean.js
similarity index 84%
rename from assets/guide_recipes_prestige.md.7aaf3780.lean.js
rename to assets/guide_recipes_prestige.md.ea2e4e7b.lean.js
index 484410f0..ed136388 100644
--- a/assets/guide_recipes_prestige.md.7aaf3780.lean.js
+++ b/assets/guide_recipes_prestige.md.ea2e4e7b.lean.js
@@ -1 +1 @@
-import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const F=JSON.parse('{"title":"Prestige Mechanic","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/prestige.md","lastUpdated":1684369374000}'),o={name:"guide/recipes/prestige.md"},t=n("",18),l=[t];function p(r,c,i,y,D,A){return a(),e("div",null,l)}const h=s(o,[["render",p]]);export{F as __pageData,h as default};
+import{_ as s,c as e,o as a,N as n}from"./chunks/framework.0799945b.js";const F=JSON.parse('{"title":"Prestige Mechanic","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/prestige.md","lastUpdated":1685337378000}'),o={name:"guide/recipes/prestige.md"},t=n("",18),l=[t];function p(r,c,i,y,D,A){return a(),e("div",null,l)}const h=s(o,[["render",p]]);export{F as __pageData,h as default};
diff --git a/assets/guide_recipes_save-progress.md.cf7370cb.js b/assets/guide_recipes_save-progress.md.4d79827f.js
similarity index 99%
rename from assets/guide_recipes_save-progress.md.cf7370cb.js
rename to assets/guide_recipes_save-progress.md.4d79827f.js
index bee3e302..c4fd36ac 100644
--- a/assets/guide_recipes_save-progress.md.cf7370cb.js
+++ b/assets/guide_recipes_save-progress.md.4d79827f.js
@@ -1,4 +1,4 @@
-import{_ as s,c as a,o as e,N as n}from"./chunks/framework.0799945b.js";const o="/assets/save-progress.2c9d1bae.png",u=JSON.parse('{"title":"Display Save Progress","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/save-progress.md","lastUpdated":1684369374000}'),t={name:"guide/recipes/save-progress.md"},l=n('

Display Save Progress ​

This is a recipe to add a section to each save in the Saves Manager that will describe the amount of progress within that save. This can allow the player to more easily compare the saves to determine which is which. This would be in addition to the game version, last time played, and the name of the save itself, which can already be used for comparing saves without any configuration.

save progress display

This recipe will involve modifying the Save.vue file within your project to include an extra component in the saves details. It will go over creating the new component, how to work with the save data object, and then displaying the component.

Creating the component ​

Let's start with creating the coerced component. For this recipe we're going to make a couple assumptions about what this display should be. We'll assume the text will be more complex than displaying a single value. That is, at different stages of the game progress will be indicated by different metrics. We'll also assume it will be a single line of descriptive text - no images or anything else that would justify making a new .vue component. Breaking these assumptions is left as an exercise for the reader. But for now, with those assumptions in mind, we'll write our component (in the <script> tag in Save.vue) similar to this example:

ts
const progressDisplay = computeComponent(
+import{_ as s,c as a,o as e,N as n}from"./chunks/framework.0799945b.js";const o="/assets/save-progress.2c9d1bae.png",u=JSON.parse('{"title":"Display Save Progress","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/save-progress.md","lastUpdated":1685337378000}'),t={name:"guide/recipes/save-progress.md"},l=n('

Display Save Progress ​

This is a recipe to add a section to each save in the Saves Manager that will describe the amount of progress within that save. This can allow the player to more easily compare the saves to determine which is which. This would be in addition to the game version, last time played, and the name of the save itself, which can already be used for comparing saves without any configuration.

save progress display

This recipe will involve modifying the Save.vue file within your project to include an extra component in the saves details. It will go over creating the new component, how to work with the save data object, and then displaying the component.

Creating the component ​

Let's start with creating the coerced component. For this recipe we're going to make a couple assumptions about what this display should be. We'll assume the text will be more complex than displaying a single value. That is, at different stages of the game progress will be indicated by different metrics. We'll also assume it will be a single line of descriptive text - no images or anything else that would justify making a new .vue component. Breaking these assumptions is left as an exercise for the reader. But for now, with those assumptions in mind, we'll write our component (in the <script> tag in Save.vue) similar to this example:

ts
const progressDisplay = computeComponent(
     computed(() => {
     	if (someCondition) {
     		return "Just started";
diff --git a/assets/guide_recipes_save-progress.md.cf7370cb.lean.js b/assets/guide_recipes_save-progress.md.4d79827f.lean.js
similarity index 86%
rename from assets/guide_recipes_save-progress.md.cf7370cb.lean.js
rename to assets/guide_recipes_save-progress.md.4d79827f.lean.js
index d666ba6c..336840ae 100644
--- a/assets/guide_recipes_save-progress.md.cf7370cb.lean.js
+++ b/assets/guide_recipes_save-progress.md.4d79827f.lean.js
@@ -1 +1 @@
-import{_ as s,c as a,o as e,N as n}from"./chunks/framework.0799945b.js";const o="/assets/save-progress.2c9d1bae.png",u=JSON.parse('{"title":"Display Save Progress","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/save-progress.md","lastUpdated":1684369374000}'),t={name:"guide/recipes/save-progress.md"},l=n("",16),p=[l];function r(c,i,y,D,F,d){return e(),a("div",null,p)}const m=s(t,[["render",r]]);export{u as __pageData,m as default};
+import{_ as s,c as a,o as e,N as n}from"./chunks/framework.0799945b.js";const o="/assets/save-progress.2c9d1bae.png",u=JSON.parse('{"title":"Display Save Progress","description":"","frontmatter":{},"headers":[],"relativePath":"guide/recipes/save-progress.md","lastUpdated":1685337378000}'),t={name:"guide/recipes/save-progress.md"},l=n("",16),p=[l];function r(c,i,y,D,F,d){return e(),a("div",null,p)}const m=s(t,[["render",r]]);export{u as __pageData,m as default};
diff --git a/assets/index.md.f43e5a79.js b/assets/index.md.d8bea653.js
similarity index 94%
rename from assets/index.md.f43e5a79.js
rename to assets/index.md.d8bea653.js
index 93c6f7ba..701f1d40 100644
--- a/assets/index.md.f43e5a79.js
+++ b/assets/index.md.d8bea653.js
@@ -1 +1 @@
-import{_ as e,c as t,o}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Home","description":"","frontmatter":{"layout":"home","title":"Home","hero":{"name":"Profectus","text":"A game engine that grows with you","tagline":"Starts at your skill level and encourages your ambition to make your projects bigger and better.","actions":[{"theme":"brand","text":"Get Started","link":"/guide/getting-started/setup"},{"theme":"alt","text":"Learn More","link":"/guide/"}]},"features":[{"title":"Easy to Use","details":"Everything is written to be as intuitive to use as possible, through consistent design."},{"title":"Helpful","details":"Built with TypeScript to guide you as you write. Seamlessly deploy your project with pre-configured github workflows, and more."},{"title":"Incremental","details":"Designed to actively encourage you to become better at programming. The engine will never limit you."}]},"headers":[],"relativePath":"index.md","lastUpdated":1684369374000}'),i={name:"index.md"};function a(r,n,s,l,d,u){return o(),t("div")}const g=e(i,[["render",a]]);export{m as __pageData,g as default};
+import{_ as e,c as t,o}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Home","description":"","frontmatter":{"layout":"home","title":"Home","hero":{"name":"Profectus","text":"A game engine that grows with you","tagline":"Starts at your skill level and encourages your ambition to make your projects bigger and better.","actions":[{"theme":"brand","text":"Get Started","link":"/guide/getting-started/setup"},{"theme":"alt","text":"Learn More","link":"/guide/"}]},"features":[{"title":"Easy to Use","details":"Everything is written to be as intuitive to use as possible, through consistent design."},{"title":"Helpful","details":"Built with TypeScript to guide you as you write. Seamlessly deploy your project with pre-configured github workflows, and more."},{"title":"Incremental","details":"Designed to actively encourage you to become better at programming. The engine will never limit you."}]},"headers":[],"relativePath":"index.md","lastUpdated":1685337378000}'),i={name:"index.md"};function a(r,n,s,l,d,u){return o(),t("div")}const g=e(i,[["render",a]]);export{m as __pageData,g as default};
diff --git a/assets/index.md.f43e5a79.lean.js b/assets/index.md.d8bea653.lean.js
similarity index 94%
rename from assets/index.md.f43e5a79.lean.js
rename to assets/index.md.d8bea653.lean.js
index 93c6f7ba..701f1d40 100644
--- a/assets/index.md.f43e5a79.lean.js
+++ b/assets/index.md.d8bea653.lean.js
@@ -1 +1 @@
-import{_ as e,c as t,o}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Home","description":"","frontmatter":{"layout":"home","title":"Home","hero":{"name":"Profectus","text":"A game engine that grows with you","tagline":"Starts at your skill level and encourages your ambition to make your projects bigger and better.","actions":[{"theme":"brand","text":"Get Started","link":"/guide/getting-started/setup"},{"theme":"alt","text":"Learn More","link":"/guide/"}]},"features":[{"title":"Easy to Use","details":"Everything is written to be as intuitive to use as possible, through consistent design."},{"title":"Helpful","details":"Built with TypeScript to guide you as you write. Seamlessly deploy your project with pre-configured github workflows, and more."},{"title":"Incremental","details":"Designed to actively encourage you to become better at programming. The engine will never limit you."}]},"headers":[],"relativePath":"index.md","lastUpdated":1684369374000}'),i={name:"index.md"};function a(r,n,s,l,d,u){return o(),t("div")}const g=e(i,[["render",a]]);export{m as __pageData,g as default};
+import{_ as e,c as t,o}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Home","description":"","frontmatter":{"layout":"home","title":"Home","hero":{"name":"Profectus","text":"A game engine that grows with you","tagline":"Starts at your skill level and encourages your ambition to make your projects bigger and better.","actions":[{"theme":"brand","text":"Get Started","link":"/guide/getting-started/setup"},{"theme":"alt","text":"Learn More","link":"/guide/"}]},"features":[{"title":"Easy to Use","details":"Everything is written to be as intuitive to use as possible, through consistent design."},{"title":"Helpful","details":"Built with TypeScript to guide you as you write. Seamlessly deploy your project with pre-configured github workflows, and more."},{"title":"Incremental","details":"Designed to actively encourage you to become better at programming. The engine will never limit you."}]},"headers":[],"relativePath":"index.md","lastUpdated":1685337378000}'),i={name:"index.md"};function a(r,n,s,l,d,u){return o(),t("div")}const g=e(i,[["render",a]]);export{m as __pageData,g as default};
diff --git a/guide/advanced-concepts/creating-features.html b/guide/advanced-concepts/creating-features.html
index 61d5c64b..1eb9d1c0 100644
--- a/guide/advanced-concepts/creating-features.html
+++ b/guide/advanced-concepts/creating-features.html
@@ -10,7 +10,7 @@
     
   
   
-  
+  
   
   
   
@@ -51,8 +51,8 @@
     // unsubscribe from postUpdate
     listeners[layer.id]?.();
     listeners[layer.id] = undefined;
-});
- diff --git a/guide/advanced-concepts/dynamic-layers.html b/guide/advanced-concepts/dynamic-layers.html index eac02586..13b9781c 100644 --- a/guide/advanced-concepts/dynamic-layers.html +++ b/guide/advanced-concepts/dynamic-layers.html @@ -10,7 +10,7 @@ - + @@ -25,8 +25,8 @@ const layer = layers[id]; if (!layer) throw "Layer does not exist"; return layer as DynamicLayer; // you might need an "as unknown" after layer -}

This utility function can streamline your code when dealing with multiple dynamic layers and ensure that you're working with the correct layer type.

When working with dynamic layers you'll need to ensure you can determine what layers should exist when loading a save file, by returning an accurate list from your project's getInitialLayers function.

- diff --git a/guide/advanced-concepts/nodes.html b/guide/advanced-concepts/nodes.html index 66f0f0d7..2864a0d2 100644 --- a/guide/advanced-concepts/nodes.html +++ b/guide/advanced-concepts/nodes.html @@ -10,7 +10,7 @@ - + @@ -45,8 +45,8 @@ particles.boundingRect ], updateParticleEffect -)

In this example the particle effects will update whenever the window resizes, the feature's bounding rect changes, or the particle effect is supposed to turn on/off. By watching for other relevant properties you can ensure even more complex situations are accounted for.

The bounding rect is usually kept up-to-date and responsive to changes such as nodes resizing, moving due to window resizing, or features being shown or hidden. However, occasional situations may cause it to be out of sync. Therefore, it's recommended to use the node system for visual effects only, where any glitches have minimal impact.

- diff --git a/guide/creating-your-project/changelog.html b/guide/creating-your-project/changelog.html index 255e70aa..ab82bfff 100644 --- a/guide/creating-your-project/changelog.html +++ b/guide/creating-your-project/changelog.html @@ -10,7 +10,7 @@ - + @@ -30,8 +30,8 @@ <li class="breaking">Removed everything</li> <li class="balancing">Created some bugs to fix later</li> </ul> -</details>

The details and summary tags will create a section that can be collapsed and uncollapsed. While collapsed only the text in the summary tag will appear. By default sections are collapsed, although adding the open attribute to the details element will change that.

Within the details of the version, you can add a description and a list of changes for that version. CSS classes have been defined to automatically mark a change as a feature, fix, breaking change, or balancing tweak. You can of course add additional tags as you have full control over the entire component.

- diff --git a/guide/creating-your-project/project-entry.html b/guide/creating-your-project/project-entry.html index 989536ce..86af2eda 100644 --- a/guide/creating-your-project/project-entry.html +++ b/guide/creating-your-project/project-entry.html @@ -10,7 +10,7 @@ - + @@ -21,8 +21,8 @@ -
Skip to content
On this page

Project Entry ​

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.

Required Exports ​

getInitialLayers ​

  • Type: (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.

hasWon ​

  • Type: 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:

ts
export const hasWon = computed(() => Decimal.gte(resource.value, 10));

fixOldSave ​

  • Type: (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.

- diff --git a/guide/creating-your-project/project-info.html b/guide/creating-your-project/project-info.html index b7488442..6eeb02ce 100644 --- a/guide/creating-your-project/project-info.html +++ b/guide/creating-your-project/project-info.html @@ -10,7 +10,7 @@ - + @@ -21,8 +21,8 @@ -
Skip to content
On this page

Project Info ​

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.

Basic Config ​

title ​

  • Type: string
  • Default: 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.

description ​

  • Type: string
  • Default: A project made in Profectus

A description of the project, which will be used when the project is installed as a Progressive Web Application.

id ​

  • Type: string
  • Default: ""

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.

author ​

  • Type: string
  • Default: ""

The author of the project, which will appear in the info tab.

discordName ​

  • Type: string
  • Default: 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.

  • Type: string
  • Default: https://discord.gg/yJ4fjnjU54

The link for the discord server to point users to. See discordName for more details.

Version Config ​

versionNumber ​

  • Type: string
  • Default: 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.

versionTitle ​

  • Type: string
  • Default: 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.

Display Config ​

allowGoBack ​

  • Type: boolean
  • Default: 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).

defaultShowSmall ​

  • Type: boolean
  • Default: 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.

defaultDecimalsShown ​

  • Type: number
  • Default: 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.

useHeader ​

  • Type: boolean
  • Default: 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.

  • Type: string | null
  • Default: 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.

  • Type: string
  • Default: ""

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.

initialTabs ​

  • Type: string[]
  • Default: ["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.

Advanced Config ​

maxTickLength ​

  • Type: number
  • Default: 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.

offlineLimit ​

  • Type: number
  • Default: 1

The max amount of time that can be stored as offline time, in hours.

enablePausing ​

  • Type: boolean
  • Default: 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).

exportEncoding ​

  • Type: base64 | lz | plain
  • Default: 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.

- diff --git a/guide/creating-your-project/themes.html b/guide/creating-your-project/themes.html index 46ce74c7..eb54d909 100644 --- a/guide/creating-your-project/themes.html +++ b/guide/creating-your-project/themes.html @@ -10,7 +10,7 @@ - + @@ -21,8 +21,8 @@ -
Skip to content
On this page

Themes ​

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.

Modifying Themes ​

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.

Theme Options ​

floatingTabs ​

  • Type: 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.

mergeAdjacent ​

  • Type: 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.

- diff --git a/guide/creating-your-project/utils.html b/guide/creating-your-project/utils.html index 695188fb..f2f2b7cb 100644 --- a/guide/creating-your-project/utils.html +++ b/guide/creating-your-project/utils.html @@ -10,7 +10,7 @@ - + @@ -21,8 +21,8 @@ -
Skip to content
On this page

Utilities ​

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.

- diff --git a/guide/getting-started/examples.html b/guide/getting-started/examples.html index 26f77bc5..17c6a198 100644 --- a/guide/getting-started/examples.html +++ b/guide/getting-started/examples.html @@ -10,7 +10,7 @@ - + @@ -21,8 +21,8 @@ -
Skip to content
On this page

Example Projects ​

Planar Pioneers Profectus 0.6 ​

View Source | View Project

An incremental game with procedurally generated content.

Kronos Profectus 0.6 ​

View Source

This is a project that's still under development, but is a good resource for things like implementing custom features.

Advent Incremental Profectus 0.5 ​

View Source | View Project

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.

Primordia Profectus 0.5 ​

View Source | View Project

A "The Prestige Tree" style incremental game, developed by the original creator of TPT.

TMT-Demo Profectus 0.6 ​

View Source | View Project

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.

- diff --git a/guide/getting-started/first-layer.html b/guide/getting-started/first-layer.html index 714fe1ec..1f01bc23 100644 --- a/guide/getting-started/first-layer.html +++ b/guide/getting-started/first-layer.html @@ -10,7 +10,7 @@ - + @@ -62,8 +62,8 @@ multiplier: 2, enabled: myUpgrade.bought })) -]);

Now to make the points gain use the modifier, we'll update the line that adds points to this:

ts
points.value = Decimal.add(points.value, Decimal.times(myModifier.apply(1), diff));

You now have a functioning upgrade, and are prepared to create many more upgrades and other features!

Next Steps ​

Since Profectus is an engine, what to do with it is a fairly open-ended question. If you're not quite ready to go out on your own, there are more guides to help prepare you. A good next step would be the Prestige Mechanic recipe page.

The "Important Concepts" section of the guide goes further into various parts of the engine that are prudent to understand. If any of those look interesting or like something you need help with, they can be a great help.

Beyond that, the best way to learn is to just continue using the engine and exploring its various features. Have fun!

- diff --git a/guide/getting-started/setup.html b/guide/getting-started/setup.html index ad80be2f..1d7a3160 100644 --- a/guide/getting-started/setup.html +++ b/guide/getting-started/setup.html @@ -10,7 +10,7 @@ - + @@ -21,8 +21,8 @@ -
Skip to content
On this page

Setting Up ​

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.

Local Development ​

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 dev 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.

Deploying ​

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".

workflow 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.

actions button

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.

github pages

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/.

Visual Studio Code Setup ​

If you don't have a preferred IDE, Profectus is developed in Visual Studio Code and is known to work well with it.

Recommendations:

  • Use Take Over Mode for proper type analysis
  • Turn off .value autocomplete by running the Preferences: Open Settings command and setting volar.autoCompleteRefs to false
  • Disable emmet expansions by setting emmet.showExpandedAbbreviation to "never", also in the preferences
  • Install the Vitest VS Code extension for running and debugging unit tests (if working on the engine itself)

Replit ​

As 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:

Run on Repl.it

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 ​

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.

- diff --git a/guide/getting-started/updating.html b/guide/getting-started/updating.html index 8d562272..270f313b 100644 --- a/guide/getting-started/updating.html +++ b/guide/getting-started/updating.html @@ -10,7 +10,7 @@ - + @@ -23,8 +23,8 @@
Skip to content
On this page

Updating Profectus ​

Github ​

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:

bash
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.

Replit ​

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.

Glitch ​

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.

- diff --git a/guide/important-concepts/coercable.html b/guide/important-concepts/coercable.html index c8b0911e..41e250ac 100644 --- a/guide/important-concepts/coercable.html +++ b/guide/important-concepts/coercable.html @@ -10,7 +10,7 @@ - + @@ -42,8 +42,8 @@ /> )); return { modal, showModal, ...otherData }; -}

That example also shows how to use models in JSX, which are a concept in vue for allowing a component to read and write a value. It requires specifying both the model value as well as a function to update it's value.

Components ​

This one might be the most obvious, but you can also just give it a Vue component to display outright. Keep in mind it will not be passed any props, so it should not depend on any. You can read more about creating Vue components on Components Basics.

- diff --git a/guide/important-concepts/features.html b/guide/important-concepts/features.html index 6749188d..85760c94 100644 --- a/guide/important-concepts/features.html +++ b/guide/important-concepts/features.html @@ -10,7 +10,7 @@ - + @@ -29,8 +29,8 @@ cost: 1, resource: points }));

The result will be a lazy proxy of the feature being created. The feature can then be used throughout the rest of the layer. The main thing to keep in mind when creating features is that they should typically be included in the layer object that gets returned. If a feature has any persistent refs they must be included or else they will not have their values saved and loaded correctly.

While the structure of layers is intentionally left up to the creator, it is recommended to avoid storing them in arrays. If you ever remove an upgrade from an array, or add an upgrade in between others, then it will interfere with the save data of existing users. You can manually fix these issues in fixOldSave, but it's recommended to avoid the error entirely.

Since usually you want to access a specific feature, storing them in an object is much more reliable and makes the code easier to read. For things like checking number of upgrades bought, for example, you can still use Object.values to get an array of the objects instead.

Example ​

ts
const upgrades = { addGainUpgrade, gainMultUpgrade, upgMultUpgrade };
-const numUpgrades = computed(() => Object.values(upgrades).length);

Tree Shaking ​

Since Profectus takes advantage of tree shaking, any type of feature that is not used will not be included in the output of the project. That means users have less code to download, a slight performance boost, and you don't need to worry about feature type-specific settings appearing (such as whether to show maxed challenges).

It should be noted that a couple features depend on each other, such as Buyables depending on Clickables. That means you may see features included in the output despite not directly using them. Some features, such as Links and Tooltips, are used by the engine itself and will always be included in the output.

- diff --git a/guide/important-concepts/formulas.html b/guide/important-concepts/formulas.html index 90810a2f..a643b574 100644 --- a/guide/important-concepts/formulas.html +++ b/guide/important-concepts/formulas.html @@ -10,7 +10,7 @@ - + @@ -27,8 +27,8 @@ cost: Formula.variable(myRepeatable.amount).pow_base(1.05).times(100) })), maximize: true -}));

Softcaps ​

Often games incorporate "softcaps" on formulas - that means making the formula step-wise, where everything above a certain value has an additional operation on it that makes it scale differently. Formulas support this via Formula.step, which takes a threshold value and a function to modify the formula appropriately. The function gets a formula that will contain a variable for the amount above the threshold of the original value. Whatever result is returned will then be added back onto the threshold to achieve the softcapped value. Take, for example, a formula Formula.variable().div(10).sqrt() that we want to apply a softcap to - let's say it should square root everything after 1e100. The softcapped formula will look like this: Formula.variable().div(10).sqrt().step(1e100, f => f.sqrt()).

Limitations ​

Single Variable ​

For inverting and integrating, formulas should have a single variable, which serves as the input. Although other parts of the formula can be computed values, they must not be dependent on the input variable for inverting or integrating purposes. Formulas work correctly as long as changing other parts of the formula doesn't affect the input variable.

The variable is defined by wrapping the input to the formula in Formula.variable. In the cost requirement example above, the repeatable's amount is the input to the variable. That means inverting the function would calculate the amount based on the cost, and integrating would be finding the area under the curve where the repeatable's amount is the x axis and the output of the formula is the y axis.

If the cost formula had not marked a variable, e.g. Formula.pow(1.05, myRepeatable.amount).times(100) then the formula would not be invertible or integrable, and would throw an error if either operation was tried. While evaluate() will work as expected, passing a value to evaluate() will not, as it will not know what value to override.

Invertibility and Integrability ​

Certain operations may not support inverting or integrating. Functions such as rounding or clamping are non-invertible, while others like super-log are non-integrable. You may only use a single complex operation in addition to add, sub, mult, and div operations. For formulas with two complex operations, a custom formula is required.

Spending Resources ​

When working with formulas, the spendResources property determines whether the formula needs to be invertible or integrable. The property is used in two utilities: calculateMaxAffordable and calculateCost. These utilities are ultimately employed wherever formulas are used, such as in cost requirements or conversions.

Spending resources refers to whether max affordability and cost calculations should account for resources spent. If spending resources is set to true, the formula will be integrated and inverted, albeit with certain limitations. For example, exponential modifiers and soft caps can make a formula non-integrable.

Consider a simple formula that returns the input value as the cost. For example, to make three sequential purchases, the costs would be 1, 2, and 3, totaling 6. When resources are spent, making three purchases in a single operation will cost a total of 6. However, if resources are not spent, the cost would only be 3, the cost of the last purchase. Accounting for resources being spent means that the overall cost calculation reflects the cumulative costs of multiple purchases.

Integration in this context is an estimation, as it calculates the area under a continuous curve, while actual purchases occur at integer values. This means that calculating max affordable might overshoot and the cost at that amount might undershoot. To help address this, the summedPurchases property can be used, which manually sums the last X purchases, reducing the error margin. This also ensures higher accuracy when the player makes fewer purchases at once, which is when accuracy is most relevant. For larger numbers of purchases, a slight overshoot or undershoot is typically acceptable.

Modifiers ​

When applying changes to a formula using modifiers, use the modifierToFormula utility to apply the modifier while preserving invertibility if the modifier is invertible.

Custom Formulas ​

If the existing functions are insufficient for your needs, create a custom formula by implementing your own evaluation, inversion, and integration functions. Use the operations in src/game/formulas/operations.ts as reference. For spending resources, the integral formula must be invertible.

- diff --git a/guide/important-concepts/layers.html b/guide/important-concepts/layers.html index 4bbc7004..251a23b7 100644 --- a/guide/important-concepts/layers.html +++ b/guide/important-concepts/layers.html @@ -10,7 +10,7 @@ - + @@ -21,8 +21,8 @@ -
Skip to content
On this page

Layers ​

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.

Lazy Proxies ​

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.

- diff --git a/guide/important-concepts/persistence.html b/guide/important-concepts/persistence.html index f8220dfb..1d45ce36 100644 --- a/guide/important-concepts/persistence.html +++ b/guide/important-concepts/persistence.html @@ -10,7 +10,7 @@ - + @@ -21,8 +21,8 @@ -
Skip to content
On this page

Persistence ​

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.

- diff --git a/guide/important-concepts/reactivity.html b/guide/important-concepts/reactivity.html index 83a0bdac..5067f3a4 100644 --- a/guide/important-concepts/reactivity.html +++ b/guide/important-concepts/reactivity.html @@ -10,7 +10,7 @@ - + @@ -21,8 +21,8 @@ -
Skip to content
On this page

Reactivity ​

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.

Computable ​

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.

- diff --git a/guide/important-concepts/requirements.html b/guide/important-concepts/requirements.html index 95851f3a..a09cdcc0 100644 --- a/guide/important-concepts/requirements.html +++ b/guide/important-concepts/requirements.html @@ -10,7 +10,7 @@ - + @@ -26,8 +26,8 @@ resource: points, cost: Formula.variable(repeatable.amount).add(1).times(100) })) -}));

Important to note here is the parameter added to the createRepeatable's options function. That is a reference to the repeatable being created, so you can access it's amount property in the formula.

Using Requirements ​

Several features will have a requirements property that takes one or more requirements that must be fulfilled for a certain action to be performed with that feature.

When implementing requirements, you can use the displayRequirements utility. This utility is designed to give a human-readable string generated by the requirement(s) given, making it easier for players to understand the conditions needed to progress in the game. Typically features that support requirements will already use this utility internally.

You may need to "pay" requirements upon meeting their conditions and performing the associated action. This action typically involves spending resources or making other adjustments to the game state. The payRequirements function simplifies this process by handling the payment for one or more requirements, considering the number of levels to pay for. Additionally, custom pay functions like payByDivision and payByReset can be passed into createCostRequirement for more specialized cases.

Multi-Level Requirements ​

Requirements can have multiple "levels", which are typically used for things like multi-level challenges with scaling requirements. When checking if requirements are met, the requirementsMet function can be used. It accepts a single requirement or an array of requirements.

Requirements that are just on/off, such as boolean or visibility requirements, will count as infinite levels when in the same array. This allows you to combine different types of requirements in the same array and use the maxRequirementsMet function to calculate the maximum number of levels that could be acquired with the current requirement states.

- diff --git a/guide/index.html b/guide/index.html index f9e71772..7c6cfa1b 100644 --- a/guide/index.html +++ b/guide/index.html @@ -10,7 +10,7 @@ - + @@ -21,8 +21,8 @@ -
Skip to content
On this page

Introduction ​

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.

Should you use Profectus? ​

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.

Alternative Engines ​

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.

Design Philosophies ​

While absolute purity is impossible, design decisions have been and will continue to be made using these principles in mind.

  • An engine should be intuitive, and code readable without context
  • An engine should not constrain a creator
  • An engine should be consistent
  • An engine should be extensible, and those extensions sharable
  • An engine should be efficient
  • An engine should report issues early and thoroughly
  • Passing by reference is one honking great idea -- let's do more of that!
- diff --git a/guide/migrations/0-6.html b/guide/migrations/0-6.html index 78c43f6e..13ea5334 100644 --- a/guide/migrations/0-6.html +++ b/guide/migrations/0-6.html @@ -10,7 +10,7 @@ - + @@ -57,8 +57,8 @@ resource: generators.energeia, }))

Conversions work a bit differently. Their scaling function system has been replaced with a formula property that takes a lambda - it provides the input formula variable, representing the base resource, as a parameter, and you return a formula representing the amount of the gain resource that could be converted. For example, if you previously had code like this:

ts
scaling: addSoftcap(createPolynomialScaling(10, 0.5), 1e100, 0.5)

you can now write this:

ts
formula: x => x.div(10).sqrt().step(1e100, f => f.sqrt())

Learn more about formulas and their capabilities in this guide page.

Modifiers ​

Modifiers now display negative effects in red. The current implementation assumes any value that reduces the result is negative, and the output being less than the base value is a negative outcome. However, for some modifiers, this may be the opposite of what you want - for example, a cooldown being reduced below its base value is a positive effect. For those modifiers, set the smallerIsBetter property to true. This property also exists when creating collapsible modifier sections.

Modifiers have renamed their revert property to invert to match the terms used by formulas. Update any custom modifiers you've created accordingly.

Custom Features ​

Lazy proxies now call the options function with the base object as the this argument and the first parameter. Features with options functions are expected to pass the base object as the this argument and first parameter as well. The OptionsFunc type has already been updated for this, so TS will complain if you skip this migration step.

You'll also want to add support for decorators. You'll want to add the new parameter ...decorators: GenericDecorator[], and then call their functions:

Fixing visibility changes ​

Visibility properties now work with booleans, which has several implications.

The showIf util is no longer necessary and has been removed - simply return the boolean value itself. In fact, if you were previously passing a computed boolean into showIf, you can now use the computed ref directly, reducing overhead. Here's an example:

ts
visibility() {
     return showIf(spellExpMilestone.earned.value);
-}

This code can now be simplified to:

ts
visibility: spellExpMilestone.earned

Be aware that using the computed ref directly instead of a function can cause circular dependency issues. If you encounter one while simplifying a visibility property, resolve the issue or continue using a function, returning the computed ref value.

Custom Components ​

If you created any custom features with their own Vue components, you'll need to update them to support booleans for visibility values. This means replacing ALL equality checks for specific visibilities with calls to isVisible and isHidden.

While updating your component, you may need to cast the component to GenericComponent.

- diff --git a/guide/recipes/particles.html b/guide/recipes/particles.html index 2e86f8f7..7767f133 100644 --- a/guide/recipes/particles.html +++ b/guide/recipes/particles.html @@ -10,7 +10,7 @@ - + @@ -79,8 +79,8 @@ particles.boundingRect.value ]) ); -}; - diff --git a/guide/recipes/prestige.html b/guide/recipes/prestige.html index 431fc1a1..c7c5f7bd 100644 --- a/guide/recipes/prestige.html +++ b/guide/recipes/prestige.html @@ -10,7 +10,7 @@ - + @@ -38,8 +38,8 @@ }));

Then, modify the convert button to trigger the reset:

ts
onClick() {
 	conversion.convert();
 	reset.reset();
-}

If you have multiple tiers of resets, you may add an onReset function to each reset that triggers the next reset before it, causing the resets to cascade.

Branching resets ​

A common pattern for reset mechanics is to display these various layers in a tree and have the tree propagate the resets for you. There are a couple of utility functions to help you accomplish this: createResetButton and createLayerTreeNode. You'll typically place the tree itself in the main layer and create a tree node for each layer. Then you can call the tree's reset function with the layer that's resetting, and it will propagate the reset as appropriate.

- diff --git a/guide/recipes/save-progress.html b/guide/recipes/save-progress.html index d1fbaea2..818265d1 100644 --- a/guide/recipes/save-progress.html +++ b/guide/recipes/save-progress.html @@ -10,7 +10,7 @@ - + @@ -42,8 +42,8 @@ ><br /> <div v-if="currentTime">Last played {{ dateFormat.format(currentTime) }}</div> ++ <div v-if="progressDisplay"><component :is="progressDisplay" /></div> -</div>

And there you have it! Your dev environment should now show the component in all its glory in the saves manager.

- diff --git a/hashmap.json b/hashmap.json index 869158f3..18785f66 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"api_components_modalcomponent.md":"40989410","api_components_nodecomponent.md":"6c607feb","api_components_savecomponent.md":"bc14d931","api_components_fields_dangerbuttoncomponent.md":"43aea00b","api_components_fields_feedbackbuttoncomponent.md":"3022117b","api_components_fields_selectcomponent.md":"ace2bb01","api_components_fields_slidercomponent.md":"de4f5cd1","api_components_fields_togglecomponent.md":"0126692d","api_components_layout_collapsiblecomponent.md":"b792d45f","api_components_fields_textcomponent.md":"039dbcea","api_components_layout_rowcomponent.md":"2f1b6079","api_components_layout_verticalrulecomponent.md":"87270803","api_components_math_floorcomponent.md":"765da36c","api_components_math_sqrtcomponent.md":"a610fb30","api_components_infocomponent.md":"5e7ed906","api_components_layout_spacercomponent.md":"8e0b53af","api_components_hotkeycomponent.md":"94af8a77","api_components_layercomponent.md":"fb5a91af","api_components_layout_stickycomponent.md":"3605e970","api_modules_data_common.md":"91d11f70","api_components_marknodecomponent.md":"95ce4d1c","api_modules_data_themes.md":"4088bd49","api_modules_data_projentry.md":"79aeaa73","api_components_errorcomponent.md":"ab89105a","api_components_contextcomponent.md":"088cd8fb","api_components_layout_columncomponent.md":"0a31ce33","api_modules_features_action.md":"b7aae132","api_modules_features_achievement.md":"cd26a191","api_modules_features_bar.md":"9604d286","api_modules_features_decorators_common.md":"67d252c2","api_modules_features_infobox.md":"90113df9","api_modules_features_hotkey.md":"3577c6d9","api_modules_features_board.md":"31b80d8b","api_modules_features_clickable.md":"d29a69c7","api_modules_features_grid.md":"ffe71f11","api_modules_features_feature.md":"4e98e178","api_modules_features_decorators_bonusdecorator.md":"64718150","api_modules_features_challenge.md":"bd858f4a","api_modules_game_modifiers.md":"f8a2c59e","api_modules_game_notifications.md":"9a314c38","api_modules_game_persistence.md":"b82aac95","api_modules_game_player.md":"0ff6beaf","api_modules_game_requirements.md":"2b28e2e9","api_modules_lib_vue-panzoom.md":"bfc32ff5","api_modules_game_settings.md":"9806c3bd","api_modules_lib_break_eternity.md":"2c1c3614","api_modules_lib_collapsetransition.md":"37a925e1","api_modules_features_particles.md":"299b8355","api_modules_lib_lru-cache.md":"9af07d85","api_modules_features_links.md":"26fc907d","api_modules_lib_pixi.md":"2b426252","api_modules_lib_pwa-register.md":"e2eb20d6","api_modules_lib_vue-textarea-autosize.md":"a92591ec","api_modules_util_bignum.md":"b4aab637","api_modules_util_break_eternity.md":"2a80a12c","api_modules_util_common.md":"79f6c939","api_modules_util_computed.md":"ba2689a0","api_modules_game_events.md":"a9031949","api_modules_util_vue.md":"e8d7d97d","api_overview.md":"88cceb38","guide_advanced-concepts_creating-features.md":"083776fa","guide_advanced-concepts_dynamic-layers.md":"f04ecae7","guide_advanced-concepts_nodes.md":"0c181795","guide_creating-your-project_changelog.md":"a35dd134","guide_creating-your-project_project-entry.md":"2f833a37","guide_creating-your-project_project-info.md":"09b65ab7","guide_creating-your-project_themes.md":"8044ebae","guide_creating-your-project_utils.md":"f2f7a981","guide_getting-started_examples.md":"d4b64671","api_modules_features_tree.md":"f908ac10","guide_getting-started_first-layer.md":"47c9f9be","guide_getting-started_setup.md":"5a7ef6f7","guide_getting-started_updating.md":"f471842e","guide_important-concepts_coercable.md":"5e75d4e3","api_modules_features_conversion.md":"970ccc3a","guide_important-concepts_features.md":"40c1a025","guide_important-concepts_formulas.md":"63fd87c6","guide_important-concepts_layers.md":"5afe5c4c","guide_important-concepts_persistence.md":"ff5308f4","guide_important-concepts_reactivity.md":"612c3628","guide_important-concepts_requirements.md":"f50ff6cc","guide_index.md":"585bfdde","api_modules_features_tooltip.md":"8f77999a","guide_recipes_particles.md":"9d68cba4","guide_recipes_prestige.md":"7aaf3780","guide_recipes_save-progress.md":"cf7370cb","index.md":"f43e5a79","api_modules_features_resource.md":"8ae1f501","api_modules_features_repeatable.md":"e63148c4","api_modules_features_tabs_tabfamily.md":"7edfe3b4","api_modules_game_formulas_formulas.md":"a85fa039","api_modules_features_tabs_tab.md":"b0d897cf","guide_migrations_0-6.md":"c2d3eaf8","api_modules_game_layers.md":"4ab34e80","api_modules_features_upgrade.md":"3a568bd3","api_modules_game_gameloop.md":"ea9bda9a","api_modules_util_proxies.md":"92fedcf7","api_modules_game_formulas_types.md":"6d408340","api_modules_features_reset.md":"4c6103be","api_modules_util_save.md":"2a100674","api_modules_game_state.md":"3ac54075","api_modules_game_formulas_operations.md":"e8e4806b"} +{"api_components_fields_slidercomponent.md":"de4f5cd1","api_components_contextcomponent.md":"088cd8fb","api_components_errorcomponent.md":"ab89105a","api_components_fields_togglecomponent.md":"0126692d","api_components_modalcomponent.md":"40989410","api_components_nodecomponent.md":"6c607feb","api_components_savecomponent.md":"bc14d931","api_components_fields_dangerbuttoncomponent.md":"43aea00b","api_components_fields_feedbackbuttoncomponent.md":"3022117b","api_components_fields_selectcomponent.md":"ace2bb01","api_components_layout_spacercomponent.md":"8e0b53af","api_components_fields_textcomponent.md":"039dbcea","api_components_layout_columncomponent.md":"0a31ce33","api_components_math_sqrtcomponent.md":"a610fb30","api_components_marknodecomponent.md":"95ce4d1c","api_components_hotkeycomponent.md":"94af8a77","api_components_infocomponent.md":"5e7ed906","api_components_layercomponent.md":"fb5a91af","api_components_layout_collapsiblecomponent.md":"b792d45f","api_components_layout_rowcomponent.md":"2f1b6079","api_components_math_floorcomponent.md":"765da36c","api_components_layout_stickycomponent.md":"3605e970","api_components_layout_verticalrulecomponent.md":"87270803","api_modules_data_common.md":"91d11f70","api_modules_data_themes.md":"4088bd49","api_modules_data_projentry.md":"79aeaa73","api_modules_features_achievement.md":"cd26a191","api_modules_features_action.md":"b7aae132","api_modules_features_tabs_tabfamily.md":"7edfe3b4","api_modules_features_tooltip.md":"8f77999a","api_modules_features_tree.md":"f908ac10","api_modules_features_upgrade.md":"3a568bd3","api_modules_game_player.md":"0ff6beaf","api_modules_game_requirements.md":"2b28e2e9","api_modules_game_settings.md":"9806c3bd","api_modules_game_state.md":"3ac54075","api_modules_lib_break_eternity.md":"2c1c3614","api_modules_lib_collapsetransition.md":"37a925e1","api_modules_lib_lru-cache.md":"9af07d85","api_modules_lib_pixi.md":"2b426252","api_modules_lib_pwa-register.md":"e2eb20d6","api_modules_game_formulas_types.md":"6d408340","guide_creating-your-project_project-info.md":"c56eeb0f","guide_creating-your-project_themes.md":"270c3647","api_modules_util_bignum.md":"b4aab637","guide_creating-your-project_utils.md":"4760f329","api_modules_util_break_eternity.md":"2a80a12c","guide_getting-started_first-layer.md":"eea178cb","api_modules_game_gameloop.md":"ea9bda9a","api_modules_util_save.md":"2a100674","api_modules_lib_vue-panzoom.md":"bfc32ff5","api_modules_lib_vue-textarea-autosize.md":"a92591ec","guide_advanced-concepts_dynamic-layers.md":"9ec766d2","api_modules_features_challenge.md":"bd858f4a","guide_important-concepts_features.md":"b922ebcf","guide_important-concepts_persistence.md":"8c085a8c","guide_important-concepts_reactivity.md":"6a2d1084","guide_important-concepts_requirements.md":"9e8fd070","api_modules_features_bar.md":"9604d286","guide_index.md":"a9606b78","guide_migrations_0-6.md":"575646c4","api_modules_features_grid.md":"ffe71f11","guide_recipes_particles.md":"72bcff9c","guide_recipes_prestige.md":"ea2e4e7b","api_modules_features_infobox.md":"90113df9","guide_recipes_save-progress.md":"4d79827f","api_modules_game_modifiers.md":"f8a2c59e","api_modules_game_layers.md":"4ab34e80","api_modules_util_computed.md":"ba2689a0","api_modules_util_vue.md":"e8d7d97d","api_modules_game_persistence.md":"b82aac95","api_modules_game_notifications.md":"9a314c38","guide_important-concepts_formulas.md":"63bf13f7","api_modules_features_board.md":"31b80d8b","api_modules_features_feature.md":"4e98e178","api_modules_features_hotkey.md":"3577c6d9","api_modules_game_formulas_operations.md":"e8e4806b","api_modules_features_clickable.md":"d29a69c7","api_modules_features_tabs_tab.md":"b0d897cf","api_modules_features_decorators_bonusdecorator.md":"64718150","api_modules_features_decorators_common.md":"67d252c2","api_modules_features_links.md":"26fc907d","api_modules_features_conversion.md":"970ccc3a","guide_advanced-concepts_nodes.md":"92611da2","api_modules_features_repeatable.md":"e63148c4","api_modules_features_reset.md":"4c6103be","api_modules_features_resource.md":"8ae1f501","api_modules_game_events.md":"a9031949","api_modules_util_proxies.md":"92fedcf7","guide_advanced-concepts_creating-features.md":"88ee9059","guide_creating-your-project_changelog.md":"d8a46ee2","api_modules_util_common.md":"79f6c939","guide_important-concepts_coercable.md":"4ac1576c","api_overview.md":"88cceb38","guide_getting-started_examples.md":"8f3101eb","api_modules_features_particles.md":"299b8355","api_modules_game_formulas_formulas.md":"a85fa039","guide_creating-your-project_project-entry.md":"58e6fdcf","guide_getting-started_setup.md":"f1d88449","index.md":"d8bea653","guide_getting-started_updating.md":"ec3df0e8","guide_important-concepts_layers.md":"ca5bd4ed"} diff --git a/index.html b/index.html index 9e9166d8..eadd57eb 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - + @@ -22,7 +22,7 @@
Skip to content

Profectus

A game engine that grows with you

Starts at your skill level and encourages your ambition to make your projects bigger and better.

Easy to Use

Everything is written to be as intuitive to use as possible, through consistent design.

Helpful

Built with TypeScript to guide you as you write. Seamlessly deploy your project with pre-configured github workflows, and more.

Incremental

Designed to actively encourage you to become better at programming. The engine will never limit you.

-