This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
dragengine:modules:dragonscript:behavior_outline [2020/05/24 01:18] – [color] dragonlord | dragengine:modules:dragonscript:behavior_outline [2020/05/24 14:54] – dragonlord | ||
---|---|---|---|
Line 3: | Line 3: | ||
[[: | [[: | ||
</ | </ | ||
+ | |||
+ | * [[behaviors_use_cases|Behaviors Explained: By Use-Case]] | ||
+ | * [[behaviors_a_to_z|Behaviors Explained: From A to Z]] | ||
====== ECBehaviorOutline ====== | ====== ECBehaviorOutline ====== | ||
Line 52: | Line 55: | ||
Multiple instances of ECBehaviorOutline can be used for example to create different outlines to switch on and off or to add multiple outline skins to a single ECBehaviorComponent. Keep in mind though that each instance of ECBehaviorOutline creates a new component and dynamic skin resource which can impact performance if the used model has high polygon count. To use multiple instances use code like this in your subclass constructor: | Multiple instances of ECBehaviorOutline can be used for example to create different outlines to switch on and off or to add multiple outline skins to a single ECBehaviorComponent. Keep in mind though that each instance of ECBehaviorOutline creates a new component and dynamic skin resource which can impact performance if the used model has high polygon count. To use multiple instances use code like this in your subclass constructor: | ||
< | < | ||
- | class MyElement | + | class MultiInstanceClass |
public var ECBehaviorComponent component | public var ECBehaviorComponent component | ||
public var ECBehaviorCollider collider | public var ECBehaviorCollider collider | ||
| | ||
- | public func new() | + | public func new() super(" |
component = ECBehaviorComponent.new(this) | component = ECBehaviorComponent.new(this) | ||
collider = ECBehaviorCollider.new(this, | collider = ECBehaviorCollider.new(this, | ||
Line 67: | Line 70: | ||
====== 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 ===== | ||
Path to skin to use to render the outline. | Path to skin to use to render the outline. | ||
- | * Full name: " | + | * Full name: " |
- | * Type ECPSkin | + | * Type skin path |
* Default Value "/ | * Default Value "/ | ||
* Example (*.deeclass) <code xml>< | * Example (*.deeclass) <code xml>< | ||
Line 78: | Line 81: | ||
===== model ===== | ===== model ===== | ||
Path to model to use instead of the model of the dependency component | Path to model to use instead of the model of the dependency component | ||
- | * Full name: " | + | * Full name: " |
- | * Type ECPModel | + | * Type model path |
* Default value //null// | * Default value //null// | ||
* Example (*.deeclass) <code xml>< | * Example (*.deeclass) <code xml>< | ||
Line 85: | Line 88: | ||
===== rig ===== | ===== rig ===== | ||
Path to rig to use instead of the rig of the dependency component. If null uses the dependency component rig. | Path to rig to use instead of the rig of the dependency component. If null uses the dependency component rig. | ||
- | * Full name: " | + | * Full name: " |
- | * Type ECPRig | + | * Type rig path |
* Default value //null// | * Default value //null// | ||
* Example (*.deeclass) <code xml>< | * Example (*.deeclass) <code xml>< | ||
Line 92: | Line 95: | ||
===== color ===== | ===== color ===== | ||
Color of the outline. For this property to have any effect the used skin requires to have a renderable named " | Color of the outline. For this property to have any effect the used skin requires to have a renderable named " | ||
- | * Full name: " | + | * Full name: " |
- | * Type ECPColor | + | * Type color |
* Default value //black (0, 0, 0)// | * Default value //black (0, 0, 0)// | ||
* Example (*.deeclass) <code xml>< | * Example (*.deeclass) <code xml>< | ||
Line 99: | Line 102: | ||
===== intensity ===== | ===== intensity ===== | ||
Emissivity intensity of the outline. For this property to have any effect the used skin requires to have a renderable named " | Emissivity intensity of the outline. For this property to have any effect the used skin requires to have a renderable named " | ||
- | * Full name: " | + | * Full name: " |
- | * Type ECPFloat | + | * Type floating point |
* Minimum Value 0 | * Minimum Value 0 | ||
* Default value 0 | * Default value 0 | ||
Line 107: | Line 110: | ||
===== thickness ===== | ===== thickness ===== | ||
Thickness of the outline. The measurement unit of this value depends on the outline type in the used skin. For this property to have any effect the used skin requires to have a renderable named " | Thickness of the outline. The measurement unit of this value depends on the outline type in the used skin. For this property to have any effect the used skin requires to have a renderable named " | ||
- | * Full name: " | + | * Full name: " |
- | * Type ECPFloat | + | * Type floating point |
* Minimum Value 0 | * Minimum Value 0 | ||
* Default value 0.005 | * Default value 0.005 | ||
Line 119: | Line 122: | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
- | Thie behavior does not support optional behaviors. | + | This behavior does not support optional behaviors. |
====== Persistency ====== | ====== Persistency ====== | ||
Line 142: | Line 145: | ||
| | ||
- | | + | |
- | // add behaviors: component, collider | + | // add required |
| | ||
| | ||
- | | ||
- | // set parameters | + | // |
- | // using a custom " | + | // |
+ | | ||
| | ||
| |