UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 1.44 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{ZEROS as o}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Matrix4DrawUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{VertexAttribute as a}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{NoParameters as m}from"../views/webgl/NoParameters.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";class l extends m{constructor(){super(...arguments),this.origin=o}}function d(){const r=new n;return r.attributes.add(a.POSITION,"vec3"),r.outputs.add("fragColor","vec4",0),r.vertex.uniforms.add(new t("proj",(e=>e.camera.projectionMatrix)),new s("view",((r,o)=>e(c,o.camera.viewMatrix,r.origin)))).main.add(i`gl_Position = proj * view * vec4(position, 1.0);`),r.fragment.main.add(i`fragColor = vec4(1., 0., 0., 1.);`),r}const c=r(),f=Object.freeze(Object.defineProperty({__proto__:null,FocusAreaMaskDrawParameters:l,build:d},Symbol.toStringTag,{value:"Module"}));export{l as F,f as a,d as b};