VglRingGeometry
This is a simple shape component of Euclidean geometry, corresponding THREE.RingGeometry. It is contructed from a number of triangular segments that are oriented around a central point and extend as far out as a given radius. It is built counter-clockwise from a start angle and a given central angle. It can also be used to create regular polygons, where the number of segments determines the number of sides.
Properties of VglGeometry are also available as mixin.
props
-
inner-radiusfloat (optional)default: 0.5Inner radius of the ring.
-
outer-radiusfloat (optional)default: 1Outer radius of the ring.
-
theta-segmentsint (optional)default: 8Number of segments along to the tangential direction.
-
phi-segmentsint (optional)default: 1Number of segments along to the radial direction.
-
theta-startfloat (optional)The starting angle.
-
theta-lengthfloat (optional)default: [object Object]The central angle.
computed properties
-
instdependencies:
innerRadius,outerRadius,thetaSegments,phiSegments,thetaStart,thetaLength
Example
<template>
<div>
<vgl-renderer
antialias
camera="camera"
scene="scene"
>
<vgl-scene name="scene">
<vgl-ring-geometry
name="ring"
:inner-radius="innerRadius"
:outer-radius="outerRadius"
/>
<vgl-mesh-standard-material name="std" />
<vgl-mesh
geometry="ring"
material="std"
/>
<vgl-ambient-light color="#ffeecc" />
<vgl-directional-light position="0 1 2" />
</vgl-scene>
<vgl-perspective-camera
orbit-position="250 1 0.5"
name="camera"
/>
</vgl-renderer>
<aside class="control-panel">
<label>Inner radius<input
v-model="innerRadius"
type="range"
></label>
<label>Outer radius<input
v-model="outerRadius"
type="range"
></label>
</aside>
</div>
</template>
<script>
export default {
data: () => ({
innerRadius: 25,
outerRadius: 50,
}),
};
</script>