Skip to content

Raw Value

There are occasions where we want to declaratively set a value on a property of the parent element, we can use ngt-value element to do this.

<!-- this saves us the trouble of getting access to the PointLight instance and assign 0.0001 to light.shadow.bias -->
<ngt-point-light>
<!-- with this, we can declaratively assign a value to shadow.bias; under an ngIf or something similar -->
<ngt-value [rawValue]="0.0001" attach="shadow.bias" />
</ngt-point-light>