Beshoy Kamel eabb10efbf Add Matrix4.createPerspective() (#1681)
* add createPerspective

I didn't find a createPerspective function so I tried to make one, but I don't really know if that will work.

* forgot something

* add doc

* I hope that's correct 

added zero to one mode, and -one to one mode variants

* fix missing import

* I keep forgetting shit

* change to exceptions

* Update Matrix4.hx

* remove `new`

* remove period

* final changes

* Follow formatting conventions.

* Avoid using `Math.pow()`.

Haxe is unable to optimize this function away. Also, it seems to be unable to return numbers smaller than 1e-7, so that's what I used in its place. Smaller constants can work, you just can't get them from `Math.pow()`.

* Fill in missing entries.

As per all the other "create" functions.

* Use guard clause for better readability.

* Fix duplicate assignment.

* Make `createPerspective()` public.

---------

Co-authored-by: player-03 <player3.14@gmail.com>
2024-05-27 15:36:44 -04:00
2019-07-15 13:07:04 -07:00
2024-01-25 01:14:42 -05:00
2017-09-29 16:40:50 -07:00
2014-09-30 17:41:57 -07:00
2022-05-19 20:46:08 +02:00
2023-05-30 09:03:55 -07:00
2024-03-13 08:34:09 -07:00
2019-03-26 12:16:10 -07:00
2014-10-18 13:05:29 -07:00
2019-02-14 08:41:20 -08:00
2022-02-28 19:15:19 -05:00
2024-03-24 05:00:49 -04:00
2014-08-13 09:05:01 -07:00
2024-01-03 21:50:42 -08:00
2017-12-28 21:07:02 -08:00
2023-01-05 12:38:45 -05:00
2024-04-18 08:39:51 -07:00

MIT License Haxelib Version Build Status Community Discord Server

Lime

Lime is a flexible, lightweight layer for Haxe cross-platform developers.

Lime supports native, Flash and HTML5 targets with unified support for:

  • Windowing
  • Input
  • Events
  • Audio
  • Render contexts
  • Network access
  • Assets

Lime does not include a renderer, but exposes the current context:

  • Cairo
  • Canvas
  • DOM
  • Flash
  • GL

The GL context is based upon the WebGL standard, implemented for both OpenGL and OpenGL ES as needed.

Lime provides a unified audio API, but also provides access to OpenAL for advanced audio on native targets.

License

Lime is free, open-source software under the MIT license.

Installation

First install the latest version of Haxe.

Development Builds

When there are changes, Lime is built nightly. Builds are available for download here.

To install a development build, use the "haxelib local" command:

haxelib local lime-haxelib.zip

Building from Source

  1. Clone the Lime repository, as well as the submodules:

     haxelib git lime https://github.com/openfl/lime
    
  2. Install required dependencies:

     haxelib install format
     haxelib install hxp
    
  3. Copy the ndll directory from the latest Haxelib release, or see project/README.md for details about building native binaries.

  4. After any changes to the tools or lime/tools directories, rebuild from source:

     lime rebuild tools
    
  5. To switch away from a source build:

     haxelib set lime [version number]
    

Sample

You can build a sample Lime project with the following commands:

lime create HelloWorld
cd HelloWorld
lime test neko

You can also list other projects that are available using "lime create".

Targets

Lime currently supports the following targets:

lime test windows
lime test mac
lime test linux
lime test android
lime test ios
lime test html5
lime test flash
lime test air
lime test neko
lime test hl

Desktop builds are currently designed to be built on the same host OS

Description
A foundational Haxe framework for cross-platform development
Readme 357 MiB
Languages
JavaScript 45.1%
Haxe 25.9%
C 14.6%
C++ 7.5%
CSS 4.2%
Other 2.4%