UNPKG

@arcgis/core

Version:

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

3 lines (2 loc) 962 B
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{newLayout as e}from"../../support/buffer/InterleavedLayout.js";import{olidEnabled as t}from"../effects/geometry/olidUtils.js";import{TextureBackedBufferLayout as r}from"../lib/TextureBackedBuffer/TextureBackedBufferLayout.js";import{selectByPatternConfiguration as o}from"./PatternTechniqueConfiguration.js";function n(r){const o=e().vec3f("position").vec4f("uvMapSpace");return r.draped?r.hasVVColor?o.f32("colorFeatureAttribute"):r.hasVertexColors&&o.vec4u8("color",{glNormalized:!0}):o.u32("textureElementIndex",{integer:!0}),t()&&o.vec4u8("olidColor"),o.freeze()}const u=[{type:"mat3f32",name:"boundingRect"}],f=new r(u),i=new r([...u,{type:"vec4unorm8",name:"color"}]),a=new r([...u,{type:"f32",name:"colorFeatureAttribute"}]);function c(e){return o(e,f,i,a)}export{f as baseTextureLayout,i as colorTextureLayout,a as featureAttributeTextureLayout,n as getLayout,c as getTextureLayout};