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\Scale\Methods; |
25
|
|
|
|
26
|
|
|
class DefaultMethods |
27
|
|
|
{ |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Roll, rotation about the X-axis. |
31
|
|
|
* |
32
|
|
|
* @param array $dom_attributes |
33
|
|
|
* @param float|int $scale_x |
|
|
|
|
34
|
|
|
* @return void |
35
|
|
|
*/ |
36
|
51 |
|
public function scaleX(array &$dom_attributes, float $scale_x) |
37
|
|
|
{ |
38
|
51 |
|
$dom_attributes['x'] = $scale_x; |
39
|
51 |
|
} |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Pitch, rotation about the Y-axis. |
43
|
|
|
* |
44
|
|
|
* @param array $dom_attributes |
45
|
|
|
* @param float|int $scaling_y |
|
|
|
|
46
|
|
|
* @return void |
47
|
|
|
*/ |
48
|
51 |
|
public function scaleY(array &$dom_attributes, float $scale_y) |
49
|
|
|
{ |
50
|
51 |
|
$dom_attributes['y'] = $scale_y; |
51
|
51 |
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* Yaw, rotation about the Z-axis. |
55
|
|
|
* |
56
|
|
|
* @param array $dom_attributes |
57
|
|
|
* @param float|int $scale_z |
|
|
|
|
58
|
|
|
* @return void |
59
|
|
|
*/ |
60
|
51 |
|
public function scaleZ(array &$dom_attributes, float $scale_z) |
61
|
|
|
{ |
62
|
51 |
|
$dom_attributes['z'] = $scale_z; |
63
|
51 |
|
} |
64
|
|
|
} |
65
|
|
|
|