All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ch.viseon.threejs.declarations.extras.ShapeUtils.kt Maven / Gradle / Ivy

Go to download

Kotlin wrapper for ThreeJs, javascript library for 3d rendering

There is a newer version: 126.0.0
Show newest version
@file:JsModule("three")
package ch.viseon.threejs.declarations.extras

	/**
	* A class containing utility functions for shapes. Note that these are all linear functions so it is neccessary to calculate separately for x, y (and z, w if present) components of a vector.
	*/
open external class ShapeUtils{

	/**
	* contour -- 2D polygon. An array of THREE.Vector2() Calculate area of a ( 2D ) contour polygon.
	*/
	open fun area() : Double


	/**
	* pts -- points defining a 2D polygon Note that this is a linear function so it is neccessary to calculate separately for x, y components of a polygon. Used internally by [page:Path Path], [page:ExtrudeGeometry ExtrudeGeometry] and [page:ShapeGeometry ShapeGeometry].
	*/
	open fun isClockWise() : Boolean


	/**
	* contour -- 2D polygon. holes -- array of holes Used internally by [page:ExtrudeGeometry ExtrudeGeometry] and [page:ShapeGeometry ShapeGeometry] to calculate faces in shapes with holes.
	*/
	open fun triangulateShape() : Array
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy