Last active
October 9, 2015 23:19
-
-
Save doubleshow/51ec21cf0e717bfa14e7 to your computer and use it in GitHub Desktop.
craftml
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
<craft> | |
<info> | |
<title>New Language Features</title> | |
</info> | |
<params a="3" b="4" c="5" h="10"/> | |
<!-- equivalent to --> | |
<!--<param name="a" default="3" type="int"/>--> | |
<!--<param name="b" default="4" type="int"/>--> | |
<!--<param name="c" default="5" type="int"/>--> | |
<!--<param name="h" default="10" type="int"/>--> | |
<row> | |
<col> | |
<row c-repeat="r in [a,b,c]"> | |
<!-- c-if evalutes r>3 and renders <g> if it's true --> | |
<g c-if="r>3" l="lineupX() centerY()"> | |
<cube c-repeat="s in [1,2,3]" t="size({{s}} {{s*r}} {{r}})"/> | |
</g> | |
</row> | |
</col> | |
<!-- inline module import --> | |
<chair c-repeat="c" module="NkUGx" t="fit(10 10 {{h}})"></chair> | |
<!-- subsequent uses no longer need the module id --> | |
<chair/> | |
</row> | |
</craft> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment