Skip to content

Commit 0b25b2b

Browse files
StartAutomatingStartAutomating
authored andcommitted
fix: Turtle.js.pathData is now a property ( Fixes #339 )
1 parent 189abeb commit 0b25b2b

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

Turtle.types.ps1xml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8692,6 +8692,33 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
86928692
distance * Math.cos(this.heading * Math.PI / 180),
86938693
distance * Math.sin(this.heading * Math.PI / 180)
86948694
)
8695+
}</Value>
8696+
</NoteProperty>
8697+
<NoteProperty>
8698+
<Name>get_heading.js</Name>
8699+
<Value>function get_heading() {
8700+
const _ = this
8701+
if ( _['#heading'] === undefined ) {
8702+
_['#heading'] = 0.0
8703+
}
8704+
return _['#heading']
8705+
}
8706+
</Value>
8707+
</NoteProperty>
8708+
<NoteProperty>
8709+
<Name>get_pathData.js</Name>
8710+
<Value>function get_pathData() {
8711+
let startX = 0;
8712+
let startY = 0;
8713+
if (!this.min) { this.min = { x: 0.0, y: 0.0}}
8714+
if (!this.max) { this.max = { x: 0.0, y: 0.0}}
8715+
if (this.min.x &lt; 0) {
8716+
startX = (this.min.x) * -1
8717+
}
8718+
if (this.min.y &lt; 0) {
8719+
startY = (this.min.y) * -1
8720+
}
8721+
return `m ${startX} ${startY} ${this.steps?.join(' ')}`
86958722
}</Value>
86968723
</NoteProperty>
86978724
<NoteProperty>
@@ -8708,17 +8735,6 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
87088735
<Name>goto.js</Name>
87098736
<Value>function goto(x,y) { return this.step(x - this.x, y - this.y) }</Value>
87108737
</NoteProperty>
8711-
<NoteProperty>
8712-
<Name>heading.js</Name>
8713-
<Value>function get_heading() {
8714-
const _ = this
8715-
if ( _['#heading'] === undefined ) {
8716-
_['#heading'] = 0.0
8717-
}
8718-
return _['#heading']
8719-
}
8720-
</Value>
8721-
</NoteProperty>
87228738
<NoteProperty>
87238739
<Name>height.js</Name>
87248740
<Value>height: 0.0</Value>
@@ -8788,22 +8804,6 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
87888804
}
87898805

87908806
return parsed
8791-
}</Value>
8792-
</NoteProperty>
8793-
<NoteProperty>
8794-
<Name>pathData.js</Name>
8795-
<Value>function pathData() {
8796-
let startX = 0;
8797-
let startY = 0;
8798-
if (!this.min) { this.min = { x: 0.0, y: 0.0}}
8799-
if (!this.max) { this.max = { x: 0.0, y: 0.0}}
8800-
if (this.min.x &lt; 0) {
8801-
startX = (this.min.x) * -1
8802-
}
8803-
if (this.min.y &lt; 0) {
8804-
startY = (this.min.y) * -1
8805-
}
8806-
return `m ${startX} ${startY} ${this.steps?.join(' ')}`
88078807
}</Value>
88088808
</NoteProperty>
88098809
<NoteProperty>

0 commit comments

Comments
 (0)