| @@ 26-64 (lines=39) @@ | ||
| 23 | * @formatter:on */ |
|
| 24 | namespace AframeVR\Core\Components\Rotation\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 $roll |
|
| 34 | * @return void |
|
| 35 | */ |
|
| 36 | public function updateX(array &$dom_attributes, float $roll) |
|
| 37 | { |
|
| 38 | $dom_attributes['x'] = $roll; |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * Pitch, rotation about the Y-axis. |
|
| 43 | * |
|
| 44 | * @param &array $dom_attributes |
|
| 45 | * @param float|int $pitch |
|
| 46 | * @return void |
|
| 47 | */ |
|
| 48 | public function updateY(array &$dom_attributes, float $pitch) |
|
| 49 | { |
|
| 50 | $dom_attributes['y'] = $pitch; |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Yaw, rotation about the Z-axis. |
|
| 55 | * |
|
| 56 | * @param &array $dom_attributes |
|
| 57 | * @param float|int $yaw |
|
| 58 | * @return void |
|
| 59 | */ |
|
| 60 | public function updateZ(array &$dom_attributes, float $yaw) |
|
| 61 | { |
|
| 62 | $dom_attributes['z'] = $yaw; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| @@ 26-64 (lines=39) @@ | ||
| 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 $roll |
|
| 34 | * @return void |
|
| 35 | */ |
|
| 36 | public function updateX(array &$dom_attributes, float $roll) |
|
| 37 | { |
|
| 38 | $dom_attributes['x'] = $roll; |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * Pitch, rotation about the Y-axis. |
|
| 43 | * |
|
| 44 | * @param &array $dom_attributes |
|
| 45 | * @param float|int $pitch |
|
| 46 | * @return void |
|
| 47 | */ |
|
| 48 | public function updateY(array &$dom_attributes, float $pitch) |
|
| 49 | { |
|
| 50 | $dom_attributes['y'] = $pitch; |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Yaw, rotation about the Z-axis. |
|
| 55 | * |
|
| 56 | * @param &array $dom_attributes |
|
| 57 | * @param float|int $yaw |
|
| 58 | * @return void |
|
| 59 | */ |
|
| 60 | public function updateZ(array &$dom_attributes, float $yaw) |
|
| 61 | { |
|
| 62 | $dom_attributes['z'] = $yaw; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||