|
|
@ -13,6 +13,54 @@ class MaterialsBase extends BaseCfg |
|
|
|
*/ |
|
|
|
public $type; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @var float 前向不透明度,一个0-1的小数,或是一个textures(贴图数组)中的某个键名 |
|
|
|
*/ |
|
|
|
public $transparencyFront; |
|
|
|
|
|
|
|
/** |
|
|
|
* @var float 后向不透明度,一个0-1的小数,或是一个textures(贴图数组)中的某个键名 |
|
|
|
*/ |
|
|
|
public $transparencyBack; |
|
|
|
|
|
|
|
/** |
|
|
|
* @var key 是一个textures(贴图数组)中的某个键名 |
|
|
|
*/ |
|
|
|
public $bumptex; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @var string 一个色值,表示材质的自发光颜色,如果为空,则关闭材质的自发光, |
|
|
|
*/ |
|
|
|
public $emission; |
|
|
|
|
|
|
|
/** |
|
|
|
* @var object 一个 Emission类 的实例, |
|
|
|
*/ |
|
|
|
public $emissionCfg; |
|
|
|
|
|
|
|
/** |
|
|
|
* @var object 一个 Visibility类 的实例 |
|
|
|
*/ |
|
|
|
public $visibility; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @var string 内部体积材质,(体积材质数组的某个键名) |
|
|
|
*/ |
|
|
|
public $volumeInterior; |
|
|
|
|
|
|
|
/** |
|
|
|
* @var string 外部体积材质,(体积材质数组的某个键名) |
|
|
|
*/ |
|
|
|
public $volumeExterior; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @var string 此参数控制材质与光线作用时,产生阴影的透明度,或控制阴影的颜色(取值,小数形式的色值) |
|
|
|
*/ |
|
|
@ -56,33 +104,45 @@ class MaterialsBase extends BaseCfg |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @var string 一个色值,表示材质的自发光颜色,如果为空,则关闭材质的自发光, |
|
|
|
*/ |
|
|
|
public $emission; |
|
|
|
|
|
|
|
/** |
|
|
|
* @var object 一个 Emission类 的实例, |
|
|
|
*/ |
|
|
|
public $emissionCfg; |
|
|
|
|
|
|
|
/** |
|
|
|
* @var object 一个 Visibility类 的实例 |
|
|
|
*/ |
|
|
|
public $visibility; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function setTransparencyFront($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->cards != null ) $this->transparencyFront = $color->cards; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->transparencyFront = $color; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @var string 内部体积材质,(体积材质数组的某个键名) |
|
|
|
*/ |
|
|
|
public $volumeInterior; |
|
|
|
public function setTransparencyBack($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->cards != null ) $this->transparencyBack = $color->cards; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->transparencyBack = $color; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @var string 外部体积材质,(体积材质数组的某个键名) |
|
|
|
*/ |
|
|
|
public $volumeExterior; |
|
|
|
public function setBumptex($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->cards != null ) $this->bumptex = $color->cards; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->bumptex = $color; |
|
|
|
} |
|
|
|
|
|
|
|
public function setEmission($color,Emission $emissionCfg = null,Visibility $visibility = null) |
|
|
|
{ |
|
|
@ -127,7 +187,7 @@ class MaterialsBase extends BaseCfg |
|
|
|
} |
|
|
|
else $this->volumeExterior = $volumeExterior; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
?>
|