UNPKG

@deck.gl/experimental-layers

Version:

Experimental layers for deck.gl

30 lines (23 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); } // TODO - this module is a WIP /* eslint-disable camelcase */ var INITIAL_STATE = {}; function getUniforms() { var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_STATE; _objectDestructuringEmpty(_ref); } var vs = "// Note - fairly generic, move to a UV or screen package, or even project?\nvec2 project_clipspace_to_uv(vec4 position) {\n vec2 p = vec2(position.x / position.w, position.y / position.w);\n return vec2((p.x + 1.0) / 2.0, (p.y + 1.0) / 2.0);\n}\n\nvec2 project_clipspace_to_projective_uv(vec4 position) {\n // outline_vPosition = mat4(\n // 0.5, 0.0, 0.0, 0.0,\n // 0.0, 0.5, 0.0, 0.0,\n // 0.0, 0.0, 0.5, 0.0,\n // 0.5, 0.5, 0.5, 1.0\n // ) * position;\n return vec4(position.xyz * 0.5 + position.w * 0.5, position.w);\n}\n"; var fs = vs; var _default = { name: 'outline', vs: vs, fs: fs, getUniforms: getUniforms }; exports.default = _default; //# sourceMappingURL=utils.js.map