# <vgl-lathe-geometry>
A mesh, line, or point geometry representation.
# Example Usage
<template>
<div>
<vgl-renderer antialias>
<template #scene>
<vgl-scene>
<vgl-mesh>
<template #geometry>
<vgl-lathe-geometry
:points="[[1, -5], [2, -4], [3, -2], [3.5, 0], [4, 3], [3.5, 5]]"
:segments="segments"
:phi-length="phiLength"
/>
</template>
<template #material>
<vgl-mesh-standard-material side="double" />
</template>
</vgl-mesh>
<vgl-ambient-light />
<vgl-directional-light
:position-y="1"
:position-z="2"
/>
</vgl-scene>
</template>
<template #camera>
<vgl-perspective-camera
position="spherical"
:position-radius="15"
:position-phi="1"
:position-theta="-0.5"
rotation="lookAt"
/>
</template>
</vgl-renderer>
<aside>
<label>Segments<input
v-model.number="segments"
type="range"
></label>
<label>Phi<input
v-model.number="phiLength"
type="range"
max="6.29"
step="0.01"
></label>
</aside>
</div>
</template>
<script>
import * as components from 'vue-gl';
export default {
components,
data: () => ({
segments: 16,
phiLength: Math.PI * 2,
}),
};
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Props
name
: string
An arbitrary name of the instance.
Defaults to [object Object]drawRangeStart
: number
The start index of drawn part in the geometry.
Defaults to [object Object]drawRangeCount
: number
The number of indices to be drawn.
Defaults to [object Object]groups
: array
An array of objects those represent index groups to be rendered in separate draw calls.
Defaults to [object Object]points
: array
An array of values or an array of pairs of values. [x1, y1, x2, y2, x3, y3, ...] or [[x1, y1], [x2, y2], [x3, y3], ...]
Defaults to [object Object]segments
: number
The number of circumference segments to generate.
Defaults to [object Object]phiStart
: number
The starting angle in radians.
Defaults to [object Object]phiLength
: number
The radian (0 to 2PI) range of the lathed section.
Defaults to [object Object]
# Slots
Any
Each attribute in a named slot will be added to the geometry with the same name as the slot.