Socket
Book a DemoInstallSign in
Socket

hermite-data-helper

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hermite-data-helper

A Hermite data visualization tool for rabbit-hole and three.

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

Hermite Data Helper

Build status npm version Peer dependencies

A Hermite data visualization tool for rabbit-hole and three.js.

API Reference

Installation

This library requires the peer dependency three.

npm install three hermite-data-helper

Usage

import { Scene, Vector3 } from "three";
import { HermiteData } from "rabbit-hole";
import { HermiteDataHelper } from "hermite-data-helper";

const scene = new Scene();
const data = new HermiteData();
const cellPosition = new Vector3();
const cellSize = 1;

const hermiteDataHelper = new HermiteDataHelper(cellPosition, cellSize, data);

// Render the helper.
scene.add(hermiteDataHelper);

// Access special geometry subgroups.
console.log(hermiteDataHelper.gridPoints);
console.log(hermiteDataHelper.edges);
console.log(hermiteDataHelper.normals);

// Use a different cell size, position and data set.
hermiteDataHelper.set(otherPosition, otherSize, otherData);

try {

	// Destroy the helper geometry and rebuild grid points and edges.
	hermiteDataHelper.update(true, true);

} catch(e) {

	// The provided position, size or data is invalid.

}

// Destroy the helper geometry.
hermiteDataHelper.dispose();

A full example can be found here.

Contributing

Maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Keywords

hermite

FAQs

Package last updated on 28 Jun 2020

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