npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fnet/glsl-processor

v0.1.3

Published

The project related to the source code provided is **@fnet/glsl-processor**. This project functions as a **GLSL (OpenGL Shading Language) program code handler**, designed to parse, manipulate, and generate GLSL source code. It leverages a package called *

Downloads

180

Readme

@fnet/glsl-processor

The project related to the source code provided is @fnet/glsl-processor. This project functions as a GLSL (OpenGL Shading Language) program code handler, designed to parse, manipulate, and generate GLSL source code. It leverages a package called ShaderFrog GLSL Parser.

Functionality

Primarily, this GLSL processor operates in three core stages: Parsing, Resolving Includes, and Code Generation.

  • Parsing: In this stage, the processor tackles the received GLSL source code, converting it into an Abstract Syntax Tree (AST), which is a neat representation of the program's structure.

  • Resolving Includes: Once the AST is obtained, the processor attempts to resolve any #include directives contained within the initial source code. These instructions indicate that the content of another file should be inserted at that particular point in the source code. @fnet/glsl-processor is capable of handling these instructions and properly integrates the content from other files.

  • Code Generation: After all #include directives are resolved, the processor generates the modified GLSL source code back from the manipulated AST and finally returns the transpiled source code.

Thus, the main purpose of @fnet/glsl-processor is to allow for handling and editing GLSL source code programmatically, taking care of resolving dependencies, and offering the necessary infrastructure to make further transformations or analyses on the GLSL code. This makes it a valuable tool for developing graphical applications where GLSL shader manipulation may be required.

Usage

From an end-user perspective, using @fnet/glsl-processor involves providing the necessary GLSL file and a specific fileLoader function while calling the index function. The fileLoader works as a custom file loading mechanic, and should be a function that takes a filename and returns the content of that file. This function is used to load any files referenced by #include directives. Upon execution, @fnet/glsl-processor returns the transpiled GLSL code.