|
1
|
|
|
<?php |
|
2
|
|
|
/** @formatter:off |
|
3
|
|
|
* ****************************************************************** |
|
4
|
|
|
* Created by Marko Kungla on Jul 7, 2016 - 9:46:02 PM |
|
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 Curvedimage.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\CurvedimagePrimitiveIF; |
|
27
|
|
|
use \AframeVR\Core\Entity; |
|
28
|
|
|
use \AframeVR\Core\Helpers\MeshAttributes; |
|
29
|
|
|
|
|
30
|
|
|
/** |
|
31
|
|
|
* <a-obj-model> |
|
32
|
|
|
* |
|
33
|
|
|
* The .OBJ model primitive displays a 3D Wavefront model. It is an entity that maps the src and mtl attributes to the |
|
34
|
|
|
* obj-model component’s obj and mtl properties respectively. |
|
35
|
|
|
*/ |
|
36
|
|
|
final class Curvedimage extends Entity implements CurvedimagePrimitiveIF |
|
37
|
|
|
{ |
|
38
|
|
|
|
|
39
|
|
|
use MeshAttributes; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* Selector to obj |
|
43
|
|
|
* |
|
44
|
|
|
* Selector to an <a-asset-item> pointing to a .OBJ file or an inline path to a .OBJ file. |
|
45
|
|
|
* |
|
46
|
|
|
* @param null|string $selector |
|
|
|
|
|
|
47
|
|
|
* @return ObjModelPrimitiveIF |
|
|
|
|
|
|
48
|
|
|
*/ |
|
49
|
3 |
|
public function init() |
|
50
|
|
|
{ |
|
51
|
3 |
|
$this->component('Geometry')->primitive('cylinder'); |
|
52
|
3 |
|
$this->component('Geometry')->height(1); |
|
53
|
3 |
|
$this->component('Geometry')->radius(2); |
|
54
|
3 |
|
$this->component('Geometry')->segmentsRadial(48); |
|
55
|
3 |
|
$this->component('Geometry')->thetaLength(270); |
|
56
|
3 |
|
$this->component('Geometry')->openEnded(true); |
|
57
|
3 |
|
$this->component('Geometry')->thetaStart(0); |
|
58
|
|
|
|
|
59
|
3 |
|
$this->component('Material')->shader('flat'); |
|
60
|
3 |
|
$this->color('#fff'); |
|
61
|
3 |
|
$this->component('Material')->side('double'); |
|
62
|
3 |
|
$this->component('Material')->transparent(true); |
|
63
|
|
|
|
|
64
|
3 |
|
$this->component('Material') |
|
65
|
3 |
|
->shader() |
|
66
|
3 |
|
->repeat(-1, 1); |
|
67
|
3 |
|
return $this; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
} |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.