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
f952d130
Commit
f952d130
authored
Sep 09, 2015
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better fix for the local image working with preload
parent
a8384035
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
Examples/AdvancedEffects/src/Transition.js
Examples/AdvancedEffects/src/Transition.js
+1
-0
Examples/AdvancedEffects/src/Vignette.js
Examples/AdvancedEffects/src/Vignette.js
+1
-0
RNGL/GLImage.m
RNGL/GLImage.m
+3
-2
No files found.
Examples/AdvancedEffects/src/Transition.js
View file @
f952d130
...
@@ -6,6 +6,7 @@ class Transition extends React.Component {
...
@@ -6,6 +6,7 @@ class Transition extends React.Component {
const
{
width
,
height
,
shader
,
progress
,
from
,
to
,
uniforms
}
=
this
.
props
;
const
{
width
,
height
,
shader
,
progress
,
from
,
to
,
uniforms
}
=
this
.
props
;
const
scale
=
React
.
PixelRatio
.
get
();
const
scale
=
React
.
PixelRatio
.
get
();
return
<
GL
.
View
return
<
GL
.
View
preload
shader
=
{
shader
}
shader
=
{
shader
}
width
=
{
width
}
width
=
{
width
}
height
=
{
height
}
height
=
{
height
}
...
...
Examples/AdvancedEffects/src/Vignette.js
View file @
f952d130
...
@@ -56,6 +56,7 @@ class Vignette extends React.Component {
...
@@ -56,6 +56,7 @@ class Vignette extends React.Component {
const
{
width
,
height
,
time
,
source
}
=
this
.
props
;
const
{
width
,
height
,
time
,
source
}
=
this
.
props
;
const
{
finger
}
=
this
.
state
;
const
{
finger
}
=
this
.
state
;
return
<
GL
.
View
return
<
GL
.
View
preload
onStartShouldSetResponder
=
{()
=>
true
}
onStartShouldSetResponder
=
{()
=>
true
}
onMoveShouldSetResponder
=
{()
=>
true
}
onMoveShouldSetResponder
=
{()
=>
true
}
onResponderMove
=
{
this
.
onResponderMove
}
onResponderMove
=
{
this
.
onResponderMove
}
...
...
RNGL/GLImage.m
View file @
f952d130
...
@@ -79,9 +79,10 @@ RCT_NOT_IMPLEMENTED(-init)
...
@@ -79,9 +79,10 @@ RCT_NOT_IMPLEMENTED(-init)
// Load the image (without resizing it)
// Load the image (without resizing it)
if
(
!
[
_src
hasPrefix
:
@"http://"
]
&&
!
[
_src
hasPrefix
:
@"https://"
])
{
if
(
!
[
_src
hasPrefix
:
@"http://"
]
&&
!
[
_src
hasPrefix
:
@"https://"
])
{
// N.B: in this case we don't trigger onload because image is already loaded.
// this behavior is specific to GLCanvas needs
self
.
image
=
[
UIImage
imageNamed
:
_src
];
self
.
image
=
[
UIImage
imageNamed
:
_src
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
(
_onload
)
_onload
();
});
}
else
{
}
else
{
_loading
=
[
_bridge
.
imageLoader
loadImageWithTag
:
_src
_loading
=
[
_bridge
.
imageLoader
loadImageWithTag
:
_src
size:
CGSizeZero
size:
CGSizeZero
...
...
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