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

cuon-matrix

v0.4.0

Published

With which you can create transformation matrices similar to how it is done in OpenGL.

Downloads

29

Readme

Matrix Transformation Library: cuon-matrix

With which you can create transformation matrices similar to how it is done in OpenGL.

Библиотека матричных преобразований: cuon-matrix

С помощью которой вы сможете создавать матрицы преобразований подобно тому, как это делается в OpenGL.

Wallaby.js Wallaby.js

npm cuon-matrix

Let's preserve the legacy for our descendants.

Сохраним наше наследие для наших потомков.

"Cuon alpinus"
In support of the Red Wolf (Cuon alpinus) listed in the Red Book.
In Siberia, locals call him "ulan shono" (red wolf) and "chikalka".

В поддержку Красного волка (Cuon alpinus) внесённого в красную книгу.
В Сибири местные жители называют его «улан шоно» (красный волк) и «чикалка».

cuon-matrix

With which you can create transformation matrices similar to how it is done in OpenGL.
С помощью которой вы сможете создавать матрицы преобразований подобно тому, как это делается в OpenGL.

In JavaScript programs, trigonometric functions are available as methods of the Math object. Similarly, the transformation matrix creation functions are available as methods of the Matrix4 object, which is defined in cuon-matrix. Matrix4 is a new object and, as its name implies, implements operations with 4×4 matrices. These matrices are represented by typed Float32Array arrays.
В программах на JavaScript тригонометрические функции доступны как методы объекта Math. Аналогично функции создания матриц преобразований доступны как методы объекта Matrix4, который определяется в cuon-matrix. Matrix4 – это новый объект и, как следует из его имени, реализует операции с матрицами 4×4. Эти матрицы представлены типизированными массивами Float32Array.

!!! пишем документацию по мере проекта

Vector3 - Трехмерный вектор (вектор из трех элементов).

Дефолтное значение.

import {Vector3} from 'cuon-matrix';

const vector3 = new Vector3();

vector3 //? Vector3 { elements: Float32Array { [Iterator]  0: 0, 1: 0, 2: 0 } }
vector3.elements.length //? 3

Задаем через конструктор начальное значение.

import {Vector3} from 'cuon-matrix';

const vector3 = new Vector3([0, 50, 0.5]);
vector3.elements //? Float32Array { [Iterator]  0: 0, 1: 50, 2: 0.5 }

Нормализация

import {Vector3} from 'cuon-matrix';

const vector3 = new Vector3([0, 50, 0.5]);
vector3.elements //? Float32Array { [Iterator]  0: 0, 1: 50, 2: 0.5 }

vector3.normalize()
vector3.elements //? Float32Array { [Iterator]  0: 0, 1: 0.9999499917030334, 2: 0.009999499656260014 }

Vector4 - Четырехмерный Вектор (вектор из четырех элементов).

Дефолтное значение.

import {Vector4} from 'cuon-matrix';

const vector4 = new Vector4();

vector4 //? Vector4 { elements: Float32Array { [Iterator]  0: 0, 1: 0, 2: 0, 3: 0 } }
vector4.elements.length //? 4

Задаем через конструктор начальное значение.

import {Vector4} from 'cuon-matrix';

const vector4 = new Vector4([0, 50, 0.5, 1]);
vector4.elements //? Float32Array { [Iterator]  0: 0, 1: 50, 2: 0.5, 3: 1 }