Spaces:
Running
Running
Download backend/libs/three/geometries/ConeGeometry.js from k-l-lambda/starry: direct link, hf CLI and curl.
- Browser
- Download file 832 Bytes
-
https://huggingface.co/spaces/k-l-lambda/starry/resolve/main/backend/libs/three/geometries/ConeGeometry.js
- Command line
-
hf download hf://spaces/k-l-lambda/starry/backend/libs/three/geometries/ConeGeometry.js
-
curl -L -o ConeGeometry.js https://huggingface.co/spaces/k-l-lambda/starry/resolve/main/backend/libs/three/geometries/ConeGeometry.js
832 Bytes
| import { CylinderGeometry } from './CylinderGeometry.js'; | |
| class ConeGeometry extends CylinderGeometry { | |
| constructor(radius = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2) { | |
| super(0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength); | |
| this.type = 'ConeGeometry'; | |
| this.parameters = { | |
| radius: radius, | |
| height: height, | |
| radialSegments: radialSegments, | |
| heightSegments: heightSegments, | |
| openEnded: openEnded, | |
| thetaStart: thetaStart, | |
| thetaLength: thetaLength, | |
| }; | |
| } | |
| static fromJSON(data) { | |
| return new ConeGeometry(data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength); | |
| } | |
| } | |
| export { ConeGeometry, ConeGeometry as ConeBufferGeometry }; | |