Deploying to gh-pages from @ profectus-engine/profectus-docs@ce3adae873 🚀
This commit is contained in:
parent
512e5e5209
commit
a854c97d15
50 changed files with 268 additions and 75 deletions
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
import{_ as a,c as n,o as s,a as t}from"./app.1f0d41ed.js";const h='{"title":"Changelog","description":"","frontmatter":{},"headers":[],"relativePath":"guide/changelog.md"}',e={},o=t(`<h1 id="changelog" tabindex="-1">Changelog <a class="header-anchor" href="#changelog" aria-hidden="true">#</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"><pre><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>details</span> <span class="token attr-name">open</span><span class="token punctuation">></span></span>
|
||||
import{_ as a,c as n,o as s,a as t}from"./app.829490d2.js";const h='{"title":"Changelog","description":"","frontmatter":{},"headers":[],"relativePath":"guide/changelog.md"}',e={},o=t(`<h1 id="changelog" tabindex="-1">Changelog <a class="header-anchor" href="#changelog" aria-hidden="true">#</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"><pre><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>details</span> <span class="token attr-name">open</span><span class="token punctuation">></span></span>
|
||||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>summary</span><span class="token punctuation">></span></span>v0.0 Initial Commit - <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>time</span><span class="token punctuation">></span></span>2021-09-04<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>time</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>summary</span><span class="token punctuation">></span></span>
|
||||
This is the first release :D
|
||||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>ul</span><span class="token punctuation">></span></span>
|
|
@ -1 +1 @@
|
|||
import{_ as a,c as n,o as s,a as t}from"./app.1f0d41ed.js";const h='{"title":"Changelog","description":"","frontmatter":{},"headers":[],"relativePath":"guide/changelog.md"}',e={},o=t("",6),p=[o];function c(l,u,i,k,g,r){return s(),n("div",null,p)}var m=a(e,[["render",c]]);export{h as __pageData,m as default};
|
||||
import{_ as a,c as n,o as s,a as t}from"./app.829490d2.js";const h='{"title":"Changelog","description":"","frontmatter":{},"headers":[],"relativePath":"guide/changelog.md"}',e={},o=t("",6),p=[o];function c(l,u,i,k,g,r){return s(),n("div",null,p)}var m=a(e,[["render",c]]);export{h as __pageData,m as default};
|
10
assets/guide_coercable.md.c51dac2d.js
Normal file
10
assets/guide_coercable.md.c51dac2d.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import{_ as e,c as n,o as a,a as t}from"./app.829490d2.js";const f='{"title":"Coercable Components","description":"","frontmatter":{},"headers":[{"level":2,"title":"Template Strings","slug":"template-strings"},{"level":2,"title":"Render Functions (JSX)","slug":"render-functions-jsx"},{"level":2,"title":"Components","slug":"components"}],"relativePath":"guide/coercable.md"}',s={},o=t(`<h1 id="coercable-components" tabindex="-1">Coercable Components <a class="header-anchor" href="#coercable-components" aria-hidden="true">#</a></h1><p>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</p><h2 id="template-strings" tabindex="-1">Template Strings <a class="header-anchor" href="#template-strings" aria-hidden="true">#</a></h2><p>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.</p><p>Template strings need to be wrapped in some HTML element. By default, they'll be wrapped in a <code><span></code> element, although certain features may wrap things in div or header elements instead, as appropriate.</p><h2 id="render-functions-jsx" tabindex="-1">Render Functions (JSX) <a class="header-anchor" href="#render-functions-jsx" aria-hidden="true">#</a></h2><p>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 <a href="https://v2.vuejs.org/v2/guide/render-function.html" target="_blank" rel="noopener noreferrer">Render Functions & JSX</a>. Note that JSX must be returned in a function - it does not work "standalone". The CoercableComponent type will enforce this for you.</p><p>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 <code>render</code> features (either as their own or in a layout via <code>renderRow</code> and <code>renderCol</code>), so you don't need to import the Vue component for every feature you plan on using.</p><p>Typically a feature will accept a <code>Computable<CoercableComponent></code>, which means functions would (normally) be wrapped in a computed (see <a href="./reactivity.html#computable">Computable</a> 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 <code>jsx</code> function to mark a function for you.</p><h4 id="example" tabindex="-1">Example <a class="header-anchor" href="#example" aria-hidden="true">#</a></h4><div class="language-ts"><pre><code><span class="token punctuation">{</span>
|
||||
display<span class="token operator">:</span> <span class="token function">jsx</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">(</span>
|
||||
<span class="token operator"><</span><span class="token operator">></span>
|
||||
<span class="token operator"><</span>MainDisplay resource<span class="token operator">=</span><span class="token punctuation">{</span>points<span class="token punctuation">}</span> color<span class="token operator">=</span><span class="token punctuation">{</span>color<span class="token punctuation">}</span> <span class="token operator">/</span><span class="token operator">></span>
|
||||
<span class="token punctuation">{</span><span class="token function">render</span><span class="token punctuation">(</span>resetButton<span class="token punctuation">)</span><span class="token punctuation">}</span>
|
||||
<span class="token punctuation">{</span><span class="token function">renderRow</span><span class="token punctuation">(</span>upgrade1<span class="token punctuation">,</span> upgrade2<span class="token punctuation">,</span> upgrade3<span class="token punctuation">)</span><span class="token punctuation">}</span>
|
||||
<span class="token operator"><</span><span class="token operator">/</span><span class="token operator">></span>
|
||||
<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
|
||||
<span class="token punctuation">}</span>
|
||||
</code></pre></div><h2 id="components" tabindex="-1">Components <a class="header-anchor" href="#components" aria-hidden="true">#</a></h2><p>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 <a href="https://vuejs.org/guide/essentials/component-basics.html" target="_blank" rel="noopener noreferrer">Components Basics</a>.</p>`,13),p=[o];function r(i,c,l,u,d,h){return a(),n("div",null,p)}var g=e(s,[["render",r]]);export{f as __pageData,g as default};
|
1
assets/guide_coercable.md.c51dac2d.lean.js
Normal file
1
assets/guide_coercable.md.c51dac2d.lean.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as n,o as a,a as t}from"./app.829490d2.js";const f='{"title":"Coercable Components","description":"","frontmatter":{},"headers":[{"level":2,"title":"Template Strings","slug":"template-strings"},{"level":2,"title":"Render Functions (JSX)","slug":"render-functions-jsx"},{"level":2,"title":"Components","slug":"components"}],"relativePath":"guide/coercable.md"}',s={},o=t("",13),p=[o];function r(i,c,l,u,d,h){return a(),n("div",null,p)}var g=e(s,[["render",r]]);export{f as __pageData,g as default};
|
1
assets/guide_creating-features.md.54db17fd.js
Normal file
1
assets/guide_creating-features.md.54db17fd.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as t,o as a,a as o}from"./app.829490d2.js";const f='{"title":"Creating Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-features.md"}',i={},n=o('<h1 id="creating-features" tabindex="-1">Creating Features <a class="header-anchor" href="#creating-features" aria-hidden="true">#</a></h1><p># TODO</p><p>Because typescript does not emit JS, if a value is supposed to be a function it is impossible to determine if a given function is 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 <code>Computable<Function></code>s, and all functions <em>will</em> be wrapped in <code>computed</code>. The notable exception to this is <a href="./coercable.html#http://localhost:3000/guide/coercable.html#render-functions-jsx">JSX</a>, which uses a utility function to mark that a function should not be wrapped.</p>',3),r=[n];function s(c,d,u,l,p,h){return a(),t("div",null,r)}var m=e(i,[["render",s]]);export{f as __pageData,m as default};
|
1
assets/guide_creating-features.md.54db17fd.lean.js
Normal file
1
assets/guide_creating-features.md.54db17fd.lean.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as t,o as a,a as o}from"./app.829490d2.js";const f='{"title":"Creating Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/creating-features.md"}',i={},n=o("",3),r=[n];function s(c,d,u,l,p,h){return a(),t("div",null,r)}var m=e(i,[["render",s]]);export{f as __pageData,m as default};
|
11
assets/guide_features.md.b232f081.js
Normal file
11
assets/guide_features.md.b232f081.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import{_ as e,c as a,o as n,a as s}from"./app.829490d2.js";const f='{"title":"Features","description":"","frontmatter":{},"headers":[{"level":2,"title":"Tree Shaking","slug":"tree-shaking"}],"relativePath":"guide/features.md"}',t={},o=s(`<h1 id="features" tabindex="-1">Features <a class="header-anchor" href="#features" aria-hidden="true">#</a></h1><p>A <a href="./layers.html">layer</a> 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.</p><p>To create a feature, the feature type will have one or more functions to help you. They'll typically look something like this:</p><div class="language-ts"><pre><code><span class="token keyword">const</span> addGainUpgrade <span class="token operator">=</span> <span class="token function">createUpgrade</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">(</span><span class="token punctuation">{</span>
|
||||
display<span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||
title<span class="token operator">:</span> <span class="token string">"Generator of Genericness"</span><span class="token punctuation">,</span>
|
||||
description<span class="token operator">:</span> <span class="token string">"Gain 1 point every second"</span>
|
||||
<span class="token punctuation">}</span><span class="token punctuation">,</span>
|
||||
cost<span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
|
||||
resource<span class="token operator">:</span> points
|
||||
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
</code></pre></div><p>The result will be a <a href="./layers.html#lazy-proxies">lazy proxy</a> 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 <a href="./reactivity.html#persistent">persistent refs</a> they must be included or else they will not have their values saved and loaded correctly.</p><p>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 <a href="./project-entry.html#fixoldsave">fixOldSave</a>, but it's recommended to avoid the error entirely.</p><p>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 <code>Object.values</code> to get an array of the objects instead.</p><h4 id="example" tabindex="-1">Example <a class="header-anchor" href="#example" aria-hidden="true">#</a></h4><div class="language-ts"><pre><code><span class="token keyword">const</span> upgrades <span class="token operator">=</span> <span class="token punctuation">{</span> addGainUpgrade<span class="token punctuation">,</span> gainMultUpgrade<span class="token punctuation">,</span> upgMultUpgrade <span class="token punctuation">}</span><span class="token punctuation">;</span>
|
||||
<span class="token keyword">const</span> numUpgrades <span class="token operator">=</span> <span class="token function">computed</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> Object<span class="token punctuation">.</span><span class="token function">values</span><span class="token punctuation">(</span>upgrades<span class="token punctuation">)</span><span class="token punctuation">.</span>length<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
</code></pre></div><h2 id="tree-shaking" tabindex="-1">Tree Shaking <a class="header-anchor" href="#tree-shaking" aria-hidden="true">#</a></h2><p>Since Profectus takes advantage of <a href="https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking" target="_blank" rel="noopener noreferrer">tree shaking</a>, and 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).</p><p>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.</p>`,12),p=[o];function r(c,i,u,l,d,h){return n(),a("div",null,p)}var g=e(t,[["render",r]]);export{f as __pageData,g as default};
|
1
assets/guide_features.md.b232f081.lean.js
Normal file
1
assets/guide_features.md.b232f081.lean.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as a,o as n,a as s}from"./app.829490d2.js";const f='{"title":"Features","description":"","frontmatter":{},"headers":[{"level":2,"title":"Tree Shaking","slug":"tree-shaking"}],"relativePath":"guide/features.md"}',t={},o=s("",12),p=[o];function r(c,i,u,l,d,h){return n(),a("div",null,p)}var g=e(t,[["render",r]]);export{f as __pageData,g as default};
|
|
@ -1 +0,0 @@
|
|||
import{_ as o,c as i,o as n,b as e,d as t}from"./app.1f0d41ed.js";const y='{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[{"level":2,"title":"Design Philosophies","slug":"design-philosophies"}],"relativePath":"guide/index.md"}',s={},a=e("h1",{id:"introduction",tabindex:"-1"},[t("Introduction "),e("a",{class:"header-anchor",href:"#introduction","aria-hidden":"true"},"#")],-1),r=e("p",null,"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.",-1),c=e("p",null,"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.",-1),d=e("h2",{id:"design-philosophies",tabindex:"-1"},[t("Design Philosophies "),e("a",{class:"header-anchor",href:"#design-philosophies","aria-hidden":"true"},"#")],-1),l=[a,r,c,d];function h(u,p,g,_,m,f){return n(),i("div",null,l)}var w=o(s,[["render",h]]);export{y as __pageData,w as default};
|
|
@ -1 +0,0 @@
|
|||
import{_ as o,c as i,o as n,b as e,d as t}from"./app.1f0d41ed.js";const y='{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[{"level":2,"title":"Design Philosophies","slug":"design-philosophies"}],"relativePath":"guide/index.md"}',s={},a=e("h1",{id:"introduction",tabindex:"-1"},[t("Introduction "),e("a",{class:"header-anchor",href:"#introduction","aria-hidden":"true"},"#")],-1),r=e("p",null,"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.",-1),c=e("p",null,"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.",-1),d=e("h2",{id:"design-philosophies",tabindex:"-1"},[t("Design Philosophies "),e("a",{class:"header-anchor",href:"#design-philosophies","aria-hidden":"true"},"#")],-1),l=[a,r,c,d];function h(u,p,g,_,m,f){return n(),i("div",null,l)}var w=o(s,[["render",h]]);export{y as __pageData,w as default};
|
1
assets/guide_index.md.c6435a7c.js
Normal file
1
assets/guide_index.md.c6435a7c.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as n,o as i,a as t}from"./app.829490d2.js";const _='{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[],"relativePath":"guide/index.md"}',o={},a=t('<h1 id="introduction" tabindex="-1">Introduction <a class="header-anchor" href="#introduction" aria-hidden="true">#</a></h1><p>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.</p><p>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.</p><h4 id="design-philosophies" tabindex="-1">Design Philosophies <a class="header-anchor" href="#design-philosophies" aria-hidden="true">#</a></h4><p>While absolute purity is impossible, design decisions have been and will continue to be made using these principles in mind.</p><ul><li>An engine should be intuitive, and code readable without context</li><li>An engine should not constrain a creator</li><li>An engine should be consistent</li><li>An engine should be extensible, and those extensions sharable</li><li>An engine should be efficient</li><li>An engine should report issues early and thoroughly</li><li>Passing by reference is one honking great idea -- <a href="https://www.python.org/dev/peps/pep-0020/" target="_blank" rel="noopener noreferrer">let's do more of that</a>! <ul><li><a href="https://dev.to/ycmjason/thought-on-vue-3-composition-api-reactive-considered-harmful-j8c" target="_blank" rel="noopener noreferrer">Refs are better than reactive objects</a></li></ul></li></ul>',6),r=[a];function s(l,c,d,h,u,p){return i(),n("div",null,r)}var f=e(o,[["render",s]]);export{_ as __pageData,f as default};
|
1
assets/guide_index.md.c6435a7c.lean.js
Normal file
1
assets/guide_index.md.c6435a7c.lean.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as n,o as i,a as t}from"./app.829490d2.js";const _='{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[],"relativePath":"guide/index.md"}',o={},a=t("",6),r=[a];function s(l,c,d,h,u,p){return i(),n("div",null,r)}var f=e(o,[["render",s]]);export{_ as __pageData,f as default};
|
1
assets/guide_layers.md.53ce88f3.js
Normal file
1
assets/guide_layers.md.53ce88f3.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as a,o as t,a as r}from"./app.829490d2.js";const f='{"title":"Layers","description":"","frontmatter":{},"headers":[{"level":2,"title":"Lazy Proxies","slug":"lazy-proxies"}],"relativePath":"guide/layers.md"}',s={},o=r('<h1 id="layers" tabindex="-1">Layers <a class="header-anchor" href="#layers" aria-hidden="true">#</a></h1><p>Profectus content is organized into units called "Layers". When display content to the user, it will be done so by having some number of layers appearing as sections on the screen. They are stored in <code>/src/data/layers</code>.</p><p>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.</p><p>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 <a href="./project-entry.html#getinitiallayers">getInitialLayers</a> can process the player save data object and determine which layers should be currently active.</p><h2 id="lazy-proxies" tabindex="-1">Lazy Proxies <a class="header-anchor" href="#lazy-proxies" aria-hidden="true">#</a></h2><p>Layers (and features) are not actually created immediately. Instead, their options are gotten through a function which is then run the first time something <em>inside</em> the layer is accessed. This is a concept called lazy evaluation, which is also used for things like <code>computed</code>, and allows for features to reference each other without worrying about cyclical dependencies.</p>',6),i=[o];function n(c,l,d,h,y,u){return t(),a("div",null,i)}var _=e(s,[["render",n]]);export{f as __pageData,_ as default};
|
1
assets/guide_layers.md.53ce88f3.lean.js
Normal file
1
assets/guide_layers.md.53ce88f3.lean.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as a,o as t,a as r}from"./app.829490d2.js";const f='{"title":"Layers","description":"","frontmatter":{},"headers":[{"level":2,"title":"Lazy Proxies","slug":"lazy-proxies"}],"relativePath":"guide/layers.md"}',s={},o=r("",6),i=[o];function n(c,l,d,h,y,u){return t(),a("div",null,i)}var _=e(s,[["render",n]]);export{f as __pageData,_ as default};
|
|
@ -1 +0,0 @@
|
|||
import{_ as t,c as r,o as s,b as e,d as a}from"./app.1f0d41ed.js";const g='{"title":"Layers","description":"","frontmatter":{},"headers":[],"relativePath":"guide/layers.md"}',o={},n=e("h1",{id:"layers",tabindex:"-1"},[a("Layers "),e("a",{class:"header-anchor",href:"#layers","aria-hidden":"true"},"#")],-1),i=e("p",null,[a('Profectus content is organized into units called "Layers". When display content to the user, it will be done so by having some number of layers appearing as sections on the screen. They are stored in '),e("code",null,"/src/data/layers"),a(".")],-1),l=e("p",null,"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.",-1),c=e("p",null,[a("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 "),e("a",{href:"./project-entry.html#getinitiallayers"},"getInitialLayers"),a(" can process the player save data object and determine which layers should be currently active.")],-1),d=[n,i,l,c];function h(y,u,p,f,_,m){return s(),r("div",null,d)}var v=t(o,[["render",h]]);export{g as __pageData,v as default};
|
|
@ -1 +0,0 @@
|
|||
import{_ as t,c as r,o as s,b as e,d as a}from"./app.1f0d41ed.js";const g='{"title":"Layers","description":"","frontmatter":{},"headers":[],"relativePath":"guide/layers.md"}',o={},n=e("h1",{id:"layers",tabindex:"-1"},[a("Layers "),e("a",{class:"header-anchor",href:"#layers","aria-hidden":"true"},"#")],-1),i=e("p",null,[a('Profectus content is organized into units called "Layers". When display content to the user, it will be done so by having some number of layers appearing as sections on the screen. They are stored in '),e("code",null,"/src/data/layers"),a(".")],-1),l=e("p",null,"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.",-1),c=e("p",null,[a("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 "),e("a",{href:"./project-entry.html#getinitiallayers"},"getInitialLayers"),a(" can process the player save data object and determine which layers should be currently active.")],-1),d=[n,i,l,c];function h(y,u,p,f,_,m){return s(),r("div",null,d)}var v=t(o,[["render",h]]);export{g as __pageData,v as default};
|
|
@ -1,2 +1,2 @@
|
|||
import{_ as e,c as a,o as t,a as n}from"./app.1f0d41ed.js";const f='{"title":"Project Entry","description":"","frontmatter":{},"headers":[{"level":2,"title":"Required Exports","slug":"required-exports"},{"level":3,"title":"getInitialLayers","slug":"getinitiallayers"},{"level":3,"title":"hasWon","slug":"haswon"},{"level":3,"title":"fixOldSave","slug":"fixoldsave"}],"relativePath":"guide/project-entry.md"}',s={},o=n(`<h1 id="project-entry" tabindex="-1">Project Entry <a class="header-anchor" href="#project-entry" aria-hidden="true">#</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-hidden="true">#</a></h2><h3 id="getinitiallayers" tabindex="-1">getInitialLayers <a class="header-anchor" href="#getinitiallayers" aria-hidden="true">#</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-hidden="true">#</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"><pre><code><span class="token keyword">export</span> <span class="token keyword">const</span> hasWon <span class="token operator">=</span> <span class="token function">computed</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> Decimal<span class="token punctuation">.</span><span class="token function">gte</span><span class="token punctuation">(</span>resource<span class="token punctuation">.</span>value<span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
import{_ as e,c as a,o as t,a as n}from"./app.829490d2.js";const f='{"title":"Project Entry","description":"","frontmatter":{},"headers":[{"level":2,"title":"Required Exports","slug":"required-exports"},{"level":3,"title":"getInitialLayers","slug":"getinitiallayers"},{"level":3,"title":"hasWon","slug":"haswon"},{"level":3,"title":"fixOldSave","slug":"fixoldsave"}],"relativePath":"guide/project-entry.md"}',s={},o=n(`<h1 id="project-entry" tabindex="-1">Project Entry <a class="header-anchor" href="#project-entry" aria-hidden="true">#</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-hidden="true">#</a></h2><h3 id="getinitiallayers" tabindex="-1">getInitialLayers <a class="header-anchor" href="#getinitiallayers" aria-hidden="true">#</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-hidden="true">#</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"><pre><code><span class="token keyword">export</span> <span class="token keyword">const</span> hasWon <span class="token operator">=</span> <span class="token function">computed</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> Decimal<span class="token punctuation">.</span><span class="token function">gte</span><span class="token punctuation">(</span>resource<span class="token punctuation">.</span>value<span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
</code></pre></div><h3 id="fixoldsave" tabindex="-1">fixOldSave <a class="header-anchor" href="#fixoldsave" aria-hidden="true">#</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.html#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),r=[o];function i(l,p,c,d,h,u){return t(),a("div",null,r)}var g=e(s,[["render",i]]);export{f as __pageData,g as default};
|
|
@ -1 +1 @@
|
|||
import{_ as e,c as a,o as t,a as n}from"./app.1f0d41ed.js";const f='{"title":"Project Entry","description":"","frontmatter":{},"headers":[{"level":2,"title":"Required Exports","slug":"required-exports"},{"level":3,"title":"getInitialLayers","slug":"getinitiallayers"},{"level":3,"title":"hasWon","slug":"haswon"},{"level":3,"title":"fixOldSave","slug":"fixoldsave"}],"relativePath":"guide/project-entry.md"}',s={},o=n("",17),r=[o];function i(l,p,c,d,h,u){return t(),a("div",null,r)}var g=e(s,[["render",i]]);export{f as __pageData,g as default};
|
||||
import{_ as e,c as a,o as t,a as n}from"./app.829490d2.js";const f='{"title":"Project Entry","description":"","frontmatter":{},"headers":[{"level":2,"title":"Required Exports","slug":"required-exports"},{"level":3,"title":"getInitialLayers","slug":"getinitiallayers"},{"level":3,"title":"hasWon","slug":"haswon"},{"level":3,"title":"fixOldSave","slug":"fixoldsave"}],"relativePath":"guide/project-entry.md"}',s={},o=n("",17),r=[o];function i(l,p,c,d,h,u){return t(),a("div",null,r)}var g=e(s,[["render",i]]);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 as i,a as l}from"./app.1f0d41ed.js";const g='{"title":"Project Info","description":"","frontmatter":{},"headers":[{"level":2,"title":"Basic Config","slug":"basic-config"},{"level":3,"title":"title","slug":"title"},{"level":3,"title":"id","slug":"id"},{"level":3,"title":"author","slug":"author"},{"level":3,"title":"discordName","slug":"discordname"},{"level":3,"title":"discordLink","slug":"discordlink"},{"level":2,"title":"Version Config","slug":"version-config"},{"level":3,"title":"versionNumber","slug":"versionnumber"},{"level":3,"title":"versionTitle","slug":"versiontitle"},{"level":2,"title":"Display Config","slug":"display-config"},{"level":3,"title":"allowGoBack","slug":"allowgoback"},{"level":3,"title":"defaultShowSmall","slug":"defaultshowsmall"},{"level":3,"title":"defaultDecimalsShown","slug":"defaultdecimalsshown"},{"level":3,"title":"useHeader","slug":"useheader"},{"level":3,"title":"banner","slug":"banner"},{"level":3,"title":"logo","slug":"logo"},{"level":3,"title":"initialTabs","slug":"initialtabs"},{"level":2,"title":"Advanced Config","slug":"advanced-config"},{"level":3,"title":"maxTickLength","slug":"maxticklength"},{"level":3,"title":"offlineLimit","slug":"offlinelimit"}],"relativePath":"guide/project-info.md"}',t={},o=l("",57),r=[o];function d(n,s,h,c,u,f){return i(),a("div",null,r)}var m=e(t,[["render",d]]);export{g as __pageData,m as default};
|
||||
import{_ as e,c as a,o as i,a as l}from"./app.829490d2.js";const g='{"title":"Project Info","description":"","frontmatter":{},"headers":[{"level":2,"title":"Basic Config","slug":"basic-config"},{"level":3,"title":"title","slug":"title"},{"level":3,"title":"id","slug":"id"},{"level":3,"title":"author","slug":"author"},{"level":3,"title":"discordName","slug":"discordname"},{"level":3,"title":"discordLink","slug":"discordlink"},{"level":2,"title":"Version Config","slug":"version-config"},{"level":3,"title":"versionNumber","slug":"versionnumber"},{"level":3,"title":"versionTitle","slug":"versiontitle"},{"level":2,"title":"Display Config","slug":"display-config"},{"level":3,"title":"allowGoBack","slug":"allowgoback"},{"level":3,"title":"defaultShowSmall","slug":"defaultshowsmall"},{"level":3,"title":"defaultDecimalsShown","slug":"defaultdecimalsshown"},{"level":3,"title":"useHeader","slug":"useheader"},{"level":3,"title":"banner","slug":"banner"},{"level":3,"title":"logo","slug":"logo"},{"level":3,"title":"initialTabs","slug":"initialtabs"},{"level":2,"title":"Advanced Config","slug":"advanced-config"},{"level":3,"title":"maxTickLength","slug":"maxticklength"},{"level":3,"title":"offlineLimit","slug":"offlinelimit"}],"relativePath":"guide/project-info.md"}',t={},o=l("",57),r=[o];function d(n,s,h,c,u,f){return i(),a("div",null,r)}var m=e(t,[["render",d]]);export{g as __pageData,m as default};
|
1
assets/guide_reactivity.md.d72f6023.js
Normal file
1
assets/guide_reactivity.md.d72f6023.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as t,o as a,a as o}from"./app.829490d2.js";const f='{"title":"Reactivity","description":"","frontmatter":{},"headers":[{"level":2,"title":"Persistent","slug":"persistent"},{"level":2,"title":"Computable","slug":"computable"}],"relativePath":"guide/reactivity.md"}',r={},s=o('<h1 id="reactivity" tabindex="-1">Reactivity <a class="header-anchor" href="#reactivity" aria-hidden="true">#</a></h1><p>Profectus takes large advantage of Vue's reactivity system. It's recommended to read up on how <a href="https://vuejs.org/guide/essentials/reactivity-fundamentals.html#reactive-variables-with-ref" target="_blank" rel="noopener noreferrer">refs</a> and <a href="https://vuejs.org/guide/essentials/computed.html" target="_blank" rel="noopener noreferrer">computed</a> refs work. Ultimately this means that sometimes you'll need to type <code>.value</code> 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. <code>.value</code> is guaranteed to be correct and up to date only on the exact moment it is accessed.</p><p>With a proper IDE, such as <a href="./setup.html#visual-studio-code-setup">Visual Studio Code</a>, 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 <code>unref</code> call.</p><p>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 <a href="https://github.com/vuejs/docs/issues/849" target="_blank" rel="noopener noreferrer">this thread</a> of common misconceptions around Vue reactivity.</p><h2 id="persistent" tabindex="-1">Persistent <a class="header-anchor" href="#persistent" aria-hidden="true">#</a></h2><p>Some refs are "persistent" refs. Most notably, any time you use the <code>persistent()</code> function it will be a persistent ref. You access these the same way you would any other ref, but keep in mind its value will be saved and loaded automatically.</p><p>All persistent refs <em>must</em> be included in a layer object in order for persistence to work. Since many <a href="./features.html">features</a> will create persistent refs internally its recommended to include all of them just to be safe.</p><h2 id="computable" tabindex="-1">Computable <a class="header-anchor" href="#computable" aria-hidden="true">#</a></h2><p>Most properties on features will accept <code>Computable</code> 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 <code>computed</code>, turning it into a ref. The feature type will handle it being a ref or a raw value by using <code>unref</code> 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.</p><p>Because functions are automatically wrapped in <code>computed</code> 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 <em>not</em> be wrapped, and if you want it cached you should wrap it in a <code>computed</code> yourself. This does, however, allow you to include custom methods on a feature without worry.</p>',10),i=[s];function n(u,l,c,d,h,p){return a(),t("div",null,i)}var y=e(r,[["render",n]]);export{f as __pageData,y as default};
|
1
assets/guide_reactivity.md.d72f6023.lean.js
Normal file
1
assets/guide_reactivity.md.d72f6023.lean.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as t,o as a,a as o}from"./app.829490d2.js";const f='{"title":"Reactivity","description":"","frontmatter":{},"headers":[{"level":2,"title":"Persistent","slug":"persistent"},{"level":2,"title":"Computable","slug":"computable"}],"relativePath":"guide/reactivity.md"}',r={},s=o("",10),i=[s];function n(u,l,c,d,h,p){return a(),t("div",null,i)}var y=e(r,[["render",n]]);export{f as __pageData,y as default};
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
import{_ as e,c as t,o,a}from"./app.1f0d41ed.js";var r="/assets/actionsbutton.f1ba9d8e.png",n="/assets/gh-pages.a24cefcf.png";const y='{"title":"Setting Up","description":"","frontmatter":{},"headers":[{"level":2,"title":"Local Development","slug":"local-development"},{"level":3,"title":"Deploying","slug":"deploying"},{"level":2,"title":"Replit","slug":"replit"},{"level":2,"title":"Glitch","slug":"glitch"}],"relativePath":"guide/setup.md"}',i={},l=a("",24),s=[l];function c(p,h,u,d,m,g){return o(),t("div",null,s)}var b=e(i,[["render",c]]);export{y as __pageData,b as default};
|
1
assets/guide_setup.md.85d3d48c.js
Normal file
1
assets/guide_setup.md.85d3d48c.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/guide_setup.md.85d3d48c.lean.js
Normal file
1
assets/guide_setup.md.85d3d48c.lean.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as e,c as t,o,a}from"./app.829490d2.js";var r="/assets/actionsbutton.f1ba9d8e.png",n="/assets/gh-pages.a24cefcf.png";const y='{"title":"Setting Up","description":"","frontmatter":{},"headers":[{"level":2,"title":"Local Development","slug":"local-development"},{"level":3,"title":"Deploying","slug":"deploying"},{"level":3,"title":"Visual Studio Code Setup","slug":"visual-studio-code-setup"},{"level":2,"title":"Replit","slug":"replit"},{"level":2,"title":"Glitch","slug":"glitch"}],"relativePath":"guide/setup.md"}',i={},l=a("",26),s=[l];function c(p,u,h,d,m,g){return o(),t("div",null,s)}var b=e(i,[["render",c]]);export{y as __pageData,b as default};
|
|
@ -1 +1 @@
|
|||
import{_ as e,c as t,o as a,a as o}from"./app.1f0d41ed.js";const g='{"title":"Themes","description":"","frontmatter":{},"headers":[{"level":2,"title":"Modifying Themes","slug":"modifying-themes"},{"level":2,"title":"Theme Options","slug":"theme-options"},{"level":3,"title":"floatingTabs","slug":"floatingtabs"},{"level":3,"title":"mergeAdjacent","slug":"mergeadjacent"}],"relativePath":"guide/themes.md"}',i={},s=o('<h1 id="themes" tabindex="-1">Themes <a class="header-anchor" href="#themes" aria-hidden="true">#</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-hidden="true">#</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-hidden="true">#</a></h2><h3 id="floatingtabs" tabindex="-1">floatingTabs <a class="header-anchor" href="#floatingtabs" aria-hidden="true">#</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-hidden="true">#</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 h(r,d,l,c,m,p){return a(),t("div",null,n)}var f=e(i,[["render",h]]);export{g as __pageData,f as default};
|
||||
import{_ as e,c as t,o as a,a as o}from"./app.829490d2.js";const g='{"title":"Themes","description":"","frontmatter":{},"headers":[{"level":2,"title":"Modifying Themes","slug":"modifying-themes"},{"level":2,"title":"Theme Options","slug":"theme-options"},{"level":3,"title":"floatingTabs","slug":"floatingtabs"},{"level":3,"title":"mergeAdjacent","slug":"mergeadjacent"}],"relativePath":"guide/themes.md"}',i={},s=o('<h1 id="themes" tabindex="-1">Themes <a class="header-anchor" href="#themes" aria-hidden="true">#</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-hidden="true">#</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-hidden="true">#</a></h2><h3 id="floatingtabs" tabindex="-1">floatingTabs <a class="header-anchor" href="#floatingtabs" aria-hidden="true">#</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-hidden="true">#</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 h(r,d,l,c,m,p){return a(),t("div",null,n)}var f=e(i,[["render",h]]);export{g as __pageData,f as default};
|
|
@ -1 +1 @@
|
|||
import{_ as e,c as t,o as a,a as o}from"./app.1f0d41ed.js";const g='{"title":"Themes","description":"","frontmatter":{},"headers":[{"level":2,"title":"Modifying Themes","slug":"modifying-themes"},{"level":2,"title":"Theme Options","slug":"theme-options"},{"level":3,"title":"floatingTabs","slug":"floatingtabs"},{"level":3,"title":"mergeAdjacent","slug":"mergeadjacent"}],"relativePath":"guide/themes.md"}',i={},s=o("",15),n=[s];function h(r,d,l,c,m,p){return a(),t("div",null,n)}var f=e(i,[["render",h]]);export{g as __pageData,f as default};
|
||||
import{_ as e,c as t,o as a,a as o}from"./app.829490d2.js";const g='{"title":"Themes","description":"","frontmatter":{},"headers":[{"level":2,"title":"Modifying Themes","slug":"modifying-themes"},{"level":2,"title":"Theme Options","slug":"theme-options"},{"level":3,"title":"floatingTabs","slug":"floatingtabs"},{"level":3,"title":"mergeAdjacent","slug":"mergeadjacent"}],"relativePath":"guide/themes.md"}',i={},s=o("",15),n=[s];function h(r,d,l,c,m,p){return a(),t("div",null,n)}var f=e(i,[["render",h]]);export{g as __pageData,f as default};
|
|
@ -1,4 +1,4 @@
|
|||
import{_ as e,c as t,o as a,a as o}from"./app.1f0d41ed.js";const g='{"title":"Updating Profectus","description":"","frontmatter":{},"headers":[{"level":2,"title":"Github","slug":"github"},{"level":2,"title":"Replit","slug":"replit"},{"level":2,"title":"Glitch","slug":"glitch"}],"relativePath":"guide/updating.md"}',r={},n=o(`<h1 id="updating-profectus" tabindex="-1">Updating Profectus <a class="header-anchor" href="#updating-profectus" aria-hidden="true">#</a></h1><h2 id="github" tabindex="-1">Github <a class="header-anchor" href="#github" aria-hidden="true">#</a></h2><p>Due to Profectus being a template repository, your projects do not share a git history with Profectus. In order to update changes, you will need to run the following:</p><div class="language-bash"><pre><code><span class="token function">git</span> remote <span class="token function">add</span> template https://github.com/profectus-engine/Profectus
|
||||
import{_ as e,c as t,o as a,a as o}from"./app.829490d2.js";const g='{"title":"Updating Profectus","description":"","frontmatter":{},"headers":[{"level":2,"title":"Github","slug":"github"},{"level":2,"title":"Replit","slug":"replit"},{"level":2,"title":"Glitch","slug":"glitch"}],"relativePath":"guide/updating.md"}',r={},n=o(`<h1 id="updating-profectus" tabindex="-1">Updating Profectus <a class="header-anchor" href="#updating-profectus" aria-hidden="true">#</a></h1><h2 id="github" tabindex="-1">Github <a class="header-anchor" href="#github" aria-hidden="true">#</a></h2><p>Due to Profectus being a template repository, your projects do not share a git history with Profectus. In order to update changes, you will need to run the following:</p><div class="language-bash"><pre><code><span class="token function">git</span> remote <span class="token function">add</span> template https://github.com/profectus-engine/Profectus
|
||||
<span class="token function">git</span> fetch --all
|
||||
<span class="token function">git</span> merge template/main --allow-unrelated-histories
|
||||
</code></pre></div><p>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 <em>every</em> change will be marked as a conflict, and you'll need to accept each one.</p><h2 id="replit" tabindex="-1">Replit <a class="header-anchor" href="#replit" aria-hidden="true">#</a></h2><p>The sidebar has a tab labelled "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.</p><h2 id="glitch" tabindex="-1">Glitch <a class="header-anchor" href="#glitch" aria-hidden="true">#</a></h2><p>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.</p>`,9),i=[n];function s(c,h,d,l,u,p){return a(),t("div",null,i)}var m=e(r,[["render",s]]);export{g as __pageData,m as default};
|
|
@ -1 +1 @@
|
|||
import{_ as e,c as t,o as a,a as o}from"./app.1f0d41ed.js";const g='{"title":"Updating Profectus","description":"","frontmatter":{},"headers":[{"level":2,"title":"Github","slug":"github"},{"level":2,"title":"Replit","slug":"replit"},{"level":2,"title":"Glitch","slug":"glitch"}],"relativePath":"guide/updating.md"}',r={},n=o("",9),i=[n];function s(c,h,d,l,u,p){return a(),t("div",null,i)}var m=e(r,[["render",s]]);export{g as __pageData,m as default};
|
||||
import{_ as e,c as t,o as a,a as o}from"./app.829490d2.js";const g='{"title":"Updating Profectus","description":"","frontmatter":{},"headers":[{"level":2,"title":"Github","slug":"github"},{"level":2,"title":"Replit","slug":"replit"},{"level":2,"title":"Glitch","slug":"glitch"}],"relativePath":"guide/updating.md"}',r={},n=o("",9),i=[n];function s(c,h,d,l,u,p){return a(),t("div",null,i)}var m=e(r,[["render",s]]);export{g as __pageData,m as default};
|
1
assets/guide_utils.md.86676041.js
Normal file
1
assets/guide_utils.md.86676041.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as a,c as s,o,b as e,d as t}from"./app.829490d2.js";const b='{"title":"Utilities","description":"","frontmatter":{},"headers":[],"relativePath":"guide/utils.md"}',i={},n=e("h1",{id:"utilities",tabindex:"-1"},[t("Utilities "),e("a",{class:"header-anchor",href:"#utilities","aria-hidden":"true"},"#")],-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,f,p,_,m){return o(),s("div",null,l)}var k=a(i,[["render",d]]);export{b as __pageData,k as default};
|
1
assets/guide_utils.md.86676041.lean.js
Normal file
1
assets/guide_utils.md.86676041.lean.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{_ as a,c as s,o,b as e,d as t}from"./app.829490d2.js";const b='{"title":"Utilities","description":"","frontmatter":{},"headers":[],"relativePath":"guide/utils.md"}',i={},n=e("h1",{id:"utilities",tabindex:"-1"},[t("Utilities "),e("a",{class:"header-anchor",href:"#utilities","aria-hidden":"true"},"#")],-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,f,p,_,m){return o(),s("div",null,l)}var k=a(i,[["render",d]]);export{b as __pageData,k as default};
|
|
@ -1 +1 @@
|
|||
import{_ as e,c as t,o}from"./app.1f0d41ed.js";const u='{"title":"Home","description":"","frontmatter":{"home":true,"title":"Home","heroText":"Profectus","tagline":"A game engine that grows with you","actionText":"Get Started","actionLink":"/guide/setup","features":[{"title":"Easy to Use","details":"Everything is written to be as intuitive to use as possible"},{"title":"Well integrated","details":"Seamlessly deploy your project, get type hints in your IDE, etc."},{"title":"Incremental","details":"Designed to actively encourage you to become better at programming"}],"footer":"Copyright \xA9 2022 thepaperpilot"},"headers":[],"relativePath":"index.md"}',i={};function a(r,s,n,c,l,p){return o(),t("div")}var m=e(i,[["render",a]]);export{u as __pageData,m as default};
|
||||
import{_ as e,c as t,o}from"./app.829490d2.js";const u='{"title":"Home","description":"","frontmatter":{"home":true,"title":"Home","heroText":"Profectus","tagline":"A game engine that grows with you","actionText":"Get Started","actionLink":"/guide/setup","features":[{"title":"Easy to Use","details":"Everything is written to be as intuitive to use as possible"},{"title":"Well integrated","details":"Seamlessly deploy your project, get type hints in your IDE, etc."},{"title":"Incremental","details":"Designed to actively encourage you to become better at programming"}],"footer":"Copyright \xA9 2022 thepaperpilot"},"headers":[],"relativePath":"index.md"}',i={};function a(r,s,n,c,l,p){return o(),t("div")}var m=e(i,[["render",a]]);export{u as __pageData,m as default};
|
|
@ -1 +1 @@
|
|||
import{_ as e,c as t,o}from"./app.1f0d41ed.js";const u='{"title":"Home","description":"","frontmatter":{"home":true,"title":"Home","heroText":"Profectus","tagline":"A game engine that grows with you","actionText":"Get Started","actionLink":"/guide/setup","features":[{"title":"Easy to Use","details":"Everything is written to be as intuitive to use as possible"},{"title":"Well integrated","details":"Seamlessly deploy your project, get type hints in your IDE, etc."},{"title":"Incremental","details":"Designed to actively encourage you to become better at programming"}],"footer":"Copyright \xA9 2022 thepaperpilot"},"headers":[],"relativePath":"index.md"}',i={};function a(r,s,n,c,l,p){return o(),t("div")}var m=e(i,[["render",a]]);export{u as __pageData,m as default};
|
||||
import{_ as e,c as t,o}from"./app.829490d2.js";const u='{"title":"Home","description":"","frontmatter":{"home":true,"title":"Home","heroText":"Profectus","tagline":"A game engine that grows with you","actionText":"Get Started","actionLink":"/guide/setup","features":[{"title":"Easy to Use","details":"Everything is written to be as intuitive to use as possible"},{"title":"Well integrated","details":"Seamlessly deploy your project, get type hints in your IDE, etc."},{"title":"Incremental","details":"Designed to actively encourage you to become better at programming"}],"footer":"Copyright \xA9 2022 thepaperpilot"},"headers":[],"relativePath":"index.md"}',i={};function a(r,s,n,c,l,p){return o(),t("div")}var m=e(i,[["render",a]]);export{u as __pageData,m as default};
|
File diff suppressed because one or more lines are too long
38
guide/coercable.html
Normal file
38
guide/coercable.html
Normal file
File diff suppressed because one or more lines are too long
29
guide/creating-features.html
Normal file
29
guide/creating-features.html
Normal file
File diff suppressed because one or more lines are too long
39
guide/features.html
Normal file
39
guide/features.html
Normal file
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
29
guide/reactivity.html
Normal file
29
guide/reactivity.html
Normal file
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
29
guide/utils.html
Normal file
29
guide/utils.html
Normal file
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
{"guide_changelog.md":"fcdbc813","guide_index.md":"5e3b8868","guide_layers.md":"9b9b2d84","guide_project-entry.md":"346c63e7","guide_project-info.md":"12d9a8f2","guide_setup.md":"6fd69476","guide_themes.md":"f41015ce","guide_updating.md":"812c69a7","index.md":"e75d498a"}
|
||||
{"guide_changelog.md":"6e2ff1db","guide_coercable.md":"c51dac2d","guide_creating-features.md":"54db17fd","guide_features.md":"b232f081","guide_index.md":"c6435a7c","guide_layers.md":"53ce88f3","guide_project-entry.md":"f84e9cd9","guide_project-info.md":"d4181672","guide_reactivity.md":"d72f6023","guide_setup.md":"85d3d48c","guide_themes.md":"4332fe54","guide_updating.md":"6435679a","guide_utils.md":"86676041","index.md":"14bdf584"}
|
||||
|
|
10
index.html
10
index.html
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue