How to use the compute-rhino3d.authToken function in compute-rhino3d

To help you get started, we’ve selected a few compute-rhino3d examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mm-wang / WebApplicationWorkshop / server / external / RhinoCompute / index.js View on Github external
let RhinoCompute = require("compute-rhino3d");
RhinoCompute.authToken = "bearer " + process.env.RHINOCOMPUTE_TOKEN;
/**
 * Additional functions related to planes
 * @type {Object}
 */
RhinoCompute.Plane = {
	/**
	 * Generating a new plane using a point and a vector normal
	 * @param  {Point3d}  	pointO        A point, described using X, Y, and Z
	 * @param  {Vector3d}  	vectorN       Vector3d referencing the orientation of the plane
	 * @param  {Boolean} [multiple=false] Whether multiple are being added
	 */
	newPlane: function(pointO, vectorN, multiple = false) {
		let url = "rhino/geometry/plane/new";
		if (multiple) url = url + "?multiple=true"
		let args = RhinoCompute.zipArgs(multiple, pointO, vectorN);
		var promise = RhinoCompute.computeFetch(url, args);

compute-rhino3d

JavaScript library for compute.rhino3d.com geometry service

MIT
Latest version published 3 years ago

Package Health Score

61 / 100
Full package analysis