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

@jscad/modeling

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jscad/modeling - npm Package Compare versions

Comparing version 2.0.0-alpha.7 to 2.0.0-alpha.8

src/colors/colorize.d.ts

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [2.0.0-alpha.8](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/modeling@2.0.0-alpha.7...@jscad/modeling@2.0.0-alpha.8) (2020-12-04)
**Note:** Version bump only for package @jscad/modeling
# [2.0.0-alpha.7](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/modeling@2.0.0-alpha.6...@jscad/modeling@2.0.0-alpha.7) (2020-11-07)

@@ -8,0 +16,0 @@

6

package.json
{
"name": "@jscad/modeling",
"version": "2.0.0-alpha.7",
"version": "2.0.0-alpha.8",
"description": "Constructive Solid Geometry (CSG) Library for JSCAD",
"repository": "https://github.com/jscad/OpenJSCAD.org",
"main": "src/index.js",
"types": "src/index.d.ts",
"unpkg": "dist/jscad-modeling.min.js",

@@ -12,2 +13,3 @@ "scripts": {

"test": "ava 'src/**/*.test.js' --verbose --timeout 2m",
"test:tsd": "tsd",
"preversion": "npm run build && git add dist"

@@ -62,3 +64,3 @@ },

},
"gitHead": "53f7a29f6c1dd6d683229094e5cf6ef3e3e53e32"
"gitHead": "05c069f89332a5991884b95a938338daa1006b3a"
}

@@ -8,9 +8,9 @@ const vec2 = require('../vec2')

*
* @param {vec2} p1 start point of the 2D line
* @param {vec2} p2 end point of the 2D line
* @param {vec2} point1 start point of the 2D line
* @param {vec2} point2 end point of the 2D line
* @returns {line2} a new unbounded line
* @alias module:modeling/maths/line2.fromPoints
*/
const fromPoints = (p1, p2) => {
const vector = vec2.subtract(p2, p1) // directional vector
const fromPoints = (point1, point2) => {
const vector = vec2.subtract(point2, point1) // directional vector

@@ -20,3 +20,3 @@ vec2.normal(vector, vector)

const distance = vec2.dot(p1, vector)
const distance = vec2.dot(point1, vector)

@@ -23,0 +23,0 @@ return fromValues(vector[0], vector[1], distance)

@@ -8,12 +8,12 @@ const vec3 = require('../vec3')

*
* @param {vec3} p1 - start point of the line segment
* @param {vec3} p2 - end point of the line segment
* @param {vec3} point1 - start point of the line segment
* @param {vec3} point2 - end point of the line segment
* @returns {line3} a new unbounded line
* @alias module:modeling/maths/line3.fromPoints
*/
const fromPoints = (p1, p2) => {
const direction = vec3.subtract(p2, p1)
return fromPointAndDirection(p1, direction)
const fromPoints = (point1, point2) => {
const direction = vec3.subtract(point2, point1)
return fromPointAndDirection(point1, direction)
}
module.exports = fromPoints

@@ -56,3 +56,3 @@ const flatten = require('../../utils/flatten')

* @param {Array} [options.alignTo = [0,0,0]] - The point one each axis on which to align the geometries upon. If the value is null, then the corresponding value from the group's bounding box is used.
* @param {Array} [options.grouped = false] - if true, transform all geometries by the same amount, maintaining the relative positions to each other.
* @param {Boolean} [options.grouped = false] - if true, transform all geometries by the same amount, maintaining the relative positions to each other.
* @param {...Object} geometries - the geometries to align

@@ -59,0 +59,0 @@ * @return {Object|Array} the aligned geometry, if only one was provided, or an array of aligned geometries

@@ -10,3 +10,3 @@ const cylinderElliptic = require('./cylinderElliptic')

* @param {Array} [options.center=[0,0,0]] - center of cylinder
* @param {Array} [options.height=2] - height of cylinder
* @param {Number} [options.height=2] - height of cylinder
* @param {Number} [options.radius=1] - radius of cylinder (at both start and end)

@@ -13,0 +13,0 @@ * @param {Number} [options.segments=32] - number of segments to create per full rotation

@@ -14,3 +14,3 @@ const { EPS } = require('../maths/constants')

* @param {Array} [options.center=[0,0,0]] - center of cylinder
* @param {Vector3} [options.height=2] - height of cylinder
* @param {Number} [options.height=2] - height of cylinder
* @param {Vector2D} [options.startRadius=[1,1]] - radius of rounded start, must be two dimensional array

@@ -17,0 +17,0 @@ * @param {Number} [options.startAngle=0] - start angle of cylinder, in radians

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