README.md

beta.r3js.org
Theunis Johannes Botha 2018-04-10 16:03:18 +02:00
parent 731cad12a0
commit 5fbbfa5729
1 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,21 @@
### Custom Code
#R3 Custom Code
######
Almost every entity you create will have some 'Custom Code' component.
Custom Code components have a property which define the WHEN they get executed ('ex. on entity_loaded' event), and also the WHAT happens.
They are created explicitly in the editor and the code can be modified 'on the fly' using the editor.
Everytime you save a custom code component, the R3 api will create a GIT commit and push to this repository, to a javascript file which has exactly the same ID as the custom code component.
This is useful in case you accidentally overwrite the custom code component with some bad code or you simply want to investigate your code components from a more convenient location such as github.
Every time you save an entity, and this entity has a custom code component, it will 'PUSH' the current branch to the remote.
So in short, from the editor, if you select the __custom code component__ and hit 'save' :
* commit to this repository
if you select the __entity__ which happens to have a custom code component and hit 'save' :
* commit to this repository and push to remote
Stores all custom code versions