Comments (4)
I'm not sure to understand what you mean by "capture view as svg", right now we can capture the gl view as a PNG.
Also 3D models are currently out of scope of gl-react but discussion on supporting vertex data / vertex shader has been started: https://github.com/ProjectSeptemberInc/gl-react/issues/6
from gl-react.
hey @gre
thanks for the info.
i need to do the same thing as you mentioned, capturing the gl view as a PNG, except i was hoping to capture it as SVG. SVG being a vector format.
Maybe this should be a new "want" for the issues ? Dont know what you think. With threejs its possible.. It captures everything but not texture. So its technically possible.
Regarding 3D models, it seems your using a 3d webgl canvas, but the architecture is only designed for 2D operations ? The 2D functionality is something i need, but it would be also useful to me (and maybe others) for reactive 3D functionality too. Again i guess its up to you if you want to allow this featured as a possible thing to work on going forward.
I could help with some of the work, but i would be very curious what others also feel, because its a fair bit of work.
Btw this is a really great project. I am also hoping to help with supporting feature 7 API parity between the web and native implementations.
from gl-react.
There is no such thing as "3d webgl canvas". WebGL is a low level API, fundamentally a 2D API, that allows you to implement incredible effects/draws and with the performance of the GPU. Of course you can do 3D with WebGL and this is what most people do with WebGL but our use-case is more wide than this:
gl-react
is a thin wrapper on top of WebGL to use GL Shaders in React context and currently focus on making stack of effects. As being a thin wrapper, gl-react does not abstract WebGL so much, you have to write fragment shaders to do effects.
Also Canvas is fundamental a 2D pixels area. It is a bitmap and it is not vectorial as SVG is. Therefore I see no way to generically generate an SVG out of this.
Currently it does not implement vertex data / vertex shader which is needed for making polygons and therefore making 3D stuff. This is tracked in https://github.com/ProjectSeptemberInc/gl-react/issues/6 but it is not in our priority right now because the task is huge. Especially if we want to make it also for gl-react-native
.
If you want to do more advanced 3D, I would recommend using Three.js in React, maybe via https://github.com/Izzimach/react-three . Any classical WebGL library can be used in React with a component that render() a <canvas />
(see Working with the Browser ).
from gl-react.
Makes sense. Thanks for filling me in, because i was not sure.
I will have a look at react.three, as yes it does sounds like more of what i am looking for. I did not know about that one.
Closing...
from gl-react.
Related Issues (20)
- Possible Bug: Image data flipped when captured
- TypeError: undefined is not a function (near '...GL.createComponent...') HOT 1
- image disappeared after refocus the screen
- gl-react-native App crashed with Surface with style prop HOT 5
- Update Peer Dependency to gl-react-5?
- How to remove white Background from the image HOT 1
- GL is currently not available (have you enabled remote debbuging) shows up on Android HOT 1
- Camera preview dimensions ignored? - distorted on iOS HOT 2
- Question About Texts on Images in react-native HOT 1
- [iOS] app crash calling "capture": NSInvalidArgumentException HOT 2
- How to load spine animation json file in react-native HOT 1
- Specify texture format
- GL.Node does not support video surfaces HOT 2
- Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader' HOT 4
- Bad quality camera on Android devices HOT 5
- Image from local storage are not reading , surface view coming black.
- headless example HOT 1
- How to use gl-react with next.js ? Is there any documentation about this ? HOT 1
- Runtime error: `Unable to resolve module expo-modules-core`
- ReferenceError: Can't find variable: global HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gl-react.