File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 99 These are portions of the class.
1010
1111 To create our class, we simply join these properties together, and output a javascript object.
12+ . NOTES
13+ This is an experimental feature and is subject to change and improvement.
14+ . EXAMPLE
15+ $turtleJs = [PSCustomObject]@{PSTypeName='Turtle.js'}
16+ $html = @(
17+ "<html><body>"
18+ "<svg id='output' width='100%' height='100%'>"
19+ "<path id='outputPath' stroke='#4488ff' />"
20+ "</svg>"
21+ "<script>"
22+ "const turtle = $turtleJS"
23+ "turtle.go('ROTATE', 45,'forward', 42)"
24+ "document.getElementById('outputPath').setAttribute('d',turtle.pathData)"
25+ "document.getElementById('output').setAttribute('viewBox', ``0 0 `${turtle.width} `${turtle.height}`` )"
26+ "</script>"
27+ "</body></html>"
28+ ) > ./TurtleTest.html
1229#>
1330param ()
1431
You can’t perform that action at this time.
0 commit comments