Completed
Branch master (fb685e)
by Marko
02:00
created

DefaultMethods::transparent()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 1
b 0
f 0
cc 2
eloc 2
nc 2
nop 2
crap 2
1
<?php
2
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jun 27, 2016 - 2:54:40 AM
5
 * Contact      [email protected]
6
 * @copyright   2016 Marko Kungla - https://github.com/mkungla
7
 * @license     The MIT License (MIT)
8
 * 
9
 * @category       AframeVR
10
 * @package        aframe-php
11
 * 
12
 * Lang         PHP (php version >= 7)
13
 * Encoding     UTF-8
14
 * File         DefaultMethods.php
15
 * Code format  PSR-2 and 12
16
 * @link        https://github.com/mkungla/aframe-php
17
 ^ @issues      https://github.com/mkungla/aframe-php/issues
18
 * ********************************************************************
19
 * Contributors:
20
 * @author Marko Kungla <[email protected]>
21
 * ********************************************************************
22
 * Comments:
23
 * @formatter:on */
24
namespace AframeVR\Core\Components\Material\Methods;
25
26
class DefaultMethods
27
{
28
29
    /**
30
     * opacity
31
     *
32
     * Extent of transparency. If the transparent property is not true,
33
     * then the material will remain opaque and opacity will only affect color.
34
     *
35
     * @param &array $dom_attributes            
0 ignored issues
show
Documentation introduced by
The doc-type &array could not be parsed: Unknown type name "&array" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
36
     * @param float $opacity            
37
     * @return void
38
     */
39 8
    public function opacity(array &$dom_attributes, float $opacity = 1.0)
40
    {
41 8
        $dom_attributes['opacity'] = $opacity;
42 8
    }
43
44
    /**
45
     * transparent
46
     *
47
     * Whether material is transparent. Transparent entities are rendered after non-transparent entities.
48
     *
49
     * @param &array $dom_attributes            
0 ignored issues
show
Documentation introduced by
The doc-type &array could not be parsed: Unknown type name "&array" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
50
     * @param bool|string $transparent            
51
     * @return void
52
     */
53 7
    public function transparent(array &$dom_attributes, bool $transparent = false)
54
    {
55 7
        $dom_attributes['transparent'] = $transparent ? 'true' : 'false';
56 7
    }
57
58
    /**
59
     * Which sides of the mesh to render.
60
     * Can be one of front, back, or double
61
     *
62
     * @param &array $dom_attributes            
0 ignored issues
show
Documentation introduced by
The doc-type &array could not be parsed: Unknown type name "&array" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
63
     * @param string $side            
64
     * @return void
65
     */
66 1
    public function side(array &$dom_attributes, string $side = 'front')
67
    {
68 1
        $dom_attributes['side'] = $side;
69 1
    }
70
}
71