This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dragengine:modules:dragonscript:behavior_outline [2020/05/24 01:05] – [API Documentation] dragonlord | dragengine:modules:dragonscript:behavior_outline [2020/05/24 10:34] – [Element Class Properties] dragonlord | ||
---|---|---|---|
Line 42: | Line 42: | ||
The emissivity is optional and allows to make the outline glow in the dark. Using renderable " | The emissivity is optional and allows to make the outline glow in the dark. Using renderable " | ||
- | This set up allows to add an outline skin to any ECBehaviorComponent without the need to create skins with built-in support for outline rendering. If you want to use outline for all objects by default better build it into their skins which is faster. | + | This set up allows to add an outline skin to any [[behavior_component|ECBehaviorComponent]] without the need to create skins with built-in support for outline rendering. If you want to use outline for all objects by default better build it into their skins which is faster. |
- | This behavior can be also used to add outer skins in general to an ECBehaviorComponent. You have to adjust the outline skin to achieve the desired result. | + | This behavior can be also used to add outer skins in general to an [[behavior_component|ECBehaviorComponent]]. You have to adjust the outline skin to achieve the desired result. |
This is an effect type behavior and starts out invisible. Use setVisible() to switch the outline on and off. Typically this is done in response to game events or by other behaviors managing outline parameters. | This is an effect type behavior and starts out invisible. Use setVisible() to switch the outline on and off. Typically this is done in response to game events or by other behaviors managing outline parameters. | ||
Line 67: | Line 67: | ||
====== Element Class Properties ====== | ====== Element Class Properties ====== | ||
- | Element class properties have the prefix **outline{(id)}.**. | + | Element class properties have the prefix **outline.** or **outline(id).** |
===== skin ===== | ===== skin ===== | ||
Line 94: | Line 94: | ||
* Full name: " | * Full name: " | ||
* Type ECPColor | * Type ECPColor | ||
- | * Default value //white (1, 1, 1)// | + | * Default value //black (0, 0, 0)// |
* Example (*.deeclass) <code xml>< | * Example (*.deeclass) <code xml>< | ||
Line 127: | Line 127: | ||
====== API Documentation ====== | ====== API Documentation ====== | ||
- | [[https:// | + | [[https:// |
+ | Since DragonScript Module Version **1.1** | ||
+ | |||
+ | ====== Use Cases ====== | ||
+ | * Highlight objects player can interact with. Combine this with [[behavior_lookedat|ECBehaviorLookedAt]] using a listening to show/hide the highlight if the player looks at the object. | ||
+ | * Use for Toon-Rendering to draw a black outline on all objects. | ||
+ | ====== Element Class Example ====== | ||
+ | |||
+ | < | ||
+ | class ExampleElementClass extends BehaviorElementClass | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | // add behaviors: component, collider and outline | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | // set parameters of outline behavior to red color with 0.0075 thickness | ||
+ | // using a custom " | ||
+ | | ||
+ | | ||
+ | | ||
+ | end | ||
+ | end | ||
+ | </ |