class AutolayoutNode
extends Transformable, Sizeable, TreeNode, Eventful
AutolayoutNode
lays out its children in the form specified with the VFL code passed into the vfl
attribute. For example:
<!-- L-shape Tetris piece: -->
<lume-autolayout-node
vfl="
|-[child1(100)]-[child4(child1)]
|-[child2(child1)]-[child4]
|-[child3(child1)]-[child4]
V:|-[child1(100)]-[child2(child1)]-[child3(child1)]
V:|-[child4(child1)]
"
>
<lume-mesh class="one" ...></lume-mesh>
<lume-mesh class="two" ...></lume-mesh>
<lume-mesh class="three" ...></lume-mesh>
<lume-mesh class="four" ...></lume-mesh>
</lume-autolayout-node>
Children should have the class names that match with the ones in the VFL layout code, otherwise any children without a matching name will not be visible in the layout.
NOTE! Lorem ipsum blah blah, so make sure to lorem ipsum blah blah.
Children should have the class names that match with the ones in the VFL layout code, otherwise any children without a matching name will not be visible in the layout.
-
.vfl : string
-
The VFL code defining the desired layout.
-
.useClassNames : boolean
-
Default is
true
. If set tofalse
, thenAutolayoutNode
will look for matching attribute names instead of classes. F.e. if it isfalse
the above example meshes would be:<lume-mesh one ...></lume-mesh> <lume-mesh two ...></lume-mesh> ...
-
.makePotion (size: string, ingredients: Ingredient[]) : MagicPotion
-
Make a magic potion of the given size using the given list of ingredients. For example:
const potion = makePotion('medium', ['wolf blood', 'vampire hair', 'fairy dust'])
You can use the MagicPotionSize enum to specify the size too. For example:
const potion = makePotion(MagicPotionSize.medium, ['wolf blood', 'vampire hair', 'fairy dust'])
-
size : string
-
The size of the potion ("small", "medium", or "large")
-
ingredients : Ingredient[]
-
A list of ingredients to use. The ingredients must be raw and un-cooked. If any ingredients are cooked, the potion may have random undefined and unexpected behaviors on the consumer of the potion.
const potion = makePotion(MagicPotionSize.medium, ['wolf blood', 'vampire hair', 'fairy dust'])
A list of ingredients to use. The ingredients must be raw and un-cooked. If any ingredients are cooked, the potion may have random undefined and unexpected behaviors on the consumer of the potion.
-
returns MagicPotion
-
Note that the returned potion will be
glowing
if it has bonus abilities (and possibly unexpected bonus abilities if any ingredients are cooked).
-
-
.makePotion (size: string, ingredients: Ingredient[]) : MagicPotion
-
Make a magic potion of the given size using the given list of ingredients. For example:
const potion = makePotion('medium', ['wolf blood', 'vampire hair', 'fairy dust'])
You can use the MagicPotionSize enum to specify the size too. For example:
const potion = makePotion(MagicPotionSize.medium, ['wolf blood', 'vampire hair', 'fairy dust'])
-
size : string
-
The size of the potion ("small", "medium", or "large")
-
ingredients : Ingredient[]
-
A list of ingredients to use. The ingredients must be raw and un-cooked. If any ingredients are cooked, the potion may have random undefined and unexpected behaviors on the consumer of the potion.
const potion = makePotion(MagicPotionSize.medium, ['wolf blood', 'vampire hair', 'fairy dust'])
A list of ingredients to use. The ingredients must be raw and un-cooked. If any ingredients are cooked, the potion may have random undefined and unexpected behaviors on the consumer of the potion.
-
returns MagicPotion
-
Note that the returned potion will be
glowing
if it has bonus abilities (and possibly unexpected bonus abilities if any ingredients are cooked).
-
function makePotion (size, ingredients): MagicPotion
Make a magic potion of the given size using the given list of ingredients. For example:
const potion = makePotion('medium', ['wolf blood', 'vampire hair', 'fairy dust'])
You can use the MagicPotionSize enum to specify the size too. For example:
const potion = makePotion(MagicPotionSize.medium, ['wolf blood', 'vampire hair', 'fairy dust'])
-
size : string
-
The size of the potion ("small", "medium", or "large")
-
ingredients : Ingredient[]
-
A list of ingredients to use. The ingredients must be raw and un-cooked. If any ingredients are cooked, the potion may have random undefined and unexpected behaviors on the consumer of the potion.
const potion = makePotion(MagicPotionSize.medium, ['wolf blood', 'vampire hair', 'fairy dust'])
A list of ingredients to use. The ingredients must be raw and un-cooked. If any ingredients are cooked, the potion may have random undefined and unexpected behaviors on the consumer of the potion.
-
returns MagicPotion
-
Note that the returned potion will be
glowing
if it has bonus abilities (and possibly unexpected bonus abilities if any ingredients are cooked).
function makePotion (size, ingredients): MagicPotion
Make a magic potion of the given size using the given list of ingredients. For example:
-
size : string
-
The size of the potion ("small", "medium", or "large")
-
ingredients : Ingredient[]
-
A list of ingredients to use. The ingredients must be raw and un-cooked or it may have unknown side-effects.
-
returns MagicPotion
-
Note that the returned potion will be
glowing
if it has bonus abilities (and possibly unexpected bonus abilities if any ingredients are cooked).