Commit 99972cd9 authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau
parent 54af3133
...@@ -46,6 +46,7 @@ module.exports = { ...@@ -46,6 +46,7 @@ module.exports = {
Surface: makeSurface({ Surface: makeSurface({
View, View,
GLCanvas, GLCanvas,
getGLCanvas: glSurface => glSurface.refs.canvas,
dimensionInvariant: (value, field) => dimensionInvariant: (value, field) =>
isAnimated(value) isAnimated(value)
? invariant(false, "GL.Surface "+field+" prop cannot be an Animated object. Use GL.AnimatedSurface instead") ? invariant(false, "GL.Surface "+field+" prop cannot be an Animated object. Use GL.AnimatedSurface instead")
...@@ -54,6 +55,7 @@ module.exports = { ...@@ -54,6 +55,7 @@ module.exports = {
AnimatedSurface: makeSurface({ AnimatedSurface: makeSurface({
View: Animated.View, View: Animated.View,
GLCanvas: Animated.createAnimatedComponent(GLCanvas), GLCanvas: Animated.createAnimatedComponent(GLCanvas),
getGLCanvas: glSurface => glSurface.refs.canvas.refs.node,
dimensionInvariant: (value, field) => dimensionInvariant: (value, field) =>
invariant( invariant(
isAnimated(value) || typeof value === "number" && value > 0, isAnimated(value) || typeof value === "number" && value > 0,
......
...@@ -50,5 +50,6 @@ export default C => { ...@@ -50,5 +50,6 @@ export default C => {
renderVcontent, renderVcontent,
renderVGL, renderVGL,
getPixelRatio, getPixelRatio,
C.getGLCanvas,
); );
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment