js13k-2d | A 2kb webgl 2d sprite renderer , designed for Js13kGames | Game Engine library

 by   kutuluk JavaScript Version: 0.8.0 License: MIT

kandi X-RAY | js13k-2d Summary

kandi X-RAY | js13k-2d Summary

js13k-2d is a JavaScript library typically used in Gaming, Game Engine, WebGL applications. js13k-2d has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i js13k-2d' or download it from GitHub, npm.

A 2kb webgl 2d sprite renderer, designed for Js13kGames.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              js13k-2d has a low active ecosystem.
              It has 91 star(s) with 4 fork(s). There are 10 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 2 open issues and 2 have been closed. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of js13k-2d is 0.8.0

            kandi-Quality Quality

              js13k-2d has 0 bugs and 0 code smells.

            kandi-Security Security

              js13k-2d has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              js13k-2d code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              js13k-2d 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

              js13k-2d releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.
              js13k-2d saves you 16 person hours of effort in developing the same functionality from scratch.
              It has 46 lines of code, 0 functions and 5 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed js13k-2d and discovered the below as its top functions. This is intended to give you an instant insight into js13k-2d implemented functionality, and help decide if they suit your requirements.
            • Creates a t object
            • append element
            • turns a node element
            Get all kandi verified functions for this library.

            js13k-2d Key Features

            No Key Features are available at this moment for js13k-2d.

            js13k-2d Examples and Code Snippets

            No Code Snippets are available at this moment for js13k-2d.

            Community Discussions

            QUESTION

            What is the fastest way to render subsets of a single texture onto a WebGL canvas?
            Asked 2020-Jul-08 at 09:24

            If you have a single power-of-two width/height texture (say 2048) and you want to blit out scaled and translated subsets of it (say 64x92-sized tiles scaled down) as quickly as possible onto another texture (as a buffer so it can be cached when not dirty), then draw that texture onto a webgl canvas, and you have no more requirements - what is the fastest strategy?

            Is it first loading the source texture, binding an empty texture to a framebuffer, rendering the source with drawElementsInstancedANGLE to the framebuffer, then unbinding the framebuffer and rendering to the canvas?

            I don't know much about WebGL and I'm trying to write a non-stateful version of https://github.com/kutuluk/js13k-2d (that just uses draw() calls instead of sprites that maintain state, since I would have millions of sprites). Before I get too far into the weeds, I'm hoping for some feedback.

            ...

            ANSWER

            Answered 2020-Jul-08 at 09:24

            There is no generic fastest way. The fastest way is different by GPU and also different by specifics.

            • Are you drawing lots of things the same size?
            • Are the parts of the texture atlas the same size?
            • Will you be rotating or scaling each instance?
            • Can their movement be based on time alone?
            • Will their drawing order change?
            • Do the textures have transparency?
            • Is that transparency 100% or not (0 or 1) or is it various values in between?

            I'm sure there's tons of other considerations. For every consideration I might choose a different approach.

            In general your idea if using drawElementsAngleInstanced seems fine but without knowing exactly what you're trying to do and on which device it's hard to know.

            Here's some tests of drawing lots of stuff.

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install js13k-2d

            Then with a module bundler like rollup or webpack, use as you would anything else:.

            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
            Install
          • npm

            npm i js13k-2d

          • CLONE
          • HTTPS

            https://github.com/kutuluk/js13k-2d.git

          • CLI

            gh repo clone kutuluk/js13k-2d

          • sshUrl

            git@github.com:kutuluk/js13k-2d.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

            Explore Related Topics

            Consider Popular Game Engine Libraries

            godot

            by godotengine

            phaser

            by photonstorm

            libgdx

            by libgdx

            aseprite

            by aseprite

            Babylon.js

            by BabylonJS

            Try Top Libraries by kutuluk

            xterm-color-chart

            by kutulukGo

            js13k-ecs

            by kutulukJavaScript

            loglevel-plugin-remote

            by kutulukJavaScript

            loglevel-plugin-prefix

            by kutulukJavaScript

            number-to-base64

            by kutulukJavaScript