ponup/glm

A port of the OpenGL Mathematics library (GLM) to PHP

Maintainers

Details

github.com/Ponup/glm

Source

Issues

Installs: 766

Dependents: 2

Suggesters: 0

Security: 0

Stars: 5

Watchers: 0

Forks: 2

Open Issues: 0

pkg:composer/ponup/glm

1.1.0 2019-05-12 14:13 UTC

This package is auto-updated.

Last update: 2025-10-13 06:46:12 UTC


README

Build Status

PHP GLM

A port of the GLM library to the PHP language.

Example usage

<?php

require 'vendor/autoload.php';

use glm\vec3;
use glm\mat4;

$matrix = new mat4; // 4x4 identity matrix

echo $matrix, PHP_EOL;
// Output: mat4x4((1.000000, 0.000000, 0.000000, 0.000000), (0.000000, 1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 1.000000, 0.000000), (0.000000, 0.000000, 0.000000, 1.000000))

echo $matrix->scale(5), PHP_EOL;
// Output: mat4x4((5.000000, 0.000000, 0.000000, 0.000000), (0.000000, 5.000000, 0.000000, 0.000000), (0.000000, 0.000000, 5.000000, 0.000000), (0.000000, 0.000000, 0.000000, 1.000000))