MCPcopy Index your code
hub / github.com/microsoft/SandDance / DataColumn1

Function DataColumn1

docs/app/js/sanddance-app.js:85831–85865  ·  view source on GitHub ↗
(gl, opts)

Source from the content-addressed store, hash-verified

85829}
85830var DataColumn = function() {
85831 function DataColumn1(gl, opts) {
85832 (0, _classCallCheckDefault.default)(this, DataColumn1);
85833 this.gl = gl;
85834 this.id = opts.id;
85835 this.size = opts.size;
85836 var logicalType = opts.logicalType || opts.type;
85837 var doublePrecision = logicalType === 5130;
85838 var defaultValue = opts.defaultValue;
85839 defaultValue = Number.isFinite(defaultValue) ? [
85840 defaultValue
85841 ] : defaultValue || new Array(this.size).fill(0);
85842 opts.defaultValue = defaultValue;
85843 var bufferType = logicalType;
85844 if (doublePrecision) bufferType = 5126;
85845 else if (!bufferType && opts.isIndexed) bufferType = gl && (0, _core.hasFeature)(gl, (0, _core.FEATURES).ELEMENT_INDEX_UINT32) ? 5125 : 5123;
85846 else if (!bufferType) bufferType = 5126;
85847 opts.logicalType = logicalType;
85848 opts.type = bufferType;
85849 var defaultType = (0, _glUtils.glArrayFromType)(logicalType || bufferType || 5126);
85850 this.shaderAttributes = {};
85851 this.doublePrecision = doublePrecision;
85852 if (doublePrecision && opts.fp64 === false) defaultType = Float32Array;
85853 opts.bytesPerElement = defaultType.BYTES_PER_ELEMENT;
85854 this.defaultType = defaultType;
85855 this.value = null;
85856 this.settings = opts;
85857 this.state = {
85858 externalBuffer: null,
85859 bufferAccessor: opts,
85860 allocatedValue: null,
85861 constant: false
85862 };
85863 this._buffer = null;
85864 this.setData(opts);
85865 }
85866 (0, _createClassDefault.default)(DataColumn1, [
85867 {
85868 key: "delete",

Callers

nothing calls this directly

Calls 1

setDataMethod · 0.45

Tested by

no test coverage detected