You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
namespace Blobt\Luxcore\scene\materials; use Blobt\Luxcore\core\Base; use Blobt\Luxcore\scene\Scene;
class Mirror extends MaterialsBase {
const TYPE_MIRROR = 'mirror';
/** * @var string 反射颜色,一个小数形式的RGB色值,或是一个textures(贴图数组)中的某个键名 */ public $kr = "0.7 0.7 0.7";
public function __construct($config = []) { $this->type = self::TYPE_MIRROR; $this->id = Scene::createID(); Base::__construct($config); }
public function setRefraction($color) { if( is_object($color) ) { if( $color->registerId != null ) $this->kr = $color->registerId; else { throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); } } else $this->kr = $color; }
}
?>
|