diff --git a/package.json b/package.json index f637509..4fef381 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ }, "dependencies": { "@rbxts/character-promise": "^1.0.2", - "@rbxts/flipper": "^2.0.1", "@rbxts/log": "^0.6.3", "@rbxts/make": "^1.0.6", "@rbxts/matter": "^0.6.2-ts.6", @@ -42,7 +41,6 @@ "@rbxts/rewire": "^0.3.0", "@rbxts/roact": "^1.4.4-ts.0", "@rbxts/roact-hooked": "^2.6.0", - "@rbxts/roact-hooked-plus": "^1.8.1", "@rbxts/roact-reflex": "^2.1.0", "@rbxts/services": "^1.5.1", "@rbxts/testez": "^0.4.2-ts.0", diff --git a/src/ReplicatedStorage/ui/components/acrylic/index.tsx b/src/ReplicatedStorage/ui/components/acrylic/index.tsx index 82cd98d..e59eaa1 100644 --- a/src/ReplicatedStorage/ui/components/acrylic/index.tsx +++ b/src/ReplicatedStorage/ui/components/acrylic/index.tsx @@ -27,13 +27,6 @@ interface acrylicProps extends Roact.JsxInstanceProperties { Change?: Roact.JsxInstanceChangeEvents } -Make("DepthOfFieldEffect", { - FarIntensity: 0, - InFocusRadius: 0.1, - NearIntensity: 1, - Parent: Lighting -}) - function acrylic(props: acrylicProps): Roact.Element { const { radius, distance } = props @@ -130,6 +123,13 @@ function acrylic(props: acrylicProps): Roact.Element { const fovHandle = Workspace.CurrentCamera!.GetPropertyChangedSignal("FieldOfView").Connect(updateInstance) const viewportHandle = Workspace.CurrentCamera!.GetPropertyChangedSignal("ViewportSize").Connect(updateInstance) + Make("DepthOfFieldEffect", { + FarIntensity: 0, + InFocusRadius: 0.1, + NearIntensity: 1, + Parent: Lighting + }) + return () => { posHandle.Disconnect() fovHandle.Disconnect() diff --git a/src/StarterPlayer/StarterPlayerScripts/main.client.ts b/src/StarterPlayer/StarterPlayerScripts/main.client.ts index 31125c1..6c03ce1 100644 --- a/src/StarterPlayer/StarterPlayerScripts/main.client.ts +++ b/src/StarterPlayer/StarterPlayerScripts/main.client.ts @@ -1,6 +1,6 @@ import { CharacterRigR6 } from "@rbxts/character-promise" import Log, { Logger } from "@rbxts/log" -import { Players } from "@rbxts/services" +import { Players, Workspace } from "@rbxts/services" import { start } from "ReplicatedStorage/ecs" import { ClientState } from "ReplicatedStorage/ecs/state" import { Host } from "ReplicatedStorage/hosts" @@ -25,4 +25,8 @@ const clientState = new ClientState( const worldAndClientState = start(HOST, clientState) showGUI(worldAndClientState[0], clientState) -setEnvironment(HOST) \ No newline at end of file +setEnvironment(HOST) + +task.delay(10, () => { + print(Workspace.CurrentCamera?.GetChildren()) +}) \ No newline at end of file diff --git a/src/StarterPlayer/StarterPlayerScripts/ui/hotbar/slot.tsx b/src/StarterPlayer/StarterPlayerScripts/ui/hotbar/slot.tsx index 27f718b..1fe0ad8 100644 --- a/src/StarterPlayer/StarterPlayerScripts/ui/hotbar/slot.tsx +++ b/src/StarterPlayer/StarterPlayerScripts/ui/hotbar/slot.tsx @@ -4,8 +4,6 @@ import { useWorldContext } from "../contexts/worldContext" import { ContextActionService, HttpService } from "@rbxts/services" import Padding from "ReplicatedStorage/ui/components/padding" import Acrylic from "ReplicatedStorage/ui/components/acrylic" -import { Spring } from "@rbxts/flipper" -import { useGroupMotor } from "@rbxts/roact-hooked-plus" interface SlotProps extends Roact.JsxInstanceProperties { index: number @@ -16,9 +14,6 @@ interface SlotProps extends Roact.JsxInstanceProperties { Change?: Roact.JsxInstanceChangeEvents } -const SLOT_DEFAULT = [new Spring(.7, { frequency: 6 }), new Spring(6, { frequency: 6 })] -const SLOT_ACTIVE = [new Spring(.5, { frequency: 6 }), new Spring(5, { frequency: 6 })] - function slot(props: SlotProps): Roact.Element { const { index, keycode, tool } = props @@ -27,19 +22,13 @@ function slot(props: SlotProps): Roact.Element { delete spreadableProps.keycode delete spreadableProps.tool - const [slotBgTransparencyAndSlotRatio, setSlotGoal] = useGroupMotor([.7, 6]) - const slotBgTransparency = slotBgTransparencyAndSlotRatio.map((t) => t[0]) - const slotRatio = slotBgTransparencyAndSlotRatio.map((t) => t[1]) - const { clientState } = useWorldContext() const handleActivated = (): void => { if (tool.Parent !== clientState.character) { clientState.character.Humanoid.EquipTool(tool) - setSlotGoal(SLOT_ACTIVE) } else { clientState.character.Humanoid.UnequipTools() - setSlotGoal(SLOT_DEFAULT) } } @@ -54,27 +43,25 @@ function slot(props: SlotProps): Roact.Element { false, keycode ) - - tool.Unequipped.Connect(() => { - setSlotGoal(SLOT_DEFAULT) - }) }) return (