Commit 99972cd9 authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau
parent 54af3133
......@@ -46,6 +46,7 @@ module.exports = {
Surface: makeSurface({
View,
GLCanvas,
getGLCanvas: glSurface => glSurface.refs.canvas,
dimensionInvariant: (value, field) =>
isAnimated(value)
? invariant(false, "GL.Surface "+field+" prop cannot be an Animated object. Use GL.AnimatedSurface instead")
......@@ -54,6 +55,7 @@ module.exports = {
AnimatedSurface: makeSurface({
View: Animated.View,
GLCanvas: Animated.createAnimatedComponent(GLCanvas),
getGLCanvas: glSurface => glSurface.refs.canvas.refs.node,
dimensionInvariant: (value, field) =>
invariant(
isAnimated(value) || typeof value === "number" && value > 0,
......
......@@ -50,5 +50,6 @@ export default C => {
renderVcontent,
renderVGL,
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