Skip to content

Commit

Permalink
add scene rendering error subscription event
Browse files Browse the repository at this point in the history
  • Loading branch information
cavencj committed Jul 16, 2022
1 parent b5282d5 commit 730f310
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/event/EventType.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ const SceneEventType = {
PRE_RENDER: 'preRender',
POST_RENDER: 'postRender',
MORPH_COMPLETE: 'morphComplete',
CLOCK_TICK: 'clockTick'
CLOCK_TICK: 'clockTick',
RENDER_ERROR: 'renderError'
}

const OverlayEventType = {
Expand Down
12 changes: 12 additions & 0 deletions modules/event/type/SceneEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ class SceneEvent extends Event {
context || this
)
break
case SceneEventType.RENDER_ERROR:
removeCallback = this._scene.renderError.addEventListener(
callback,
context || this
)
break
default:
break
}
Expand Down Expand Up @@ -136,6 +142,12 @@ class SceneEvent extends Event {
context || this
)
break
case SceneEventType.RENDER_ERROR:
removed = this._scene.renderError.removeEventListener(
callback,
context || this
)
break
default:
break
}
Expand Down

0 comments on commit 730f310

Please sign in to comment.