diff --git a/src/scene/texture/procedural/Brick.php b/src/scene/texture/procedural/Brick.php index f4167a7..7aeee33 100644 --- a/src/scene/texture/procedural/Brick.php +++ b/src/scene/texture/procedural/Brick.php @@ -66,12 +66,12 @@ class Brick extends TextureBase public $mortarsize = 0.01; /** - * @var float 砖块互切(错位)百分比,(取值:0-1的小数) + * @var float TODO:砖块互切(错位)百分比,(取值:0-1的小数),此参数在UI界面中渲染正常的,但在控制台下失效。 */ public $brickrun = 0.75; /** - * @var object 调制偏置,(取值:-1至1的小数),当值越接近-1时,以$bricktex色的砖块就越多,反之接近1时,以 + * @var float 调制偏置,(取值:-1至1的小数),当值越接近-1时,以$bricktex色的砖块就越多,反之接近1时,以 * $mortartex色的砖块就越多。 */ public $brickmodbias = 0; diff --git a/src/scene/texture/procedural/Fbm.php b/src/scene/texture/procedural/Fbm.php new file mode 100644 index 0000000..e7bb950 --- /dev/null +++ b/src/scene/texture/procedural/Fbm.php @@ -0,0 +1,43 @@ +mapping = $mapping; + else $this->mapping = new Mapping(); + $this->type = self::TYPE_FBM; + $this->id = Scene::createID(); + Base::__construct($config); + } + +} + +?> diff --git a/src/scene/texture/procedural/ImageMap.php b/src/scene/texture/procedural/ImageMap.php index 8733eaf..32d6797 100644 --- a/src/scene/texture/procedural/ImageMap.php +++ b/src/scene/texture/procedural/ImageMap.php @@ -10,15 +10,14 @@ class ImageMap extends TextureBase { /** - * 加载外部图像文件的程序纹里 + * 加载外部图像文件的程序纹里, */ const TYPE_IMAGEMAP = 'imagemap'; /** - * @var string 光域网文件名及路径,如果为空,则表示不使用光域网 + * @var string 一个图像文件的文件名及所在路径组成的字符串 */ public $file; - /** * @var string 亮度增益,当发光强度单位是 artistic 类型时,或是 坎德拉类型且坎德拉参数下勾选为(每平方米时),可以设置此参数,分别 @@ -29,22 +28,23 @@ class ImageMap extends TextureBase /** * @var float 校正光域网文件的gamma值,(固定取值:1) */ - public $gamma; + public $gamma = 2.2; /** * @var bool 是否随机重复 */ public $randomizedtilingEnable = self::CLOSE; - - /** - * @var object 铺贴参数,一个Mapping类对象 - */ - public $mapping; /** * @var string 输出图片储存方式 */ public $storage = 'byte'; + + + /** + * @var object 铺贴参数,一个Mapping类对象 + */ + public $mapping; /** * @param object $mapping 如需自定义铺贴参数,必须传入一个 Mapping类对象,否则使用一个默认的铺贴参数 diff --git a/src/scene/texture/procedural/Wireframe.php b/src/scene/texture/procedural/Wireframe.php deleted file mode 100644 index 6bed3c9..0000000 --- a/src/scene/texture/procedural/Wireframe.php +++ /dev/null @@ -1,71 +0,0 @@ -type = self::TYPE_WIREFRAME; - $this->id = Scene::createID(); - Base::__construct($config); - } - - /** - * @param object $color 接收一个贴图对象或小数形式的色值,设置线框纹理的线框颜色 - */ - public function setBricktex($color) - { - if( is_object($color) ) - { - if( $color->registerId != null ) $this->bricktex = $color->registerId; - else - { - throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); - } - } - else $this->bricktex = $color; - } - - /** - * @param object $color 接收一个贴图对象或小数形式的色值,设置线框纹理的内部面颜色 - */ - public function setBrickmodtex($color) - { - if( is_object($color) ) - { - if( $color->registerId != null ) $this->brickmodtex = $color->registerId; - else - { - throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); - } - } - else $this->brickmodtex = $color; - } - -} - -?>