Datasets are used to store and reference data on the GPU. This is useful for making some operations more efficient, such as animation or switching between CoordinateSystems.
Datasets
CoordinateSystems
// Create a reusable DataSet.const data = new Dataset(cg, [0, 0, 1, 1]);// Render a line segment to the viewport.cg.render(coords, viewport, [ new LineSegment(cg, data, {colors: [1, 0, 0, 1], widths: 4]}), // red, width 4 new LineSegment(cg, data, {colors: [0, 0, 1, 1], widths: 1]}), // blue, width 1]);
Private
Releases all GPU resources and renders this instance unusable.
Update this Dataset with new data, in-place.
Generated using TypeDoc
Datasets
are used to store and reference data on the GPU. This is useful for making some operations more efficient, such as animation or switching betweenCoordinateSystems
.Example