Deploying to gh-pages from @ profectus-engine/profectus-docs@61aef9c667 🚀
This commit is contained in:
parent
04e4a076a3
commit
7af7f29598
154 changed files with 202 additions and 202 deletions
2
404.html
2
404.html
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
|
@ -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":1682351002000}'),o={name:"guide/advanced-concepts/dynamic-layers.md"},l=n(`<h1 id="dynamic-layers" tabindex="-1">Dynamic Layers <a class="header-anchor" href="#dynamic-layers" aria-label="Permalink to "Dynamic Layers""></a></h1><p>You can dynamically add and remove layers using the <a href="/api/modules/game/layers#addlayer">addLayer</a> and <a href="/api/modules/game/layers#removelayer">removeLayer</a> 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 <a href="/api/modules/game/layers#reloadlayer">reloadLayer</a> function.</p><p>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:</p><div class="language-ts"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#C792EA;">function</span><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">getDynLayer</span><span style="color:#89DDFF;">(</span><span style="color:#A6ACCD;font-style:italic;">id</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">string</span><span style="color:#89DDFF;">):</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">DynamicLayer</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
|
||||
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":1684239242000}'),o={name:"guide/advanced-concepts/dynamic-layers.md"},l=n(`<h1 id="dynamic-layers" tabindex="-1">Dynamic Layers <a class="header-anchor" href="#dynamic-layers" aria-label="Permalink to "Dynamic Layers""></a></h1><p>You can dynamically add and remove layers using the <a href="/api/modules/game/layers#addlayer">addLayer</a> and <a href="/api/modules/game/layers#removelayer">removeLayer</a> 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 <a href="/api/modules/game/layers#reloadlayer">reloadLayer</a> function.</p><p>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:</p><div class="language-ts"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#C792EA;">function</span><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">getDynLayer</span><span style="color:#89DDFF;">(</span><span style="color:#A6ACCD;font-style:italic;">id</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">string</span><span style="color:#89DDFF;">):</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">DynamicLayer</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
|
||||
<span class="line"><span style="color:#F07178;"> </span><span style="color:#C792EA;">const</span><span style="color:#F07178;"> </span><span style="color:#A6ACCD;">layer</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">=</span><span style="color:#F07178;"> </span><span style="color:#A6ACCD;">layers</span><span style="color:#F07178;">[</span><span style="color:#A6ACCD;">id</span><span style="color:#F07178;">]</span><span style="color:#89DDFF;">;</span></span>
|
||||
<span class="line"><span style="color:#F07178;"> </span><span style="color:#89DDFF;font-style:italic;">if</span><span style="color:#F07178;"> (</span><span style="color:#89DDFF;">!</span><span style="color:#A6ACCD;">layer</span><span style="color:#F07178;">) </span><span style="color:#89DDFF;font-style:italic;">throw</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">"</span><span style="color:#C3E88D;">Layer does not exist</span><span style="color:#89DDFF;">"</span><span style="color:#89DDFF;">;</span></span>
|
||||
<span class="line"><span style="color:#F07178;"> </span><span style="color:#89DDFF;font-style:italic;">return</span><span style="color:#F07178;"> </span><span style="color:#A6ACCD;">layer</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;font-style:italic;">as</span><span style="color:#F07178;"> </span><span style="color:#FFCB6B;">DynamicLayer</span><span style="color:#89DDFF;">;</span><span style="color:#F07178;"> </span><span style="color:#676E95;font-style:italic;">// you might need an "as unknown" after layer</span></span>
|
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
|
@ -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":1682351002000}'),l={name:"guide/advanced-concepts/nodes.md"},e=o(`<h1 id="nodes" tabindex="-1">Nodes <a class="header-anchor" href="#nodes" aria-label="Permalink to "Nodes""></a></h1><p>Features rendered in the DOM should include a <code>Node</code> component, which registers itself to the nearest <code>Context</code> component (usually within the <code>Layer</code>'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 <code>id</code> property within <code>layer.nodes</code>, provided it currently exists.</p><p>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 <code>layer.nodes</code> to get a node's bounding rect and then placing a particle effect using it. Here's an example from Kronos:</p><div class="language-ts"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#C792EA;">const</span><span style="color:#A6ACCD;"> particlesEmitter </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">ref</span><span style="color:#A6ACCD;">(particles</span><span style="color:#89DDFF;">.</span><span style="color:#82AAFF;">addEmitter</span><span style="color:#A6ACCD;">(element</span><span style="color:#89DDFF;">.</span><span style="color:#A6ACCD;">particlesConfig))</span><span style="color:#89DDFF;">;</span></span>
|
||||
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":1684239242000}'),l={name:"guide/advanced-concepts/nodes.md"},e=o(`<h1 id="nodes" tabindex="-1">Nodes <a class="header-anchor" href="#nodes" aria-label="Permalink to "Nodes""></a></h1><p>Features rendered in the DOM should include a <code>Node</code> component, which registers itself to the nearest <code>Context</code> component (usually within the <code>Layer</code>'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 <code>id</code> property within <code>layer.nodes</code>, provided it currently exists.</p><p>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 <code>layer.nodes</code> to get a node's bounding rect and then placing a particle effect using it. Here's an example from Kronos:</p><div class="language-ts"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#C792EA;">const</span><span style="color:#A6ACCD;"> particlesEmitter </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">ref</span><span style="color:#A6ACCD;">(particles</span><span style="color:#89DDFF;">.</span><span style="color:#82AAFF;">addEmitter</span><span style="color:#A6ACCD;">(element</span><span style="color:#89DDFF;">.</span><span style="color:#A6ACCD;">particlesConfig))</span><span style="color:#89DDFF;">;</span></span>
|
||||
<span class="line"><span style="color:#C792EA;">const</span><span style="color:#A6ACCD;"> updateParticleEffect </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> </span><span style="color:#C792EA;">async</span><span style="color:#A6ACCD;"> ([shouldEmit</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;"> rect</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;"> boundingRect]</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> [</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">boolean</span><span style="color:#89DDFF;">,</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">DOMRect</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">|</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">undefined</span><span style="color:#89DDFF;">,</span></span>
|
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
|
@ -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":1682351002000}'),l={name:"guide/creating-your-project/changelog.md"},o=e(`<h1 id="changelog" tabindex="-1">Changelog <a class="header-anchor" href="#changelog" aria-label="Permalink to "Changelog""></a></h1><p>This is a Vue component stored at <code>/src/data/Changelog.vue</code> 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 <code><details></code> elements for each new major release, and mark the most recent one as <code>open</code> by default. It is strongly advised to not change any of the code relating to making the changelog appear in a modal.</p><p>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:</p><div class="language-html"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;"><</span><span style="color:#F07178;">details</span><span style="color:#89DDFF;"> </span><span style="color:#C792EA;">open</span><span style="color:#89DDFF;">></span></span>
|
||||
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":1684239242000}'),l={name:"guide/creating-your-project/changelog.md"},o=e(`<h1 id="changelog" tabindex="-1">Changelog <a class="header-anchor" href="#changelog" aria-label="Permalink to "Changelog""></a></h1><p>This is a Vue component stored at <code>/src/data/Changelog.vue</code> 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 <code><details></code> elements for each new major release, and mark the most recent one as <code>open</code> by default. It is strongly advised to not change any of the code relating to making the changelog appear in a modal.</p><p>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:</p><div class="language-html"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;"><</span><span style="color:#F07178;">details</span><span style="color:#89DDFF;"> </span><span style="color:#C792EA;">open</span><span style="color:#89DDFF;">></span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;"><</span><span style="color:#F07178;">summary</span><span style="color:#89DDFF;">></span><span style="color:#A6ACCD;">v0.0 Initial Commit - </span><span style="color:#89DDFF;"><</span><span style="color:#F07178;">time</span><span style="color:#89DDFF;">></span><span style="color:#A6ACCD;">2021-09-04</span><span style="color:#89DDFF;"></</span><span style="color:#F07178;">time</span><span style="color:#89DDFF;">></</span><span style="color:#F07178;">summary</span><span style="color:#89DDFF;">></span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;"> This is the first release :D</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;"><</span><span style="color:#F07178;">ul</span><span style="color:#89DDFF;">></span></span>
|
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
|
@ -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":1682351002000}'),s={name:"guide/creating-your-project/project-entry.md"},r=o('<h1 id="project-entry" tabindex="-1">Project Entry <a class="header-anchor" href="#project-entry" aria-label="Permalink to "Project Entry""></a></h1><p>This is a TypeScript file containing the non-static parts of your project, and acts as the entry point for it.</p><p>It is stored at <code>/src/data/projEntry.jsx</code>.</p><p>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 <code>common.tsx</code>, which exists next to <code>projEntry.tsx</code>.</p><h2 id="required-exports" tabindex="-1">Required Exports <a class="header-anchor" href="#required-exports" aria-label="Permalink to "Required Exports""></a></h2><h3 id="getinitiallayers" tabindex="-1">getInitialLayers <a class="header-anchor" href="#getinitiallayers" aria-label="Permalink to "getInitialLayers""></a></h3><ul><li>Type: <code>(player: Partial<PlayerData>) => GenericLayer[]</code></li></ul><p>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.</p><h3 id="haswon" tabindex="-1">hasWon <a class="header-anchor" href="#haswon" aria-label="Permalink to "hasWon""></a></h3><ul><li>Type: <code>ComputedRef<boolean></code></li></ul><p>A computed ref whose value is true whenever the game is over.</p><p>For example, in a game where the goal is to have a resource reach 10:</p><div class="language-ts"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;font-style:italic;">export</span><span style="color:#A6ACCD;"> </span><span style="color:#C792EA;">const</span><span style="color:#A6ACCD;"> hasWon </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">computed</span><span style="color:#A6ACCD;">(</span><span style="color:#89DDFF;">()</span><span style="color:#A6ACCD;"> </span><span style="color:#C792EA;">=></span><span style="color:#A6ACCD;"> Decimal</span><span style="color:#89DDFF;">.</span><span style="color:#82AAFF;">gte</span><span style="color:#A6ACCD;">(resource</span><span style="color:#89DDFF;">.</span><span style="color:#A6ACCD;">value</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">10</span><span style="color:#A6ACCD;">))</span><span style="color:#89DDFF;">;</span></span></code></pre></div><h3 id="fixoldsave" tabindex="-1">fixOldSave <a class="header-anchor" href="#fixoldsave" aria-label="Permalink to "fixOldSave""></a></h3><ul><li>Type: <code>(oldVersion: string | undefined, player: Partial<PlayerData>) => void</code></li></ul><p>This function will be run whenever a save is loaded that has a different version than the one in <a href="./project-info#versionnumber">project info</a>. It will be given the old version number, and the player save data object currently being loaded.</p><p>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.</p>',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":1684239242000}'),s={name:"guide/creating-your-project/project-entry.md"},r=o('<h1 id="project-entry" tabindex="-1">Project Entry <a class="header-anchor" href="#project-entry" aria-label="Permalink to "Project Entry""></a></h1><p>This is a TypeScript file containing the non-static parts of your project, and acts as the entry point for it.</p><p>It is stored at <code>/src/data/projEntry.jsx</code>.</p><p>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 <code>common.tsx</code>, which exists next to <code>projEntry.tsx</code>.</p><h2 id="required-exports" tabindex="-1">Required Exports <a class="header-anchor" href="#required-exports" aria-label="Permalink to "Required Exports""></a></h2><h3 id="getinitiallayers" tabindex="-1">getInitialLayers <a class="header-anchor" href="#getinitiallayers" aria-label="Permalink to "getInitialLayers""></a></h3><ul><li>Type: <code>(player: Partial<PlayerData>) => GenericLayer[]</code></li></ul><p>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.</p><h3 id="haswon" tabindex="-1">hasWon <a class="header-anchor" href="#haswon" aria-label="Permalink to "hasWon""></a></h3><ul><li>Type: <code>ComputedRef<boolean></code></li></ul><p>A computed ref whose value is true whenever the game is over.</p><p>For example, in a game where the goal is to have a resource reach 10:</p><div class="language-ts"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;font-style:italic;">export</span><span style="color:#A6ACCD;"> </span><span style="color:#C792EA;">const</span><span style="color:#A6ACCD;"> hasWon </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">computed</span><span style="color:#A6ACCD;">(</span><span style="color:#89DDFF;">()</span><span style="color:#A6ACCD;"> </span><span style="color:#C792EA;">=></span><span style="color:#A6ACCD;"> Decimal</span><span style="color:#89DDFF;">.</span><span style="color:#82AAFF;">gte</span><span style="color:#A6ACCD;">(resource</span><span style="color:#89DDFF;">.</span><span style="color:#A6ACCD;">value</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">10</span><span style="color:#A6ACCD;">))</span><span style="color:#89DDFF;">;</span></span></code></pre></div><h3 id="fixoldsave" tabindex="-1">fixOldSave <a class="header-anchor" href="#fixoldsave" aria-label="Permalink to "fixOldSave""></a></h3><ul><li>Type: <code>(oldVersion: string | undefined, player: Partial<PlayerData>) => void</code></li></ul><p>This function will be run whenever a save is loaded that has a different version than the one in <a href="./project-info#versionnumber">project info</a>. It will be given the old version number, and the player save data object currently being loaded.</p><p>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.</p>',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};
|
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
File diff suppressed because one or more lines are too long
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
|
@ -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":1682351002000}'),i={name:"guide/creating-your-project/themes.md"},s=o('<h1 id="themes" tabindex="-1">Themes <a class="header-anchor" href="#themes" aria-label="Permalink to "Themes""></a></h1><p>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 <a href="#theme-options">below</a>.</p><p>They are stored in <code>/src/data/themes.ts</code>.</p><h2 id="modifying-themes" tabindex="-1">Modifying Themes <a class="header-anchor" href="#modifying-themes" aria-label="Permalink to "Modifying Themes""></a></h2><p>You can add a theme by adding a property to the <code>Themes</code> 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.</p><p>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.</p><p>If you'd like to change which theme is the default, you may modify the initial player settings object in the <code>/src/game/settings.ts</code> file. Keep in mind you'll also want to change it in the <code>hardResetSettings</code> function in the same file.</p><h2 id="theme-options" tabindex="-1">Theme Options <a class="header-anchor" href="#theme-options" aria-label="Permalink to "Theme Options""></a></h2><h3 id="floatingtabs" tabindex="-1">floatingTabs <a class="header-anchor" href="#floatingtabs" aria-label="Permalink to "floatingTabs""></a></h3><ul><li>Type: <code>boolean</code></li></ul><p>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.</p><h3 id="mergeadjacent" tabindex="-1">mergeAdjacent <a class="header-anchor" href="#mergeadjacent" aria-label="Permalink to "mergeAdjacent""></a></h3><ul><li>Type: <code>boolean</code></li></ul><p>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.</p><p>Currently, this can only merge in a single dimension. Rows of columns or columns of rows will not merge into a single rectangular object.</p>',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":1684239242000}'),i={name:"guide/creating-your-project/themes.md"},s=o('<h1 id="themes" tabindex="-1">Themes <a class="header-anchor" href="#themes" aria-label="Permalink to "Themes""></a></h1><p>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 <a href="#theme-options">below</a>.</p><p>They are stored in <code>/src/data/themes.ts</code>.</p><h2 id="modifying-themes" tabindex="-1">Modifying Themes <a class="header-anchor" href="#modifying-themes" aria-label="Permalink to "Modifying Themes""></a></h2><p>You can add a theme by adding a property to the <code>Themes</code> 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.</p><p>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.</p><p>If you'd like to change which theme is the default, you may modify the initial player settings object in the <code>/src/game/settings.ts</code> file. Keep in mind you'll also want to change it in the <code>hardResetSettings</code> function in the same file.</p><h2 id="theme-options" tabindex="-1">Theme Options <a class="header-anchor" href="#theme-options" aria-label="Permalink to "Theme Options""></a></h2><h3 id="floatingtabs" tabindex="-1">floatingTabs <a class="header-anchor" href="#floatingtabs" aria-label="Permalink to "floatingTabs""></a></h3><ul><li>Type: <code>boolean</code></li></ul><p>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.</p><h3 id="mergeadjacent" tabindex="-1">mergeAdjacent <a class="header-anchor" href="#mergeadjacent" aria-label="Permalink to "mergeAdjacent""></a></h3><ul><li>Type: <code>boolean</code></li></ul><p>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.</p><p>Currently, this can only merge in a single dimension. Rows of columns or columns of rows will not merge into a single rectangular object.</p>',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};
|
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
|
@ -1 +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 M=JSON.parse('{"title":"Example Projects","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/examples.md","lastUpdated":1682351002000}'),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),d={id:"kronos",tabindex:"-1"},p=e("a",{class:"header-anchor",href:"#kronos","aria-label":'Permalink to "Kronos <Badge type="tip" text="Profectus 0.6" />"'},"",-1),h=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/kronos/",target:"_blank",rel:"noreferrer"},"View Source")],-1),m=e("p",null,"This is a project that's still under development, but is a good resource for things like implementing custom features.",-1),_={id:"advent-incremental",tabindex:"-1"},f=e("a",{class:"header-anchor",href:"#advent-incremental","aria-label":'Permalink to "Advent Incremental <Badge type="warning" text="Profectus 0.5" />"'},"",-1),g=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),u=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),b={id:"primordia",tabindex:"-1"},x=e("a",{class:"header-anchor",href:"#primordia","aria-label":'Permalink to "Primordia <Badge type="warning" text="Profectus 0.5" />"'},"",-1),P=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),k=e("p",null,'A "The Prestige Tree" style incremental game, developed by the original creator of TPT.',-1),T={id:"tmt-demo",tabindex:"-1"},w=e("a",{class:"header-anchor",href:"#tmt-demo","aria-label":'Permalink to "TMT-Demo <Badge type="tip" text="Profectus 0.6" />"'},"",-1),v=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),y=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 j(V,B,A,D,S,E){const r=i("Badge");return s(),n("div",null,[c,e("h2",d,[t("Kronos "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),p]),h,m,e("h2",_,[t("Advent Incremental "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),f]),g,u,e("h2",b,[t("Primordia "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),x]),P,k,e("h2",T,[t("TMT-Demo "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),w]),v,y])}const N=o(l,[["render",j]]);export{M as __pageData,N as default};
|
||||
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 M=JSON.parse('{"title":"Example Projects","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/examples.md","lastUpdated":1684239242000}'),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),d={id:"kronos",tabindex:"-1"},p=e("a",{class:"header-anchor",href:"#kronos","aria-label":'Permalink to "Kronos <Badge type="tip" text="Profectus 0.6" />"'},"",-1),h=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/kronos/",target:"_blank",rel:"noreferrer"},"View Source")],-1),m=e("p",null,"This is a project that's still under development, but is a good resource for things like implementing custom features.",-1),_={id:"advent-incremental",tabindex:"-1"},f=e("a",{class:"header-anchor",href:"#advent-incremental","aria-label":'Permalink to "Advent Incremental <Badge type="warning" text="Profectus 0.5" />"'},"",-1),g=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),u=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),b={id:"primordia",tabindex:"-1"},x=e("a",{class:"header-anchor",href:"#primordia","aria-label":'Permalink to "Primordia <Badge type="warning" text="Profectus 0.5" />"'},"",-1),P=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),k=e("p",null,'A "The Prestige Tree" style incremental game, developed by the original creator of TPT.',-1),T={id:"tmt-demo",tabindex:"-1"},w=e("a",{class:"header-anchor",href:"#tmt-demo","aria-label":'Permalink to "TMT-Demo <Badge type="tip" text="Profectus 0.6" />"'},"",-1),v=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),y=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 j(V,B,A,D,S,E){const r=i("Badge");return s(),n("div",null,[c,e("h2",d,[t("Kronos "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),p]),h,m,e("h2",_,[t("Advent Incremental "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),f]),g,u,e("h2",b,[t("Primordia "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),x]),P,k,e("h2",T,[t("TMT-Demo "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),w]),v,y])}const N=o(l,[["render",j]]);export{M as __pageData,N as default};
|
|
@ -1 +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 M=JSON.parse('{"title":"Example Projects","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/examples.md","lastUpdated":1682351002000}'),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),d={id:"kronos",tabindex:"-1"},p=e("a",{class:"header-anchor",href:"#kronos","aria-label":'Permalink to "Kronos <Badge type="tip" text="Profectus 0.6" />"'},"",-1),h=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/kronos/",target:"_blank",rel:"noreferrer"},"View Source")],-1),m=e("p",null,"This is a project that's still under development, but is a good resource for things like implementing custom features.",-1),_={id:"advent-incremental",tabindex:"-1"},f=e("a",{class:"header-anchor",href:"#advent-incremental","aria-label":'Permalink to "Advent Incremental <Badge type="warning" text="Profectus 0.5" />"'},"",-1),g=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),u=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),b={id:"primordia",tabindex:"-1"},x=e("a",{class:"header-anchor",href:"#primordia","aria-label":'Permalink to "Primordia <Badge type="warning" text="Profectus 0.5" />"'},"",-1),P=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),k=e("p",null,'A "The Prestige Tree" style incremental game, developed by the original creator of TPT.',-1),T={id:"tmt-demo",tabindex:"-1"},w=e("a",{class:"header-anchor",href:"#tmt-demo","aria-label":'Permalink to "TMT-Demo <Badge type="tip" text="Profectus 0.6" />"'},"",-1),v=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),y=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 j(V,B,A,D,S,E){const r=i("Badge");return s(),n("div",null,[c,e("h2",d,[t("Kronos "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),p]),h,m,e("h2",_,[t("Advent Incremental "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),f]),g,u,e("h2",b,[t("Primordia "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),x]),P,k,e("h2",T,[t("TMT-Demo "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),w]),v,y])}const N=o(l,[["render",j]]);export{M as __pageData,N as default};
|
||||
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 M=JSON.parse('{"title":"Example Projects","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started/examples.md","lastUpdated":1684239242000}'),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),d={id:"kronos",tabindex:"-1"},p=e("a",{class:"header-anchor",href:"#kronos","aria-label":'Permalink to "Kronos <Badge type="tip" text="Profectus 0.6" />"'},"",-1),h=e("p",null,[e("a",{href:"https://github.com/thepaperpilot/kronos/",target:"_blank",rel:"noreferrer"},"View Source")],-1),m=e("p",null,"This is a project that's still under development, but is a good resource for things like implementing custom features.",-1),_={id:"advent-incremental",tabindex:"-1"},f=e("a",{class:"header-anchor",href:"#advent-incremental","aria-label":'Permalink to "Advent Incremental <Badge type="warning" text="Profectus 0.5" />"'},"",-1),g=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),u=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),b={id:"primordia",tabindex:"-1"},x=e("a",{class:"header-anchor",href:"#primordia","aria-label":'Permalink to "Primordia <Badge type="warning" text="Profectus 0.5" />"'},"",-1),P=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),k=e("p",null,'A "The Prestige Tree" style incremental game, developed by the original creator of TPT.',-1),T={id:"tmt-demo",tabindex:"-1"},w=e("a",{class:"header-anchor",href:"#tmt-demo","aria-label":'Permalink to "TMT-Demo <Badge type="tip" text="Profectus 0.6" />"'},"",-1),v=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),y=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 j(V,B,A,D,S,E){const r=i("Badge");return s(),n("div",null,[c,e("h2",d,[t("Kronos "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),p]),h,m,e("h2",_,[t("Advent Incremental "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),f]),g,u,e("h2",b,[t("Primordia "),a(r,{type:"warning",text:"Profectus 0.5"}),t(),x]),P,k,e("h2",T,[t("TMT-Demo "),a(r,{type:"tip",text:"Profectus 0.6"}),t(),w]),v,y])}const N=o(l,[["render",j]]);export{M as __pageData,N as default};
|
|
@ -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":1682351002000}'),o={name:"guide/getting-started/first-layer.md"},l=e(`<h1 id="your-first-layer" tabindex="-1">Your First Layer <a class="header-anchor" href="#your-first-layer" aria-label="Permalink to "Your First Layer""></a></h1><p>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.</p><h2 id="creating-the-layer" tabindex="-1">Creating the layer <a class="header-anchor" href="#creating-the-layer" aria-label="Permalink to "Creating the layer""></a></h2><div class="info custom-block"><p class="custom-block-title">INFO</p><p>The template comes with a layer in <code>projEntry.tsx</code> and another in <code>prestige.tsx</code>. You can use those as a base instead of creating a new one from scratch.</p></div><p>To add a new layer, first create it via the <a href="./../../api/modules/game/layers#createlayer">createLayer</a> function. You typically create a single layer per file, the first being in <code>projEntry</code>. After it is created, you'll need to add it to the returned array in <a href="./../../api/modules/data/projEntry#getinitiallayers">getInitialLayers</a>.</p><p>The <code>createLayer</code> function will need a unique ID for your layer and a function that constructs the layer. At a minimum, it needs a <code>display</code> property so Profectus knows what to render. It will look something like this:</p><div class="language-ts"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#C792EA;">const</span><span style="color:#A6ACCD;"> id </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">"</span><span style="color:#C3E88D;">p</span><span style="color:#89DDFF;">"</span><span style="color:#89DDFF;">;</span></span>
|
||||
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":1684239242000}'),o={name:"guide/getting-started/first-layer.md"},l=e(`<h1 id="your-first-layer" tabindex="-1">Your First Layer <a class="header-anchor" href="#your-first-layer" aria-label="Permalink to "Your First Layer""></a></h1><p>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.</p><h2 id="creating-the-layer" tabindex="-1">Creating the layer <a class="header-anchor" href="#creating-the-layer" aria-label="Permalink to "Creating the layer""></a></h2><div class="info custom-block"><p class="custom-block-title">INFO</p><p>The template comes with a layer in <code>projEntry.tsx</code> and another in <code>prestige.tsx</code>. You can use those as a base instead of creating a new one from scratch.</p></div><p>To add a new layer, first create it via the <a href="./../../api/modules/game/layers#createlayer">createLayer</a> function. You typically create a single layer per file, the first being in <code>projEntry</code>. After it is created, you'll need to add it to the returned array in <a href="./../../api/modules/data/projEntry#getinitiallayers">getInitialLayers</a>.</p><p>The <code>createLayer</code> function will need a unique ID for your layer and a function that constructs the layer. At a minimum, it needs a <code>display</code> property so Profectus knows what to render. It will look something like this:</p><div class="language-ts"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#C792EA;">const</span><span style="color:#A6ACCD;"> id </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">"</span><span style="color:#C3E88D;">p</span><span style="color:#89DDFF;">"</span><span style="color:#89DDFF;">;</span></span>
|
||||
<span class="line"><span style="color:#C792EA;">const</span><span style="color:#A6ACCD;"> layer </span><span style="color:#89DDFF;">=</span><span style="color:#A6ACCD;"> </span><span style="color:#82AAFF;">createLayer</span><span style="color:#A6ACCD;">(id</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;"> </span><span style="color:#C792EA;">function</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">(</span><span style="color:#89DDFF;font-style:italic;">this</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">BaseLayer</span><span style="color:#89DDFF;">)</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
|
||||
<span class="line"><span style="color:#F07178;"> </span><span style="color:#89DDFF;font-style:italic;">return</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">{</span></span>
|
||||
<span class="line"><span style="color:#F07178;"> display</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#82AAFF;">jsx</span><span style="color:#F07178;">(</span><span style="color:#89DDFF;">()</span><span style="color:#F07178;"> </span><span style="color:#C792EA;">=></span><span style="color:#F07178;"> <></span><span style="color:#A6ACCD;">My</span><span style="color:#F07178;"> </span><span style="color:#A6ACCD;">layer</span><span style="color:#89DDFF;"></></span><span style="color:#F07178;">)</span></span>
|
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
File diff suppressed because one or more lines are too long
1
assets/guide_getting-started_setup.md.ef62b340.js
Normal file
1
assets/guide_getting-started_setup.md.ef62b340.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -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":1682351002000}'),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":1684239242000}'),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};
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue