Completed
Pull Request — master (#63)
by Marko
03:19
created

Cone::reset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 13
ccs 12
cts 12
cp 1
rs 9.4285
cc 1
eloc 11
nc 1
nop 0
crap 1
1
<?php
2
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jul 8, 2016 - 3:16:33 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         Cone.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\Core\Entity;
27
use \AframeVR\Interfaces\EntityInterface;
28
29
final class Cone extends Entity implements EntityInterface
30
{
31
32
    /**
33
     * <a-cone>
34
     *
35
     * The cone primitive creates a cone shape. It is an entity that prescribes the geometry with its geometric
36
     * primitive set to cone.
37
     * 
38
     * @return void
39
     */
40 1
    public function reset()
41
    {
42 1
        parent::reset();
43 1
        $this->component('Geometry')->primitive('cone');
44 1
        $this->component('Geometry')->height(1);
45 1
        $this->component('Geometry')->openEnded(false);
46 1
        $this->component('Geometry')->radiusBottom(1);
47 1
        $this->component('Geometry')->radiusTop(.8);
48 1
        $this->component('Geometry')->segmentsHeight(18);
49 1
        $this->component('Geometry')->segmentsRadial(36);
50 1
        $this->component('Geometry')->thetaLength(360);
51 1
        $this->component('Geometry')->thetaStart(0);
52
    }
53
}