Skip to content

Commit

Permalink
fix(loop): export flush methods and types (#2580)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Oct 29, 2022
1 parent ca98ce9 commit 0f5095f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/fiber/src/core/index.tsx
Expand Up @@ -17,7 +17,7 @@ import {
privateKeys,
} from './store'
import { createRenderer, extend, Root } from './renderer'
import { createLoop, addEffect, addAfterEffect, addTail } from './loop'
import { createLoop, addEffect, addAfterEffect, addTail, flushGlobalEffects } from './loop'
import { getEventPriority, EventManager, ComputeFunction } from './events'
import {
is,
Expand Down Expand Up @@ -548,6 +548,7 @@ export {
addEffect,
addAfterEffect,
addTail,
flushGlobalEffects,
getRootState,
act,
roots as _roots,
Expand Down
2 changes: 1 addition & 1 deletion packages/fiber/src/core/loop.ts
Expand Up @@ -2,7 +2,7 @@ import * as THREE from 'three'
import { Root } from './renderer'
import { RootState, Subscription } from './store'

type GlobalRenderCallback = (timeStamp: number) => void
export type GlobalRenderCallback = (timeStamp: number) => void
type SubItem = { callback: GlobalRenderCallback }

function createSubs(callback: GlobalRenderCallback, subs: Set<SubItem>): () => void {
Expand Down
3 changes: 2 additions & 1 deletion packages/fiber/src/index.tsx
Expand Up @@ -13,8 +13,9 @@ export type {
RootState,
} from './core/store'
export type { ThreeEvent, Events, EventManager, ComputeFunction } from './core/events'
export { createEvents } from './core/events'
export type { ObjectMap, Camera } from './core/utils'
export * from './web/Canvas'
export { createEvents } from './core/events'
export { createPointerEvents as events } from './web/events'
export type { GlobalRenderCallback, GlobalEffectType } from './core/loop'
export * from './core'
2 changes: 2 additions & 0 deletions packages/fiber/src/native.tsx
Expand Up @@ -13,7 +13,9 @@ export type {
RootState,
} from './core/store'
export type { ThreeEvent, Events, EventManager, ComputeFunction } from './core/events'
export { createEvents } from './core/events'
export type { ObjectMap, Camera } from './core/utils'
export * from './native/Canvas'
export { createTouchEvents as events } from './native/events'
export type { GlobalRenderCallback, GlobalEffectType } from './core/loop'
export * from './core'

0 comments on commit 0f5095f

Please sign in to comment.