update acrylic
This commit is contained in:
parent
3817bd846d
commit
d6af067186
1 changed files with 7 additions and 8 deletions
|
@ -19,14 +19,6 @@ function getOffset(): number {
|
||||||
return map(Workspace.CurrentCamera!.ViewportSize.Y, 0, 2560, 8, 56)
|
return map(Workspace.CurrentCamera!.ViewportSize.Y, 0, 2560, 8, 56)
|
||||||
}
|
}
|
||||||
|
|
||||||
const DOFEffect = Make("DepthOfFieldEffect", {
|
|
||||||
FarIntensity: 0,
|
|
||||||
InFocusRadius: 0.1,
|
|
||||||
NearIntensity: 1
|
|
||||||
})
|
|
||||||
|
|
||||||
DOFEffect.Parent = Lighting
|
|
||||||
|
|
||||||
interface acrylicProps extends Roact.JsxInstanceProperties<Frame> {
|
interface acrylicProps extends Roact.JsxInstanceProperties<Frame> {
|
||||||
radius: number
|
radius: number
|
||||||
distance: number
|
distance: number
|
||||||
|
@ -131,6 +123,13 @@ function acrylic(props: acrylicProps): Roact.Element {
|
||||||
const fovHandle = Workspace.CurrentCamera!.GetPropertyChangedSignal("FieldOfView").Connect(updateInstance)
|
const fovHandle = Workspace.CurrentCamera!.GetPropertyChangedSignal("FieldOfView").Connect(updateInstance)
|
||||||
const viewportHandle = Workspace.CurrentCamera!.GetPropertyChangedSignal("ViewportSize").Connect(updateInstance)
|
const viewportHandle = Workspace.CurrentCamera!.GetPropertyChangedSignal("ViewportSize").Connect(updateInstance)
|
||||||
|
|
||||||
|
Make("DepthOfFieldEffect", {
|
||||||
|
FarIntensity: 0,
|
||||||
|
InFocusRadius: 0.1,
|
||||||
|
NearIntensity: 1,
|
||||||
|
Parent: Lighting
|
||||||
|
})
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
posHandle.Disconnect()
|
posHandle.Disconnect()
|
||||||
fovHandle.Disconnect()
|
fovHandle.Disconnect()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue