yuanjiajia
3 years ago
13 changed files with 477 additions and 124 deletions
-
48examples/print.php
-
77src/scene/Scene.php
-
205src/scene/materials/Disney.php
-
20src/scene/materials/MaterialsBase.php
-
84src/scene/materials/Metal.php
-
38src/scene/materials/Mix.php
-
33src/scene/objects/Objects.php
-
5src/scene/texture/TextureBase.php
-
72src/scene/texture/map/Blend.php
-
7src/scene/texture/map/Clouds.php
-
2src/scene/texture/map/ImageMap.php
-
2src/scene/texture/mapping/Triplanar.php
-
2src/scene/texture/transform/NormalMap.php
@ -0,0 +1,72 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene\texture\map; |
|||
use Blobt\Luxcore\scene\texture\TextureBase; |
|||
use Blobt\Luxcore\scene\Scene; |
|||
use Blobt\Luxcore\core\Base; |
|||
use Blobt\Luxcore\scene\texture\mapping\Mapping; |
|||
|
|||
class Blend extends TextureBase |
|||
{ |
|||
|
|||
/** |
|||
* 程序贴图的类型 |
|||
*/ |
|||
const TYPE_BLENDER_BLEND = 'blender_blend'; |
|||
|
|||
/** |
|||
* 噪波的 柔和 与 锐利 类型 |
|||
*/ |
|||
const TYPE_HORIZONTAL = 'horizontal'; |
|||
const TYPE_VERTICAL = 'vertical'; |
|||
|
|||
/** |
|||
* 噪波 基本效果 类型 |
|||
*/ |
|||
const TYPE_LINEAR = 'linear'; |
|||
const TYPE_QUADRATIC = 'quadratic'; |
|||
const TYPE_EASING = 'easing'; |
|||
const TYPE_DIAGONAL = 'diagonal'; |
|||
const TYPE_SPHERICAL = 'spherical'; |
|||
const TYPE_HALO = 'halo'; |
|||
const TYPE_RADIAL = 'radial'; |
|||
|
|||
/** |
|||
* @var string 渐变方向,(取值:horizontal或vertical) |
|||
*/ |
|||
public $direction = self::TYPE_HORIZONTAL; |
|||
|
|||
/** |
|||
* @var string 渐变 基本效果 类型,取值是一个属于 基本效果 的字符串常量 |
|||
*/ |
|||
public $progressiontype = self::TYPE_LINEAR; |
|||
|
|||
/** |
|||
* @var float 亮度,(取值:大于等于0的小数) |
|||
*/ |
|||
public $bright = 1; |
|||
|
|||
/** |
|||
* @var float 对比度,(取值:大于等于0的小数) |
|||
*/ |
|||
public $contrast = 1; |
|||
|
|||
/** |
|||
* @var object 铺贴参数,一个Mapping类对象 |
|||
*/ |
|||
public $mapping; |
|||
|
|||
/** |
|||
* @param $mapping 必须传入一个 Mapping类对象 |
|||
*/ |
|||
public function __construct(Mapping $mapping,$config = []) |
|||
{ |
|||
$this->mapping = $mapping; |
|||
$this->type = self::TYPE_BLENDER_BLEND; |
|||
$this->id = Scene::createID(); |
|||
Base::__construct($config); |
|||
} |
|||
|
|||
} |
|||
|
|||
?>
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue