🚀 Socket Launch Week 🚀 Day 2: Introducing Repository Labels and Security Policies.Learn More
Socket
Sign inDemoInstall
Socket

three-rounded-box

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

three-rounded-box

Box geometry for three.js with filleted edges

0.1.1
latest
Source
npm
Version published
Weekly downloads
333
34.82%
Maintainers
1
Weekly downloads
 
Created
Source

three-rounded-box

stable

See it live.

A geometry class with filleted edges for THREE.js. Extends THREE.BufferGeometry.

Constructor

RoundedBoxGeometry( width , height , depth , radius , radiusSegments )

width = Float           //size of box in x axis, default 1
height = Float          //size of box in y axis, default 1
depth = Float           //size of box in z axis, default 1
radius = Float          //radius of the fillet,  default 0.15
radiusSegments = Int    //segments along the fillet, default 1

Usage

NPM


var RoundedBoxGeometry = require('three-rounded-box')(THREE); //pass your instance of three

var myBox = new THREE.Mesh( new RoundedBoxGeometry( 10 , 10 , 10 , 2 , 5 ) );

myScene.add(myBox);

Test

npm install
npm start

You should see a box with smooth edges spinning.

TODO

  • cleanup the weaving logic
  • add segments along the sides

Keywords

threejs

FAQs

Package last updated on 07 Feb 2017

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