diff --git a/src/scene/Scene.php b/src/scene/Scene.php index 0210c50..d800b22 100644 --- a/src/scene/Scene.php +++ b/src/scene/Scene.php @@ -57,7 +57,7 @@ class Scene extends BaseCfg { if( $value->registerId != null ) { - return $value; + return $value->registerId; } else { diff --git a/src/scene/texture/procedural/Checkerboard2d.php b/src/scene/texture/procedural/Checkerboard2d.php new file mode 100644 index 0000000..983a531 --- /dev/null +++ b/src/scene/texture/procedural/Checkerboard2d.php @@ -0,0 +1,63 @@ +mapping = $mapping; + else $this->mapping = new Mapping(); + $this->type = self::TYPE_CHECKERBOARD2D; + $this->id = Scene::createID(); + Base::__construct($config); + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置棋盘格子颜色1 + */ + public function setTexture1($color) + { + $this->texture1 = Scene::testAbnormal($color); + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置棋盘格子颜色2 + */ + public function setTexture2($color) + { + $this->texture2 = Scene::testAbnormal($color); + } + +} + +?> diff --git a/src/scene/texture/procedural/Checkerboard3d.php b/src/scene/texture/procedural/Checkerboard3d.php new file mode 100644 index 0000000..a3e4133 --- /dev/null +++ b/src/scene/texture/procedural/Checkerboard3d.php @@ -0,0 +1,63 @@ +mapping = $mapping; + else $this->mapping = new Mapping(); + $this->type = self::TYPE_CHECKERBOARD3D; + $this->id = Scene::createID(); + Base::__construct($config); + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置棋盘格子颜色1 + */ + public function setTexture1($color) + { + $this->texture1 = Scene::testAbnormal($color); + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置棋盘格子颜色2 + */ + public function setTexture2($color) + { + $this->texture2 = Scene::testAbnormal($color); + } + +} + +?> diff --git a/src/scene/texture/procedural/Fbm.php b/src/scene/texture/procedural/Fbm.php index e7bb950..0ee865a 100644 --- a/src/scene/texture/procedural/Fbm.php +++ b/src/scene/texture/procedural/Fbm.php @@ -21,7 +21,7 @@ class Fbm extends TextureBase public $octaves = "8"; /** - * @var string 粗糙度,控制每个色块边缘向黑色过的平滑度,值越小,越平滑,同时 octaves参数对结果的影响力越小,反之亦然,(0-1的小数) + * @var string 粗糙度,控制每个色块边缘向黑色过渡的平滑度,值越小,越平滑,同时 octaves参数对结果的影响力越小,反之亦然,(0-1的小数) */ public $roughness = 0.5; diff --git a/src/scene/texture/procedural/Marble.php b/src/scene/texture/procedural/Marble.php new file mode 100644 index 0000000..018cd3a --- /dev/null +++ b/src/scene/texture/procedural/Marble.php @@ -0,0 +1,53 @@ +mapping = $mapping; + else $this->mapping = new Mapping(); + $this->type = self::TYPE_MARBLE; + $this->id = Scene::createID(); + Base::__construct($config); + } + +} + +?>