Parses the dissolve factor (opacity) d
(fields []string)
| 778 | // Parses the dissolve factor (opacity) |
| 779 | // d <factor> |
| 780 | func (dec *Decoder) parseDissolve(fields []string) error { |
| 781 | |
| 782 | if len(fields) < 1 { |
| 783 | return dec.formatError("'d' with no fields") |
| 784 | } |
| 785 | val, err := strconv.ParseFloat(fields[0], 32) |
| 786 | if err != nil { |
| 787 | return dec.formatError("'d' parse float error") |
| 788 | } |
| 789 | dec.matCurrent.Opacity = float32(val) |
| 790 | return nil |
| 791 | } |
| 792 | |
| 793 | // Parses ambient reflectivity: |
| 794 | // Ka r g b |
no test coverage detected