MCPcopy Create free account
hub / github.com/microsoft/SandDance / getTransform

Function getTransform

docs/app/js/sanddance-app.js:86872–86883  ·  view source on GitHub ↗
(gl, attribute)

Source from the content-addressed store, hash-verified

86870}();
86871var vs = "\n#define SHADER_NAME interpolation-transition-vertex-shader\n\nuniform float time;\nattribute ATTRIBUTE_TYPE aFrom;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vCurrent;\n\nvoid main(void) {\n vCurrent = mix(aFrom, aTo, time);\n gl_Position = vec4(0.0);\n}\n";
86872function getTransform(gl, attribute) {
86873 var attributeType = (0, _attributeTransitionUtils.getAttributeTypeFromSize)(attribute.size);
86874 return new (0, _core.Transform)(gl, {
86875 vs: vs,
86876 defines: {
86877 ATTRIBUTE_TYPE: attributeType
86878 },
86879 varyings: [
86880 "vCurrent"
86881 ]
86882 });
86883}
86884
86885},{"@babel/runtime/helpers/esm/defineProperty":"5Xk1p","@babel/runtime/helpers/esm/classCallCheck":"3owyr","@babel/runtime/helpers/esm/createClass":"1VLPU","@luma.gl/core":"WBJLR","../lib/attribute/attribute":"1hvhV","../lib/attribute/attribute-transition-utils":"2cbK8","./transition":"3Fdtq","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"3Fdtq":[function(require,module,exports) {
86886var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");

Callers 2

GPUSpringTransition1Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected