本文整理汇总了PHP中Color::white方法的典型用法代码示例。如果您正苦于以下问题:PHP Color::white方法的具体用法?PHP Color::white怎么用?PHP Color::white使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Color
的用法示例。
在下文中一共展示了Color::white方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: poke
/**
* @GET
*/
public function poke($pk_, Color $color_ = null, Boolean $log_ = null)
{
if (null === $color_) {
$color_ = Color::white();
}
Log::info('rest/resource/test', 'Poke %s', $color_);
return $color_->toRgbString();
}
示例2: __construct
$color->g = self::legalize($c->g);
$color->b = self::legalize($c->b);
return $color;
}
static function legalize($c)
{
if ($c < 0) {
$c = 0;
}
if ($c > 1) {
$c = 1;
}
return (int) ($c * 255);
}
}
Color::$white = new Color(1.0, 1.0, 1.0);
Color::$grey = new Color(0.5, 0.5, 0.5);
Color::$black = new Color(0.0, 0.0, 0.0);
Color::$background = Color::$black;
Color::$defaultColor = Color::$black;
class Camera
{
public $forward;
public $right;
public $up;
public $pos;
public function __construct(Vector $pos, Vector $lookAt)
{
$this->pos = $pos;
$down = new Vector(0.0, -1.0, 0.0);
$this->forward = Vector::norm(Vector::minus($lookAt, $this->pos));