diff --git a/src/scene/texture/procedural/Brick.php b/src/scene/texture/procedural/Brick.php new file mode 100644 index 0000000..f4167a7 --- /dev/null +++ b/src/scene/texture/procedural/Brick.php @@ -0,0 +1,147 @@ +mapping = $mapping; + else $this->mapping = new Mapping(); + $this->type = self::TYPE_BRICK; + $this->id = Scene::createID(); + Base::__construct($config); + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置砖块纹理的bricktex颜色 + */ + 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 接收一个贴图对象或小数形式的色值,设置砖块纹理的brickmodtex颜色 + */ + 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; + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置砖块纹理的砖缝颜色 + */ + public function setMortartex($color) + { + if( is_object($color) ) + { + if( $color->registerId != null ) $this->mortartex = $color->registerId; + else + { + throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); + } + } + else $this->mortartex = $color; + } + +} + +?> diff --git a/src/scene/texture/procedural/Wireframe.php b/src/scene/texture/procedural/Wireframe.php new file mode 100644 index 0000000..6bed3c9 --- /dev/null +++ b/src/scene/texture/procedural/Wireframe.php @@ -0,0 +1,71 @@ +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; + } + +} + +?>