iterami/Docs.htm/common HTM Projects/webgl.js Prefabs/prefabs_webgl_lines_shrub(args)
- Creates a lines shrub prefab with the specified properties.
- Additional default args are handled by webgl_prefab_args(args).
- Translation is the start of the line.
- The color of each vertex is either base or leaf color, depending on distance from the start of the line.
- Types:
- Offset: random number is added to the translation for each new point.
- Range: each point is a random translation within specified cuboid relative to the start of the line.
base-color
| [0, 0, 0, 1]
| array of numbers
|
draw-mode
| LINE_STRIP
| string
|
leaf-color
| [1, 1, 1, 1]
| array of numbers
|
leaf-distance
| .5
| number
|
points
| 10
| number
|
type
| 'range'
| 'offset' or 'range'
|
x-max
| 1
| number
|
x-min
| -1
| number
|
y-max
| 1
| number
|
y-min
| -1
| number
|
z-max
| 1
| number
|
z-min
| -1
| number
|