UNPKG

@deck.gl/experimental-layers

Version:

Experimental layers for deck.gl

38 lines (32 loc) 1.02 kB
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); } // TODO - this module is a WIP /* eslint-disable camelcase */ const INITIAL_STATE = {}; function getUniforms() { let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_STATE; _objectDestructuringEmpty(_ref); } const vs = `\ // Note - fairly generic, move to a UV or screen package, or even project? vec2 project_clipspace_to_uv(vec4 position) { vec2 p = vec2(position.x / position.w, position.y / position.w); return vec2((p.x + 1.0) / 2.0, (p.y + 1.0) / 2.0); } vec2 project_clipspace_to_projective_uv(vec4 position) { // outline_vPosition = mat4( // 0.5, 0.0, 0.0, 0.0, // 0.0, 0.5, 0.0, 0.0, // 0.0, 0.0, 0.5, 0.0, // 0.5, 0.5, 0.5, 1.0 // ) * position; return vec4(position.xyz * 0.5 + position.w * 0.5, position.w); } `; const fs = vs; export default { name: 'outline', vs, fs, getUniforms }; //# sourceMappingURL=utils.js.map