-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove no-longer-needed function wrappers in examples
- Loading branch information
Showing
7 changed files
with
29 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
all: cjsx jsx coffee | ||
cjsx: | ||
svgtiler -f outlines.cjsx *.asc | ||
jsx: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
Border = (props) -> | ||
<line {...props} stroke="black" stroke-width="5" stroke-linecap="round"/> | ||
|
||
(key) -> -> | ||
(key) -> | ||
<symbol viewBox="-10 -10 20 20" overflowBox="-12.5 -12.5 25 25"> | ||
{if this.neighbor(-1,0).key != key | ||
<Border x1="-10" y1="-10" x2="-10" y2="10"/>} | ||
{if this.neighbor(+1,0).key != key | ||
<Border x1="10" y1="-10" x2="10" y2="10"/>} | ||
{if this.neighbor(0,-1).key != key | ||
<Border x1="-10" y1="-10" x2="10" y2="-10"/>} | ||
{if this.neighbor(0,+1).key != key | ||
<Border x1="-10" y1="10" x2="10" y2="10"/>} | ||
{if @neighbor(-1,0).key != key | ||
<Border x1="-10" y1="-10" x2="-10" y2="10"/> | ||
} | ||
{if @neighbor(+1,0).key != key | ||
<Border x1="10" y1="-10" x2="10" y2="10"/> | ||
} | ||
{if @neighbor(0,-1).key != key | ||
<Border x1="-10" y1="-10" x2="10" y2="-10"/> | ||
} | ||
{if @neighbor(0,+1).key != key | ||
<Border x1="-10" y1="10" x2="10" y2="10"/> | ||
} | ||
</symbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
borderStyle = 'stroke="black" stroke-width="5" stroke-linecap="round"' | ||
|
||
(key) -> -> | ||
(key) -> | ||
s = ''' | ||
<symbol viewBox="-10 -10 20 20" overflowBox="-12.5 -12.5 25 25"> | ||
''' | ||
if this.neighbor(-1,0).key != key | ||
if @neighbor(-1,0).key != key | ||
s += """<line x1="-10" y1="-10" x2="-10" y2="10" #{borderStyle}/>""" | ||
if this.neighbor(+1,0).key != key | ||
if @neighbor(+1,0).key != key | ||
s += """<line x1="10" y1="-10" x2="10" y2="10" #{borderStyle}/>""" | ||
if this.neighbor(0,-1).key != key | ||
if @neighbor(0,-1).key != key | ||
s += """<line x1="-10" y1="-10" x2="10" y2="-10" #{borderStyle}/>""" | ||
if this.neighbor(0,+1).key != key | ||
if @neighbor(0,+1).key != key | ||
s += """<line x1="-10" y1="10" x2="10" y2="10" #{borderStyle}/>""" | ||
s += '</symbol>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
const Border = (props) => | ||
<line {...props} stroke="black" stroke-width="5" stroke-linecap="round"/>; | ||
|
||
(key) => function() { | ||
(key, context) => { | ||
return <symbol viewBox="-10 -10 20 20" overflowBox="-12.5 -12.5 25 25"> | ||
{this.neighbor(-1,0).key !== key && | ||
{context.neighbor(-1,0).key !== key && | ||
<Border x1="-10" y1="-10" x2="-10" y2="10"/>} | ||
{this.neighbor(+1,0).key !== key && | ||
{context.neighbor(+1,0).key !== key && | ||
<Border x1="10" y1="-10" x2="10" y2="10"/>} | ||
{this.neighbor(0,-1).key !== key && | ||
{context.neighbor(0,-1).key !== key && | ||
<Border x1="-10" y1="-10" x2="10" y2="-10"/>} | ||
{this.neighbor(0,+1).key !== key && | ||
{context.neighbor(0,+1).key !== key && | ||
<Border x1="-10" y1="10" x2="10" y2="10"/>} | ||
</symbol> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
all: | ||
all: txt coffee | ||
txt: | ||
svgtiler -f -P NES_level7.txt example.asc | ||
coffee: | ||
svgtiler -f -P NES_level7.coffee example.asc |