User Tools

Site Tools


dragengine:modules:dragonscript:behavior_outline

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dragengine:modules:dragonscript:behavior_outline [2020/05/24 10:35] dragonlorddragengine:modules:dragonscript:behavior_outline [2024/03/14 16:55] (current) dragonlord
Line 3: Line 3:
 [[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[abstractions#behavior_elementsquick_and_easy_development|Behavior Elements: Quick and Easy Development]] >> **ECBehaviorOutline** [[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[abstractions#behavior_elementsquick_and_easy_development|Behavior Elements: Quick and Easy Development]] >> **ECBehaviorOutline**
 </WRAP> </WRAP>
 +
 +  * [[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:
 <code> <code>
-class MyElement extends BehaviorElementClass+class MultiInstanceClass extends BehaviorElementClass
   public var ECBehaviorComponent component   public var ECBehaviorComponent component
   public var ECBehaviorCollider collider   public var ECBehaviorCollider collider
      
-  public func new()+  public func new() super("MultiInstance")
     component = ECBehaviorComponent.new(this)     component = ECBehaviorComponent.new(this)
     collider = ECBehaviorCollider.new(this, component)     collider = ECBehaviorCollider.new(this, component)
Line 72: Line 75:
 Path to skin to use to render the outline. Path to skin to use to render the outline.
   * Full name: "outline.skin" or "outline(id).skin"   * Full name: "outline.skin" or "outline(id).skin"
-  * Type ECPSkin+  * Type skin path
   * Default Value "/shareddata/materials/outlined.deskin"   * Default Value "/shareddata/materials/outlined.deskin"
   * Example (*.deeclass) <code xml><string name='outline.skin'>outline.deskin</string></code>   * Example (*.deeclass) <code xml><string name='outline.skin'>outline.deskin</string></code>
Line 79: Line 82:
 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: "outline.model" or "outline(id).model"   * Full name: "outline.model" or "outline(id).model"
-  * Type ECPModel+  * Type model path
   * Default value //null//   * Default value //null//
   * Example (*.deeclass) <code xml><string name='outline.model'>outline.demodel</string></code>   * Example (*.deeclass) <code xml><string name='outline.model'>outline.demodel</string></code>
Line 86: Line 89:
 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: "outline.rig" or "outline(id).rig"   * Full name: "outline.rig" or "outline(id).rig"
-  * Type ECPRig+  * Type rig path
   * Default value //null//   * Default value //null//
   * Example (*.deeclass) <code xml><string name='outline.rig'>outline.derig</string></code>   * Example (*.deeclass) <code xml><string name='outline.rig'>outline.derig</string></code>
Line 93: Line 96:
 Color of the outline. For this property to have any effect the used skin requires to have a renderable named "color". Color of the outline. For this property to have any effect the used skin requires to have a renderable named "color".
   * Full name: "outline.color" or "outline(id).color"   * Full name: "outline.color" or "outline(id).color"
-  * Type ECPColor+  * Type color
   * Default value //black (0, 0, 0)//   * Default value //black (0, 0, 0)//
   * Example (*.deeclass) <code xml><color name='outline.color' r='1' g='0' b='0'/></code>   * Example (*.deeclass) <code xml><color name='outline.color' r='1' g='0' b='0'/></code>
Line 100: Line 103:
 Emissivity intensity of the outline. For this property to have any effect the used skin requires to have a renderable named "intensity". Emissivity intensity of the outline. For this property to have any effect the used skin requires to have a renderable named "intensity".
   * Full name: "outline.intensity" or "outline(id).intensity"   * Full name: "outline.intensity" or "outline(id).intensity"
-  * Type ECPFloat+  * Type floating point
   * Minimum Value 0   * Minimum Value 0
   * Default value 0   * Default value 0
Line 108: Line 111:
 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". 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".
   * Full name: "outline.thickness" or "outline(id).thickness"   * Full name: "outline.thickness" or "outline(id).thickness"
-  * 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 127: Line 130:
 ====== API Documentation ====== ====== API Documentation ======
  
-[[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Scenery_1_1ECBehaviorOutline.html|ECBehaviorOutline]].+#@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1ECBehaviorOutline.html,ECBehaviorOutline~@#.
  
 Since DragonScript Module Version **1.1** Since DragonScript Module Version **1.1**
Line 142: Line 145:
    public var ECBehaviorOutline outline    public var ECBehaviorOutline outline
        
-   public func new() +   public func new() super("ExampleElement"
-     // add behaviorscomponent, collider and outline+     // add required behaviors component and collider
      component = ECBehaviorComponent.new(this)      component = ECBehaviorComponent.new(this)
      collider = ECBehaviorCollider.new(this, component)      collider = ECBehaviorCollider.new(this, component)
-     outline = ECBehaviorOutline.new(this, component, collider) 
            
-     // set parameters of outline behavior to red color with 0.0075 thickness +     // create outline behavior and set parameters. the outline will be colored red 
-     // using a custom "outline.deskin" skin+     // and has a thickness of 0.0075 using a custom "outline.deskin" skin 
 +     outline = ECBehaviorOutline.new(this, component, collider)
      outline.getSkin().setPath("outline.deskin")      outline.getSkin().setPath("outline.deskin")
      outline.getColor().setColor(Color.red)      outline.getColor().setColor(Color.red)
dragengine/modules/dragonscript/behavior_outline.1590316551.txt.gz · Last modified: 2020/05/24 10:35 by dragonlord