Code Monkey home page Code Monkey logo

storm's Introduction

Storm

Test Documentation Crates.io License

The storm engine is a simple set of primitives. It currently features a GLES3/GL3.3 backend and supports Windows, Linux, Web, and Mac. It's unstable, buggy, and really just a playground for me.

storm's People

Contributors

mooman219 avatar tuckerbmorgan avatar weswigham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

storm's Issues

[Proposal] Texture and Sprite API updates

Problem

Sprites require their size property to be set to the size of the texture in order to render 1:1 in regard to the texture.

It's impossible to set the Sprite's size to the texture size without knowing the size of the texture.

Currently there is no way to easily get the size of a texture.

Proposals

  1. Texture should have a new function size() which calculates the size of the Texture and returns it.

  2. Sprite should have a function from_texture(texture) which will create the Sprite with the metadata of the texture in mind. This function will automatically set the size to the correct value.

  3. load_texture() can also return the meta data of the texture when it's created.

// 1
let size = texture.size()

// 2
let sprite = Sprite::from_texture(engine.load_texture("path/to/texture.png", TextureFormat::PNG));

// 3
let (tex, tex_info) = engine.load_texture("path/to/texture.png", TextureFormat::PNG);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.