Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vertex.gl

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vertex.gl

procedural geometry generator for graphic pipline.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

vertex.gl

A procedural geometry generator for graphic pipline. It will generate a single buffer with positions, uvs and indices supportted. You can calculate normal in fragment shader to do the lightting stuff.

Currently only a crystal like geometry is supported. Hopefully I'll have time to add more interesting things.

Have fun!

一个随机几何体顶点生成器,可用于创意编程之类的捣鼓。

生成的单个几何体包括位置、纹理坐标2种顶点,包含索引。没有生成法线,可以在片元着色器中用微分计算法线处理光照。

目前仅支持水晶簇几何体,希望能持续填坑,增加更多随机几何体样式。

Sample

Crystal

Blue Crystal with 45 degree distribution limitition. 27个单晶45度随机分布的蓝色水晶簇。

canvas-preview

Red Crystal with 180 degree distribution limitition. 77个单晶180度随机分布的红色水晶簇。

canvas-preview

Usage

Install

npm install -i vertex.gl

API reference

const VTX = require('vertex.gl);

//generate a crystal geometry buffer with 27 pyramids and a random distribution angle of 45 degree.
const vertexBuffer = VTX.cristals(27, 45);

const positions = vertexBuffer.positions;
const uvs = vertexBuffer.uvs;
const indices = vertexBuffer.indics;

//do the rendering stuff ...

Keywords

FAQs

Package last updated on 23 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc