Already talked about:
- What a part is in "scene.html"
- Accessing properties & members of a part, in expressions
- Adding methods and types to a part in methods
- Parts as resources ...
Now we need to talk about 2-way binding, part selection via matchers, ...
<<<<<<<<<<<<<<< OLD STUFF >>>>>>>>>>>>>>>>>>>
Nearly every element in a 3-D scene is (deep down inside) a Part,
simply because such elements are pieces within a larger hierarchical structure (the scene).
In addition to the hierarchical structure, each Part offers up the following information about itself:
- Attributes, as a Dict, including its name and parent.
- Sub-parts, as an ordered List.
- Unique methods which can act on the part, beyond those provided by its type
- Mixin types??, offering additional methods which can act on the part
sun = Lightbulb[
#turn it on
Access to (.attr), changing
Special attributes: parent, name,
self goes to attr&subparts, type vars
Keep here??? super
Part selection patterns
'/' operator for splitting? '%' for selecting?
Any part can be queried for a part within it. .select() returns List of all that match the pattern.
A special pre-parsed Sel"...." pattern: An element can be
- Type (the major type, or one contained within?)
- id (a symbol)
- method invocation plus parameters. Very powerful for adding all sorts of unusual matches
(all with non-zero velocity, those with severe aggro, etc.)
These can be combined with others with logical operators, and parentheses
They can be within statement sequences, separated by ;. A separator of .. is allowed to match spaced matches>
They can be within parent sequences, separated by '/'. A separator of .. is allowed here as well.
Explore more ideas CSS