glfx.js | An image effects library for JavaScript using WebGL | Graphics library

 by   evanw JavaScript Version: Current License: MIT

kandi X-RAY | glfx.js Summary

kandi X-RAY | glfx.js Summary

glfx.js is a JavaScript library typically used in User Interface, Graphics, WebGL applications. glfx.js has no vulnerabilities, it has a Permissive License and it has medium support. However glfx.js has 22 bugs. You can install using 'npm i glfx' or download it from GitHub, npm.

Adjust photos in your browser in realtime with glfx.js, an image effects library powered by WebGL. It uses your graphics card for image effects that would be impossible to apply in real-time with JavaScript alone. There are two caveats to glfx.js. First, WebGL is a new technology that is only available in the latest browsers and it will be quite a while before the majority of users have it. Second, due to the same origin policy, JavaScript is only allowed to read images that originate from the same domain as the script reading them, so you may have to host the images you modify.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              glfx.js has a medium active ecosystem.
              It has 3092 star(s) with 407 fork(s). There are 98 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 30 open issues and 19 have been closed. On average issues are closed in 225 days. There are 10 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of glfx.js is current.

            kandi-Quality Quality

              glfx.js has 22 bugs (0 blocker, 0 critical, 6 major, 16 minor) and 10 code smells.

            kandi-Security Security

              glfx.js has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              glfx.js code analysis shows 0 unresolved vulnerabilities.
              There are 1 security hotspots that need review.

            kandi-License License

              glfx.js is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              glfx.js releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              glfx.js saves you 288 person hours of effort in developing the same functionality from scratch.
              It has 695 lines of code, 17 functions and 47 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed glfx.js and discovered the below as its top functions. This is intended to give you an instant insight into glfx.js implemented functionality, and help decide if they suit your requirements.
            • Shows an image .
            • Determines if there are floating point textures
            • Shows a set of edges
            • Slifts a point .
            • Compiles a pixel pixel to a mesh
            • Creates a zoom blur .
            • Specular blur a texture
            • Creates a splineInterpolation interpolation object .
            • Computes the HSL component .
            • Shade the color of a circle .
            Get all kandi verified functions for this library.

            glfx.js Key Features

            No Key Features are available at this moment for glfx.js.

            glfx.js Examples and Code Snippets

            No Code Snippets are available at this moment for glfx.js.

            Community Discussions

            QUESTION

            Call different javascript files based on radio-button values
            Asked 2020-Aug-22 at 15:23

            First I would like to select among radio buttons, and then based on the selected button I would like to call a series of different javascript files (see demo.js and demo1.js is the difference). Here is my code, but it doesn't work:

            ...

            ANSWER

            Answered 2020-Aug-22 at 14:54

            The below example will display an input field when clicking yes.

            Source https://stackoverflow.com/questions/63537227

            QUESTION

            Ionic 3: WARNING: sanitizing unsafe URL value
            Asked 2019-Mar-17 at 16:41

            I´m trying to take a photo and analyze it with the tesseract OCR engine in ionic 3 App for iOS. I´m trying to run it on a iPhone 8 iOS 11.2.6 Unfortunately I get an error in Xcode after taking a photo, and the app crashes:

            NSURLConnection finished with error - code -1002 and also WARNING: sanitizing unsafe URL value assets-library://asset/asset.JPG?id=A791150A-3E89-400E-99D3-E7B3A3D888AA&ext=JPG

            Thank you for your help

            home.html

            ...

            ANSWER

            Answered 2018-May-30 at 13:01

            I do not know much about Ionic, but loading an img in Angular could cause an UnsafeUrl Exception.

            Maybe you need to use a Dom Sanitizer.

            DomSanitizer using example:

            Inject it:

            Source https://stackoverflow.com/questions/50604830

            QUESTION

            Combining effects using GLFX.js
            Asked 2018-Mar-23 at 16:54

            I have been playing around with GLFX.js and have been able to setup some effects. What I am missing however is the capability to use each effect together in a sort of layering/blending. Currently if I increase the slider for say Sepia, and then increase the value for Saturation, Sepia will reset. I have an inclination that I somehow need to save the current value of the effect on the image each time the slider is updated but not sure how to go about doing that. Any help would be greatly appreciated. Thank you in advance! Here is my Javascript code:
            `

            ...

            ANSWER

            Answered 2018-Mar-19 at 22:29

            As you probably know I can't post a runnable snippet because of cross origin security restrictions, hence I only post my source code. It works and I'm able to apply "ink" and "sepia" effects together. Notice that there is only one call to draw and update for all effects. Check by yourself and tell me whether it is helpful or not.

            Source https://stackoverflow.com/questions/49351054

            QUESTION

            Can we apply custom shaders to three.js objects dynamically
            Asked 2017-Jun-07 at 11:33

            I have a MeshBasicMaterial with VideoTexture. Can I apply custom shaders to the material dynamically. I was able to apply shader to the complete scene using THREE.EffectComposer but what if I want to apply custom filters to a specific element inside the scene. I want to test simple filters like sepia, hue-saturation. Also I must be able to switch between the two without reloading the project.

            I did not go with js libraries like seriously.js or glfx.js because it may cause problem at later stages when I will work with three.js objects not having canvas/img/video as map.

            ...

            ANSWER

            Answered 2017-Jun-07 at 10:14

            THREE.EffectComposer has a .reset function that you could use to wipe it, and then add the new filters you want. So just load the different filters you want to cycle through into an array, then reset and add passes from that array.

            EDIT I thought you were talking about changing shaders in the composer. To change shaders on an object, you can create multiple shadermaterials with different shaders but referencing the same texture, and swap the materials out on the object. So you can write a shader that reinterprets the texture colorspace to sepia, one that reinterprets the texture colorspace to bnw, or swizzles hue and saturation with r,g, or b.

            Then you swap multiple materials out on the fly. These effects are basic glsl, but if you have trouble writing the shaders, just post another thread with specific problems. If you're a glsl novice, I highly recommend the book of shaders. It's a great, fast, interactive crash course on glsl.

            But the solution to your problem is to create multiple shadermaterials, or create one shader material that does everything and then use uniforms to enable/lerp between the different effects.

            Source https://stackoverflow.com/questions/44407076

            QUESTION

            WebGL glfx.js matrix transform (perspective) crops the image if it rotates
            Asked 2017-Jan-26 at 21:29

            I am using the glfx.js library in order to use matrix transformation to create the perspective effect for my images. In my app, the system works just like photoshop's smart objects (where you render a flat image and get perspective results after render)

            glfx.js uses this function canvas.perspective(before, after) to apply matrix transforms to images, by assigning before and after coordination of the 4 points in an image, and it runs the Matrix command in the background to transform my image.

            My issue is that if the resulting image that I want after the transformation applied to it is bigger than the original image (happens if you rotate the image) then the WebGL canvas is going to crop my image.

            Look at the following fiddle:

            https://jsfiddle.net/human_a/o4yrheeq/

            ...

            ANSWER

            Answered 2017-Jan-26 at 21:29
            More pixels

            There is no cover all solution. This is because when you convert from 2D to 3D the size of the projected image can possibly approch infinity (near clipping prevents infinity) so no matter how large you make the image output there is always the possibility of some clipping being applied.

            With that caveat out of the way there is a solution for most situations that can avoid clipping. It is very simple, just expand the canvas to hold the additional content.

            Find the bounds

            To simplify the calculations I have changed the after array to a set of normalised points (they represent the after coords as a scale factor of the image size). I then use the image size to convert to real pixel coordinates. Then from that I workout the min size a texture needs to be to hold both the original image and the projection.

            With that info I just create the texture (as a canvas) draw the image. Adjust the befor array if needed (in case some projection points are in negative space) and apply the filter.

            So we have an image object that has a width and a height. And you have the projection of those points.

            Source https://stackoverflow.com/questions/41824600

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install glfx.js

            You can install using 'npm i glfx' or download it from GitHub, npm.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/evanw/glfx.js.git

          • CLI

            gh repo clone evanw/glfx.js

          • sshUrl

            git@github.com:evanw/glfx.js.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link