Invalidate viewer on hover style updates
This commit is contained in:
@@ -89,7 +89,7 @@ const PostProcessingPasses = ({
|
|||||||
}: {
|
}: {
|
||||||
hoverStyles?: HoverStyles
|
hoverStyles?: HoverStyles
|
||||||
}) => {
|
}) => {
|
||||||
const { gl: renderer, scene, camera } = useThree()
|
const { gl: renderer, invalidate, scene, camera } = useThree()
|
||||||
const renderPipelineRef = useRef<RenderPipeline | null>(null)
|
const renderPipelineRef = useRef<RenderPipeline | null>(null)
|
||||||
const hasPipelineErrorRef = useRef(false)
|
const hasPipelineErrorRef = useRef(false)
|
||||||
const retryCountRef = useRef(0)
|
const retryCountRef = useRef(0)
|
||||||
@@ -155,6 +155,7 @@ const PostProcessingPasses = ({
|
|||||||
hoverHiddenColor.value.setHex(style.hiddenColor)
|
hoverHiddenColor.value.setHex(style.hiddenColor)
|
||||||
hoverStrength.value = style.strength
|
hoverStrength.value = style.strength
|
||||||
hoverPulseMix.value = style.pulse ? 0 : 1
|
hoverPulseMix.value = style.pulse ? 0 : 1
|
||||||
|
invalidate()
|
||||||
}, [
|
}, [
|
||||||
hoverHiddenColor,
|
hoverHiddenColor,
|
||||||
hoverHighlightMode,
|
hoverHighlightMode,
|
||||||
@@ -162,6 +163,7 @@ const PostProcessingPasses = ({
|
|||||||
hoverStrength,
|
hoverStrength,
|
||||||
hoverStyles,
|
hoverStyles,
|
||||||
hoverVisibleColor,
|
hoverVisibleColor,
|
||||||
|
invalidate,
|
||||||
])
|
])
|
||||||
|
|
||||||
// Build / rebuild the post-processing pipeline
|
// Build / rebuild the post-processing pipeline
|
||||||
|
|||||||
Reference in New Issue
Block a user