PointLight
Namespace:
namespace Lenga\Engine\Core;
class PointLight
Methods
getColor
public function getColor()
Example
use Lenga\Engine\Core\Behaviour;
use Lenga\Engine\Core\PointLight;
class TorchLight extends Behaviour
{
public function start(): void
{
$light = $this->getComponent(PointLight::class);
$light->intensity = 1.5;
$light->range = 10.0;
$light->setColor(255, 200, 100, 255); // Warm orange light
}
public function update(): void
{
$light = $this->getComponent(PointLight::class);
// Flicker effect
$light->intensity = 1.5 + MathUtil::sin(Time::time() * 5) * 0.3;
}
}