Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gl-react-native-v2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
gl-react-native-v2
Commits
26e91c7b
Commit
26e91c7b
authored
Oct 01, 2015
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Tests and bundle
parent
a863fe5c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
76 deletions
+81
-76
Examples/AdvancedEffects/iOS/main.jsbundle
Examples/AdvancedEffects/iOS/main.jsbundle
+13
-13
Examples/Simple/iOS/main.jsbundle
Examples/Simple/iOS/main.jsbundle
+19
-19
Examples/Tests/Copy.js
Examples/Tests/Copy.js
+8
-3
Examples/Tests/Layer.js
Examples/Tests/Layer.js
+1
-1
Examples/Tests/iOS/main.jsbundle
Examples/Tests/iOS/main.jsbundle
+19
-19
Examples/Tests/index.ios.js
Examples/Tests/index.ios.js
+5
-5
Examples/VideoBlur/ios/main.jsbundle
Examples/VideoBlur/ios/main.jsbundle
+16
-16
No files found.
Examples/AdvancedEffects/iOS/main.jsbundle
View file @
26e91c7b
This diff is collapsed.
Click to expand it.
Examples/Simple/iOS/main.jsbundle
View file @
26e91c7b
This diff is collapsed.
Click to expand it.
Examples/Tests/Copy.js
View file @
26e91c7b
...
@@ -8,9 +8,14 @@ precision highp float;
...
@@ -8,9 +8,14 @@ precision highp float;
varying vec2 uv;
varying vec2 uv;
uniform sampler2D t;
uniform sampler2D t;
uniform bool preventAlphaMult;
void main () {
void main () {
gl_FragColor = texture2D(t, uv);
vec4 c = texture2D(t, uv);
if (preventAlphaMult) // (I know if() in glsl is not performant. don't do this. It's just for readability purpose here)
gl_FragColor = c / sqrt(c.a);
else
gl_FragColor = c;
}
}
`
`
}
}
...
@@ -18,13 +23,13 @@ void main () {
...
@@ -18,13 +23,13 @@ void main () {
class
Copy
extends
GL
.
Component
{
class
Copy
extends
GL
.
Component
{
render
()
{
render
()
{
const
{
width
,
height
,
children
:
t
,
...
rest
}
=
this
.
props
;
const
{
width
,
height
,
children
:
t
,
last
,
...
rest
}
=
this
.
props
;
return
<
GL
.
View
return
<
GL
.
View
{...
rest
}
{...
rest
}
shader
=
{
shaders
.
Copy
}
shader
=
{
shaders
.
Copy
}
width
=
{
width
}
width
=
{
width
}
height
=
{
height
}
height
=
{
height
}
uniforms
=
{{
t
}}
uniforms
=
{{
t
,
preventAlphaMult
:
!
last
}}
/>
;
/>
;
}
}
}
}
...
...
Examples/Tests/Layer.js
View file @
26e91c7b
...
@@ -13,7 +13,7 @@ uniform sampler2D t2;
...
@@ -13,7 +13,7 @@ uniform sampler2D t2;
void main () {
void main () {
vec4 c1 = texture2D(t1, uv);
vec4 c1 = texture2D(t1, uv);
vec4 c2 = texture2D(t2, uv);
vec4 c2 = texture2D(t2, uv);
gl_FragColor =
mix(c1, c2,
c2.a);
gl_FragColor =
vec4(mix(c1.rgb, c2.rgb, c2.a), c1.a +
c2.a);
}
}
`
`
}
}
...
...
Examples/Tests/iOS/main.jsbundle
View file @
26e91c7b
This diff is collapsed.
Click to expand it.
Examples/Tests/index.ios.js
View file @
26e91c7b
...
@@ -94,14 +94,14 @@ class Tests extends React.Component {
...
@@ -94,14 +94,14 @@ class Tests extends React.Component {
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
last
>
http
:
//i.imgur.com/mp79p5T.png
http
:
//i.imgur.com/mp79p5T.png
<
/Copy
>
<
/Copy
>
<
/NativeLayer
>
<
/NativeLayer
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
last
>
<
Copy
>
<
Copy
>
http
:
//i.imgur.com/mp79p5T.png
http
:
//i.imgur.com/mp79p5T.png
<
/Copy
>
<
/Copy
>
...
@@ -110,7 +110,7 @@ class Tests extends React.Component {
...
@@ -110,7 +110,7 @@ class Tests extends React.Component {
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
last
>
<
Copy
>
<
Copy
>
<
Copy
>
<
Copy
>
http
:
//i.imgur.com/mp79p5T.png
http
:
//i.imgur.com/mp79p5T.png
...
@@ -121,7 +121,7 @@ class Tests extends React.Component {
...
@@ -121,7 +121,7 @@ class Tests extends React.Component {
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
last
>
<
Copy
>
<
Copy
>
<
Copy
>
<
Copy
>
<
Copy
>
<
Copy
>
...
@@ -135,7 +135,7 @@ class Tests extends React.Component {
...
@@ -135,7 +135,7 @@ class Tests extends React.Component {
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
<
Copy
>
<
Copy
last
>
<
Copy
>
<
Copy
>
<
Copy
>
<
Copy
>
<
Copy
>
<
Copy
>
...
...
Examples/VideoBlur/ios/main.jsbundle
View file @
26e91c7b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment