ComputedStyles
ComputedStyles holds the previous and computed declarations for a single Object3D
The computed styles are the combined output of a node's {AssignedStyles}, {LocalStyles}, and inherited computed parental styles.
Constructor Summary
Public Constructor | ||
public |
constructor(node: THREE.Object3D) |
Member Summary
Public Members | ||
public get |
changes is used by the Stylist to know which styles need to be updated on the Three.Object3D |
|
public |
node: * |
Method Summary
Public Methods | ||
public |
Iterate over the current declarations |
|
public |
computeStyles(assignedStyles: AssignedStyles, localStyles: LocalStyles, parentalComputedStyles: ComputedStyles) Compute the final styles for a node:
|
|
public |
get(property: *): * |
|
public |
getBoolean(property: *, defaultValue: undefined): * |
|
public |
|
|
public |
getNumberArray(property: *, defaultValue: undefined, fillLength: undefined): * |
|
public |
|
|
public |
|
Public Constructors
public constructor(node: THREE.Object3D) source
Params:
Name | Type | Attribute | Description |
node | THREE.Object3D |
Public Members
public get changes: Array<property{string}>: * source
changes is used by the Stylist to know which styles need to be updated on the Three.Object3D
public node: * source
Public Methods
public computeStyles(assignedStyles: AssignedStyles, localStyles: LocalStyles, parentalComputedStyles: ComputedStyles) source
Compute the final styles for a node:
- apply the assigned styles
- apply local styles that aren't assigned
- apply inherited styles that aren't assigned or local
Params:
Name | Type | Attribute | Description |
assignedStyles | AssignedStyles | ||
localStyles | LocalStyles | ||
parentalComputedStyles | ComputedStyles |
|
TODO:
- calculate relative units like `em`
- handle the 'inherit' and 'reset' style values
- handle inherited sub values like `border-top: 10px` inherited on top of `border: 0`
- handle value methods like `calc()`
public getBoolean(property: *, defaultValue: undefined): * source
Params:
Name | Type | Attribute | Description |
property | * | ||
defaultValue | undefined |
|
Return:
* |
public getNumber(property: *, defaultValue: undefined): * source
Params:
Name | Type | Attribute | Description |
property | * | ||
defaultValue | undefined |
|
Return:
* |
public getNumberArray(property: *, defaultValue: undefined, fillLength: undefined): * source
Return:
* |