Updated Introduction to Editor Scripting.md (markdown)
commited
commit
898dde0e9829ac5a899fc9995437156e839d874b
... | ... | @@ -108,6 +108,9 @@ let justATree = { |
108 | 108 | build: () => { |
109 | 109 | for (let c in this.components) { |
110 | 110 | for (let i = 0; i < (c[1][0] * c[1][1] * c[1][2]); i++) { |
111 | let x = c[2][0] + |
|
112 | let y = c[2][1] + |
|
113 | let z = c[2][2] + |
|
111 | 114 | // the "this" keyword refers to the object it is inside to, |
112 | 115 | // we use "this" when the object is not or not yet defined by a variable |
113 | 116 | setBlock(this.x + x, this.y + y, this.z + z, 0); |