diff --git a/Turtle.types.ps1xml b/Turtle.types.ps1xml
index 6178096..2633e59 100644
--- a/Turtle.types.ps1xml
+++ b/Turtle.types.ps1xml
@@ -8429,10 +8429,6 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
)
}
-
- get_heading.js
- heading: 0.0
-
go.js
function go() {
@@ -8447,6 +8443,17 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
goto.js
function goto(x,y) { return this.step(x - this.x, y - this.y) }
+
+ heading.js
+ function get_heading() {
+ const _ = this
+ if ( _['#heading'] === undefined ) {
+ _['#heading'] = 0.0
+ }
+ return _['#heading']
+}
+
+
height.js
height: 0.0
@@ -8520,7 +8527,7 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
pathData.js
- function get_pathData() {
+ function pathData() {
let startX = 0;
let startY = 0;
if (!this.min) { this.min = { x: 0.0, y: 0.0}}
@@ -8579,14 +8586,12 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
set_heading.js
function set_heading(value) {
- let _ = this
+ const _ = this
try {
_['#heading'] = new Number(value)
} catch {
-
_['#heading'] = 0.0
}
-
return _
}
@@ -8610,7 +8615,7 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
function teleport(x,y) {
var penState = this.penDown
this.penDown = false
- step(x - this.x, y - this.y)
+ this.step(x - this.x, y - this.y)
this.penDown = penState
return this
}
diff --git a/Types/Turtle.js/get_heading.js b/Types/Turtle.js/get_heading.js
deleted file mode 100644
index 776f648..0000000
--- a/Types/Turtle.js/get_heading.js
+++ /dev/null
@@ -1 +0,0 @@
-heading: 0.0
\ No newline at end of file
diff --git a/Types/Turtle.js/heading.js b/Types/Turtle.js/heading.js
new file mode 100644
index 0000000..bf11f24
--- /dev/null
+++ b/Types/Turtle.js/heading.js
@@ -0,0 +1,7 @@
+function get_heading() {
+ const _ = this
+ if ( _['#heading'] === undefined ) {
+ _['#heading'] = 0.0
+ }
+ return _['#heading']
+}
diff --git a/Types/Turtle.js/pathData.js b/Types/Turtle.js/pathData.js
index 8133b6c..ce5b349 100644
--- a/Types/Turtle.js/pathData.js
+++ b/Types/Turtle.js/pathData.js
@@ -1,4 +1,4 @@
-function get_pathData() {
+function pathData() {
let startX = 0;
let startY = 0;
if (!this.min) { this.min = { x: 0.0, y: 0.0}}
diff --git a/Types/Turtle.js/set_heading.js b/Types/Turtle.js/set_heading.js
index 020740d..12a2bcd 100644
--- a/Types/Turtle.js/set_heading.js
+++ b/Types/Turtle.js/set_heading.js
@@ -1,11 +1,9 @@
function set_heading(value) {
- let _ = this
+ const _ = this
try {
_['#heading'] = new Number(value)
} catch {
-
_['#heading'] = 0.0
}
-
return _
}
\ No newline at end of file
diff --git a/Types/Turtle.js/teleport.js b/Types/Turtle.js/teleport.js
index 703b335..73a821c 100644
--- a/Types/Turtle.js/teleport.js
+++ b/Types/Turtle.js/teleport.js
@@ -1,7 +1,7 @@
function teleport(x,y) {
var penState = this.penDown
this.penDown = false
- step(x - this.x, y - this.y)
+ this.step(x - this.x, y - this.y)
this.penDown = penState
return this
}
\ No newline at end of file