The Light design allow the user to add a virtual light to your model. You can position the light source to cast a shadows and lighten areas of your model parts that are in a direct line of the rays coming out of the light source. This aids in giving your model a more realistic look.
Parameter Rules
castShadow: | To cast a shadow set to true. |
Example: | true; |
color: | This is the color of the light source. |
Example: | "White" ; |
lightType: | One of: 'Ambient', 'Point', 'Directional', 'Spot', or 'Hemisphere'. |
Example: | "Ambient"; |
options: | Additional light-control options that can be supplied to three.js. |
Example: | {};<<<<Add Example |
showHelper: | If true, a geometric representation of the light is added to the scene. Not all light types have a helper. |
Example: | false ; |
target: | Defines the light aiming point. Only used by 'Directional' and 'Spot' lights. |
Example: | this.nha.origin ; |
Mixins
Render3Mixin
FrameMixin
BaseModel
RULE NAME |
TYPE |
DEFAULTS |
CATEGORY |
FLAGS |
---|---|---|---|---|
castShadow |
boolean |
true |
Render |
Cached |
color |
string |
"White" |
Render |
Cached |
lightType |
string |
"Ambient" |
Render |
Cached |
options |
any |
{} |
Render |
Cached |
showHelper |
boolean |
false |
Render |
Cached |
target |
point |
this.nha.origin |
Render |
Cached |
Project Example:
In your kBridge Examples Projects folder, open the project called ‘Extrusion-Revolution'.
Reference Location:
'world.extrusion_examples.light1'
Link: https://knowledgebridge.engineer/projects
After you open the Extrusion-Revolution project, click on the 'Run Custom UI' icon.
Set the scene from 'model' to 'Shadow Scene' (lower left corner of the graphic viewer).
Here you can try the different parameter rules and see the effects in the Shadow Scene window.