Completed
Push — master ( 697c38...fae26d )
by Marko
9s
created

Image   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 25
ccs 11
cts 11
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 8 1
A defaults() 0 5 1
1
<?php
2
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jul 6, 2016 - 2:28:38 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         Image.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\Extras\Primitives;
25
26
use \AframeVR\Interfaces\Extras\Primitives\ImagePrimitiveIF;
27
28
class Image extends Plane implements ImagePrimitiveIF
29
{
30
31 5
    public function init()
32
    {
33 5
        parent::init();
34 5
        $this->component('Material')->shader('flat');
35 5
        $this->component('Material')->side('double');
36 5
        $this->color('#FFF');
37 5
        $this->transparent(true);
38 5
    }
39
40
    /**
41
     * Set defaults
42
     *
43
     * {@inheritdoc}
44
     *
45
     * @return void
46
     */
47 5
    public function defaults()
48
    {
49 5
        $this->height(1.75);
50 5
        $this->width(1.75);
51
    }
52
}