├── .gitignore ├── .parcelrc ├── .terserrc ├── babel.config.js ├── docs ├── .nojekyll ├── assets │ ├── highlight.css │ ├── icons.css │ ├── icons.png │ ├── icons@2x.png │ ├── main.js │ ├── search.js │ ├── style.css │ ├── widgets.png │ └── widgets@2x.png ├── classes │ ├── feature.Feature.html │ ├── gui.default.html │ ├── lib_guiControl.guiControl.html │ ├── parcel.Space.html │ ├── parcel.default.html │ └── player.Player.html ├── enums │ └── lib_messages.SupportedMessageTypes.html ├── index.html ├── interfaces │ ├── lib_messages.ChangedMessage.html │ ├── lib_messages.ChatMessage.html │ ├── lib_messages.ClickMessage.html │ ├── lib_messages.JoinMessage.html │ ├── lib_messages.KeysMessage.html │ ├── lib_messages.MoveMessage.html │ ├── lib_messages.PatchMessage.html │ ├── lib_messages.PlayerAwayMessage.html │ ├── lib_messages.PlayerEnterMessage.html │ ├── lib_messages.PlayerLeaveMessage.html │ ├── lib_messages.PlayerNearbyMessage.html │ ├── lib_messages.StartMessage.html │ ├── lib_messages.StopMessage.html │ ├── lib_messages.TriggerMessage.html │ └── lib_types.IParcel.html ├── modules.html └── modules │ ├── feature.html │ ├── gui.html │ ├── helpers.html │ ├── index.html │ ├── lib_guiControl.html │ ├── lib_messages.html │ ├── lib_types.html │ ├── lib_validation_helpers.html │ ├── parcel.html │ ├── player.html │ └── types.html ├── jest.config.js ├── package-lock.json ├── package.json ├── readme.md ├── src ├── feature.ts ├── gui.ts ├── helpers.ts ├── index.ts ├── lib │ ├── guiControl.ts │ ├── messages.ts │ ├── types.ts │ └── validation-helpers.ts ├── parcel.ts ├── player.ts └── types.ts ├── test ├── feature.test.ts ├── parcel.json ├── parcel.test.ts ├── player.test.ts ├── test_lib.ts └── tsconfig.json ├── tsconfig.json ├── tsconfig.test.json └── typedoc.json /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | bundle.js* 3 | bundle.min.js 4 | node_modules 5 | dist 6 | .parcel-cache -------------------------------------------------------------------------------- /.parcelrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@parcel/config-default", 3 | "transformers": { 4 | "types:*.{ts,tsx}": ["@parcel/transformer-typescript-types"], 5 | "bundle-text:*": ["...", "@parcel/transformer-inline-string"], 6 | "worklet:*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [ 7 | "@parcel/transformer-worklet", 8 | "..." 9 | ], 10 | "*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [ 11 | "@parcel/transformer-js", 12 | "@parcel/transformer-react-refresh-wrap" 13 | ] 14 | } 15 | } -------------------------------------------------------------------------------- /.terserrc: -------------------------------------------------------------------------------- 1 | { 2 | keep_classnames: true, 3 | keep_fnames: true 4 | } -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | [ 4 | '@babel/preset-env', 5 | { 6 | targets: { node: 'current' }, 7 | }, 8 | ], 9 | '@babel/preset-typescript', 10 | ] 11 | } -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. -------------------------------------------------------------------------------- /docs/assets/highlight.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --light-hl-0: #0000FF; 3 | --dark-hl-0: #569CD6; 4 | --light-hl-1: #000000; 5 | --dark-hl-1: #D4D4D4; 6 | --light-hl-2: #795E26; 7 | --dark-hl-2: #DCDCAA; 8 | --light-hl-3: #001080; 9 | --dark-hl-3: #9CDCFE; 10 | --light-hl-4: #098658; 11 | --dark-hl-4: #B5CEA8; 12 | --light-hl-5: #A31515; 13 | --dark-hl-5: #CE9178; 14 | --light-code-background: #F5F5F5; 15 | --dark-code-background: #1E1E1E; 16 | } 17 | 18 | @media (prefers-color-scheme: light) { :root { 19 | --hl-0: var(--light-hl-0); 20 | --hl-1: var(--light-hl-1); 21 | --hl-2: var(--light-hl-2); 22 | --hl-3: var(--light-hl-3); 23 | --hl-4: var(--light-hl-4); 24 | --hl-5: var(--light-hl-5); 25 | --code-background: var(--light-code-background); 26 | } } 27 | 28 | @media (prefers-color-scheme: dark) { :root { 29 | --hl-0: var(--dark-hl-0); 30 | --hl-1: var(--dark-hl-1); 31 | --hl-2: var(--dark-hl-2); 32 | --hl-3: var(--dark-hl-3); 33 | --hl-4: var(--dark-hl-4); 34 | --hl-5: var(--dark-hl-5); 35 | --code-background: var(--dark-code-background); 36 | } } 37 | 38 | body.light { 39 | --hl-0: var(--light-hl-0); 40 | --hl-1: var(--light-hl-1); 41 | --hl-2: var(--light-hl-2); 42 | --hl-3: var(--light-hl-3); 43 | --hl-4: var(--light-hl-4); 44 | --hl-5: var(--light-hl-5); 45 | --code-background: var(--light-code-background); 46 | } 47 | 48 | body.dark { 49 | --hl-0: var(--dark-hl-0); 50 | --hl-1: var(--dark-hl-1); 51 | --hl-2: var(--dark-hl-2); 52 | --hl-3: var(--dark-hl-3); 53 | --hl-4: var(--dark-hl-4); 54 | --hl-5: var(--dark-hl-5); 55 | --code-background: var(--dark-code-background); 56 | } 57 | 58 | .hl-0 { color: var(--hl-0); } 59 | .hl-1 { color: var(--hl-1); } 60 | .hl-2 { color: var(--hl-2); } 61 | .hl-3 { color: var(--hl-3); } 62 | .hl-4 { color: var(--hl-4); } 63 | .hl-5 { color: var(--hl-5); } 64 | pre, code { background: var(--code-background); } 65 | -------------------------------------------------------------------------------- /docs/assets/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryptovoxels/scripting-bundle/3f96a1c4bdca62d4ad98e2cf35b2316f63227ca7/docs/assets/icons.png -------------------------------------------------------------------------------- /docs/assets/icons@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryptovoxels/scripting-bundle/3f96a1c4bdca62d4ad98e2cf35b2316f63227ca7/docs/assets/icons@2x.png -------------------------------------------------------------------------------- /docs/assets/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryptovoxels/scripting-bundle/3f96a1c4bdca62d4ad98e2cf35b2316f63227ca7/docs/assets/widgets.png -------------------------------------------------------------------------------- /docs/assets/widgets@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryptovoxels/scripting-bundle/3f96a1c4bdca62d4ad98e2cf35b2316f63227ca7/docs/assets/widgets@2x.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 |
Voxels.com is a voxel-based world 6 | built on top of the ethereum blockchain. This scripting engine is 7 | for adding interactivity to your Voxels parcels.
8 |Scripts are written in world using the scripting field inside the feature editor.This script is then run in a webworker on the domain untrusted.cryptovoxels.com
. Your scripts are run in the browser so there is no consistency between users, they each run their own version of the scripts.
For consistency between users, we have a hosted Scripting serice that parcel owners can decide to use or not.
10 |If users want to host their own scripting server, we have https://github.com/cryptovoxels/Voxels-Scripting-Server.
11 | 12 | 13 |https://github.com/cryptovoxels/Voxels-Scripting-Server/docs/index.html
16 | 17 | 18 |Clone the repo.
22 |Create a branch & Make your changes
24 |Run npm run build
and npm run format
to (1) make sure the project still builds and (2) format your code.
Make a pull request on github.
28 |If you've changed code inside src/
please run npm run docs
and commit the changes.
Note: 32 | If you have access to the cryptovoxels repo; you can test the build, by then running "npm run copy:voxels" after build ; 33 | This will copy the scripting bundle to the cryptovoxels repo, and you can test it on local
34 |Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc