Skip to content
Framoo
Esc
↑↓navigate↵open⌘Jpreview
On this page

LensFlare

光源のまわりにレンズフレアを重ねます。

import { SceneLayer, SceneStage } from 'framoo/core'
import { LensFlare } from 'framoo/atmosphere'

export const LensFlarePreview = () => (
  <SceneStage>
    <SceneLayer followsCamera>
      {/* 背景画像など */}
      <LensFlare
        source={{ x: 0.08, y: 0.08 }}
        color="#ffe8bd"
        intensity={0.7}
        anamorphic
      />
    </SceneLayer>
  </SceneStage>
)

API Reference

Prop Type Default Description
source NormalizedPoint { x: 0.08, y: 0.08 } 光源の位置。x・yは画面内の割合。
color string #ffe8bd フレアの色。
intensity number 0.28 全体の強さ。0から1。
cueFrames readonly number[] 未指定 指定したフレームでフレアを発生。省略時は弱く常時表示。
decayInFrames number 省略時は約0.9秒分 キューで発生したフレアが弱まる長さ。
anamorphic boolean true 光源を横切る横長の光条を加える。

Was this page helpful?