Skip to content

Commit

Permalink
Merge pull request #120 from xewl/master
Browse files Browse the repository at this point in the history
Add missing SphereGeometry parameters
  • Loading branch information
klevron committed Jan 22, 2022
2 parents aee1719 + 10b86ef commit da6396c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/geometries/SphereGeometry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ export const props = {
radius: { type: Number, default: 1 },
widthSegments: { type: Number, default: 12 },
heightSegments: { type: Number, default: 12 },
phiStart: { type: Number, default: 0 },
phiLength: { type: Number, default: Math.PI * 2 },
thetaStart: { type: Number, default: 0 },
thetaLength: { type: Number, default: Math.PI },
} as const

export function createGeometry(comp: any): SphereGeometry {
return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments)
return new SphereGeometry(comp.radius, comp.widthSegments, comp.heightSegments, comp.phiStart, comp.phiLength, comp.thetaStart, comp.thetaLength)
}

export default geometryComponent('SphereGeometry', props, createGeometry)

0 comments on commit da6396c

Please sign in to comment.