@arcgis/core 5.1.0-next.122 → 5.1.0-next.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applications/SceneViewer/layerUtils.d.ts +9 -1
- package/applications/SceneViewer/layerUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{1d7e1bbd321d6f99776c.js → 00da56b977a7c61b5c94.js} +1 -1
- package/assets/esri/core/workers/chunks/034a5c55ceeb1f85ccba.js +1 -0
- package/assets/esri/core/workers/chunks/{aef0ac417b282a90d214.js → 03e93c18efc67a25ca63.js} +1 -1
- package/assets/esri/core/workers/chunks/{a043e8c49ac8e4d1d0a6.js → 100130a80bc151f2e493.js} +1 -1
- package/assets/esri/core/workers/chunks/17e68828ca6ff6912d3e.js +1 -0
- package/assets/esri/core/workers/chunks/{688fe64be39e9ac35ffd.js → 1c16f3db1c98da8730b9.js} +1 -1
- package/assets/esri/core/workers/chunks/1e340536d3c5f94920b5.js +1 -0
- package/assets/esri/core/workers/chunks/3c5534c576528c1921d2.js +1 -0
- package/assets/esri/core/workers/chunks/41f12eb7c9b7086528d5.js +1 -0
- package/assets/esri/core/workers/chunks/{bb867fec068e26bb0c8e.js → 47f65ffcf23713f0fd5c.js} +1 -1
- package/assets/esri/core/workers/chunks/{e69d03917e28c8213b27.js → 5bd7ee40a1c469c24013.js} +2 -2
- package/assets/esri/core/workers/chunks/629099f05ca5c9ca1973.js +1 -0
- package/assets/esri/core/workers/chunks/62f78fa455d556008f6a.js +1 -0
- package/assets/esri/core/workers/chunks/{4e293c4006bdc7cc4c08.js → 77214e6081c1c28f1345.js} +1 -1
- package/assets/esri/core/workers/chunks/{e16b7ff4bf24fb99f7ea.js → 7c6f4104f5325ce0afbc.js} +1 -1
- package/assets/esri/core/workers/chunks/{4894997bfa438f66da36.js → 81808c3aead7dfac3049.js} +1 -1
- package/assets/esri/core/workers/chunks/{c357c0a08b99c1e7f290.js → 9331969046f2b277d620.js} +1 -1
- package/assets/esri/core/workers/chunks/{06858a0e1033e4a95337.js → a643a4751bbf4430bde2.js} +3 -3
- package/assets/esri/core/workers/chunks/{9c251f762df7a430cc0c.js → c755bfd90c9654170e67.js} +1 -1
- package/assets/esri/core/workers/chunks/c9fefb6316c51cbdc61f.js +1 -0
- package/assets/esri/core/workers/chunks/cc3e895cff019e811c07.js +1 -0
- package/assets/esri/core/workers/chunks/{4efbe879d06013168f54.js → d36b407f5ad5eabac530.js} +2 -2
- package/assets/esri/core/workers/chunks/{7cb1afb32ec043e23ec2.js → d63f532dd7d60ee8ef2c.js} +1 -1
- package/assets/esri/core/workers/chunks/e2de13810dce01b98520.js +1 -0
- package/assets/esri/core/workers/chunks/f25bb204cf6727f6fdef.js +1 -0
- package/assets/esri/core/workers/chunks/{aa118c1bcd922b8ac328.js → f274a8e8c7ca4294e876.js} +1 -1
- package/assets/esri/core/workers/chunks/f4f642ddd4d5db7cbbb4.js +1 -0
- package/assets/esri/core/workers/chunks/f80613cce68dc3df8303.js +2 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/chunks/GaussianSplatComposition.glsl.js +1 -1
- package/chunks/GlobalIllumination.glsl.js +1 -1
- package/chunks/OITBlend.glsl.js +3 -3
- package/chunks/OITBlendEmission.glsl.js +2 -2
- package/chunks/OITDimOpaque.glsl.js +2 -2
- package/chunks/Path.glsl.js +23 -20
- package/chunks/SlicePlaneMaterial.glsl.js +4 -4
- package/chunks/bundle2.js +1 -1
- package/config.js +1 -1
- package/geohash/GeohashCell.js +1 -1
- package/interfaces.d.ts +1 -0
- package/kernel.js +1 -1
- package/layers/AnnotationLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/fetchService.js +1 -1
- package/package.json +4 -4
- package/portal/support/loadUtils.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/renderers/support/types.d.ts +1 -1
- package/renderers/visualVariables/RotationVariable.d.ts +1 -16
- package/renderers/visualVariables/RotationVariable.js +1 -1
- package/rest/support/Query.d.ts +1 -0
- package/support/revision.js +1 -1
- package/undoredo/support/ApplySet.js +1 -1
- package/undoredo/support/ApplySetItem.js +1 -1
- package/views/2d/engine/AFeatureContainer.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/GpuMeshState.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
- package/views/2d/layers/features/aggregation/GridCell.js +1 -1
- package/views/2d/layers/features/aggregation/GridIndexCell.js +1 -1
- package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ByReferenceTileSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/DrillDownTileSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/PagedTileSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ParquetSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/StreamSourceChunk.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/emissive/emissions.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RendererBase.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +2 -2
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/renderState.js +1 -1
- package/widgets/Attachments/support/attachmentUtils.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +2 -0
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/assets/esri/core/workers/chunks/04895de94657e7f3d7e1.js +0 -1
- package/assets/esri/core/workers/chunks/2dbc2fd0f2dde505c465.js +0 -1
- package/assets/esri/core/workers/chunks/3b15933f65f59625a650.js +0 -1
- package/assets/esri/core/workers/chunks/3e65b4b18760bde8ceee.js +0 -1
- package/assets/esri/core/workers/chunks/5500dc39e11a0057ae16.js +0 -1
- package/assets/esri/core/workers/chunks/6aabde21b0b376d95888.js +0 -1
- package/assets/esri/core/workers/chunks/7f5ecb67fa459f92d067.js +0 -1
- package/assets/esri/core/workers/chunks/99e5296192ab98fd0d99.js +0 -1
- package/assets/esri/core/workers/chunks/c49c078be08c38a6088d.js +0 -1
- package/assets/esri/core/workers/chunks/d13e003c9293cb7e2852.js +0 -1
- package/assets/esri/core/workers/chunks/e6a7272b59a4c2e34dca.js +0 -1
- package/assets/esri/core/workers/chunks/f69df22a5c64389ebe28.js +0 -1
- package/assets/esri/core/workers/chunks/fde12f5b7989c0fac67b.js +0 -2
- /package/assets/esri/core/workers/chunks/{e69d03917e28c8213b27.js.LICENSE.txt → 5bd7ee40a1c469c24013.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{fde12f5b7989c0fac67b.js.LICENSE.txt → f80613cce68dc3df8303.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.124",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@amcharts/amcharts5": "~5.
|
|
22
|
-
"@arcgis/toolkit": "^5.1.0-next.
|
|
21
|
+
"@amcharts/amcharts5": "~5.18.0",
|
|
22
|
+
"@arcgis/toolkit": "^5.1.0-next.127",
|
|
23
23
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
24
24
|
"@esri/calcite-components": "^5.1.1-next.3",
|
|
25
25
|
"@vaadin/grid": "~25.1.3",
|
|
26
26
|
"@zip.js/zip.js": "~2.8.26",
|
|
27
27
|
"luxon": "~3.7.2",
|
|
28
|
-
"marked": "~18.0.
|
|
28
|
+
"marked": "~18.0.5",
|
|
29
29
|
"tslib": "^2.8.1"
|
|
30
30
|
},
|
|
31
31
|
"type": "module"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{findAssociatedFeatureService as e}from"../../layers/support/associatedFeatureServiceUtils.js";import{
|
|
2
|
+
import{findAssociatedFeatureService as e}from"../../layers/support/associatedFeatureServiceUtils.js";import{getFeatureServiceItemLayerType as r}from"../../layers/support/fetchService.js";import{getPreferredHost as t}from"../../layers/support/layerUtils.js";function a(e){const t={id:e.id,name:e.name},a=r(e.type);return a&&(t.layerType=a),t}async function n(e,r,n){let l;if(null==e?.layers||null==e?.tables){const u=await n.fetchServiceMetadata(r,{customParameters:s(e)?.customParameters});l=t(),(e=e||{}).layers=e.layers||u?.layers?.map(a),e.tables=e.tables||u?.tables?.map(a)}return{data:e,preferredHost:l}}function s(e){if(!e)return null;const{layers:r,tables:t}=e;return r?.length?r[0]:t?.length?t[0]:null}function l(e,r){if(null==r)return null;return[...e.layers||[],...e.tables||[]].find(e=>e.id===r)}function u(e,r){return[...e.layers||[],...e.tables||[]].filter(({layerType:e})=>e?r.includes(e):r.includes("ArcGISFeatureLayer"))}function c(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function o(e){switch(e){case"catalog":return["CatalogLayer"];case"feature":return["ArcGISFeatureLayer"];case"oriented-imagery":return["OrientedImageryLayer"];case"subtype-group":return["SubtypeGroupLayer","SubtypeGroupTable"]}return null}function i(e){switch(e){case"ArcGISAnnotationLayer":return"AnnotationLayer";case"ArcGISDimensionLayer":return"DimensionFeatureLayer";case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":case"SubtypeGroupTable":return"SubtypeGroupLayer"}return"FeatureLayer"}async function y(r,t,n){if(!r?.url)return t??{};if(t??={},!t.layers){const e=await n.fetchServiceMetadata(r.url);t.layers=e.layers?.map(a)}const{serverUrl:l,portalItem:u}=await e(r.url,{sceneLayerItem:r,customParameters:s(t)?.customParameters}).catch(()=>({serverUrl:null,portalItem:null}));if(null==l)return t.tables=[],t;if(!t.tables&&u){const e=await u.fetchData().catch(()=>null);if(e?.tables)t.tables=e.tables.map(a);else{const r=await n.fetchServiceMetadata(l,{customParameters:s(e)?.customParameters}).catch(()=>null);t.tables=r?.tables?.map(a)}}if(t.tables)for(const e of t.tables)e.url=`${l}/${e.id}`;return t}export{a as createSublayerData,s as getFirstLayerOrTable,l as getLayerOrTable,c as getNumLayersAndTables,u as getSublayersByLayerType,o as instanceTypeToLayerTypes,i as layerTypeToLayerModuleType,y as populateSceneServiceItemData,n as preprocessFSItemData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Error.js";import{findAssociatedFeatureService as a}from"../../layers/support/associatedFeatureServiceUtils.js";import{getLayerModuleType as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as t}from"../../layers/support/LayerLoadContext.js";import{layersLoaderMap as s}from"../../layers/support/layersLoader.js";import{sceneServiceLayerTypeToClassName as n,applyPreferredHostToPortalItem as c,getPreferredHost as o}from"../../layers/support/layerUtils.js";import i from"../PortalItem.js";import{getFirstLayerOrTable as u,getNumLayersAndTables as l,preprocessFSItemData as y,getLayerOrTable as m,layerTypeToLayerModuleType as f,populateSceneServiceItemData as p}from"./loadUtils.js";import{hasTypeKeyword as d}from"./portalItemUtils.js";async function L(e){let{portalItem:a}=e;!a||a instanceof i||(a=new i(a));const r=await w(a);return new(0,r.constructor)({portalItem:a,...r.properties})}async function w(e){await e.load();const a=new t;return N(await S(e,a))}async function S(a,r){switch(a.type){case"3DTiles Service":return a.typeKeywords.includes("3DObject")?F():a.typeKeywords.includes("GaussianSplat")?b():P();case"CSV":return K();case"Feature Collection":return M(a);case"Feature Service":return h(a,r);case"Feed":return J();case"GeoJson":return G();case"Group Layer":return k();case"Image Service":return g(a,r);case"KML":return V();case"Knowledge Graph Layer":return W();case"Map Service":return v(a,r);case"Media Layer":return $();case"Scene Service":return I(a,r);case"Stream Service":return j();case"Video Service":return T(a,r);case"Vector Tile Service":return C();case"WCS":return U();case"WFS":return D();case"WMS":return O();case"WMTS":return x();default:throw new e("portal:unknown-item-type","Unknown item type '${type}'",{type:a.type})}}async function N(e){const a=e.className,r=s[a];return{constructor:await r(),properties:e.properties}}async function v(e,a){return await A(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}async function h(e,a){const r=await E(e,a);if("object"==typeof r){const{sourceJSON:e,className:a}=r,t={sourceJSON:e};return null!=r.id&&(t.layerId=r.id),{className:a||"FeatureLayer",properties:t}}return{className:"GroupLayer"}}async function I(e,r){const t=await E(e,r,async()=>{try{if(!e.url)return[];const{serverUrl:t}=await a(e.url,{sceneLayerItem:e}),s=await r.fetchServiceMetadata(t);return s?.tables??[]}catch{return[]}});if("object"==typeof t){const a={};let s;if(null!=t.id?(a.layerId=t.id,s=`${e.url}/layers/${t.id}`):s=e.url,e.typeKeywords?.length)for(const r of Object.keys(n))if(e.typeKeywords.includes(r))return{className:n[r]};const c=await r.fetchServiceMetadata(s,{customParameters:await r.fetchCustomParameters(e,e=>u(e)?.customParameters)});return{className:n[c?.layerType]||"SceneLayer",properties:a}}if(!1===t){const a=await r.fetchServiceMetadata(e.url);if("Voxel"===a?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}async function M(e){await e.load();const a=d(e,"Map Notes"),r=d(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if(d(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===l(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}async function g(e,a){await e.load();const r=e.typeKeywords?.map(e=>e.toLowerCase())??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await a.fetchItemData(e),s=t?.layerType;if("ArcGISTiledImageServiceLayer"===s)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===s)return{className:"ImageryLayer"};const n=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),c=n.cacheType?.toLowerCase(),o=n.capabilities?.toLowerCase().includes("tilesonly"),i=n.tileInfo?.format?.toLowerCase()??"",u=null==c&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(i);return"map"===c||u||o?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}function j(){return{className:"StreamLayer"}}async function T(e,a){return"object"==typeof await E(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}function C(){return{className:"VectorTileLayer"}}function G(){return{className:"GeoJSONLayer"}}function P(){return{className:"IntegratedMesh3DTilesLayer"}}function b(){return{className:"GaussianSplatLayer"}}function F(){return{className:"UnsupportedLayer"}}function K(){return{className:"CSVLayer"}}function V(){return{className:"KMLLayer"}}function W(){return{className:"KnowledgeGraphLayer"}}function U(){return{className:"WCSLayer"}}function D(){return{className:"WFSLayer"}}function O(){return{className:"WMSLayer"}}function x(){return{className:"WMTSLayer"}}function J(){return{className:"StreamLayer"}}function k(){return{className:"GroupLayer"}}function $(){return{className:"MediaLayer"}}async function A(e,a){const{tileInfo:r}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return r}async function E(e,a,t){const{url:s,type:n}=e,i="Feature Service"===n;if(!s)return{};if(/\/\d+$/.test(s)){if(i){const t=await a.fetchServiceMetadata(s,{customParameters:await a.fetchCustomParameters(e,e=>u(e)?.customParameters)});return c(e,o()),{id:t.id,className:r(t.type),sourceJSON:t}}return{}}if("Video Service"===n){const e=await a.fetchServiceMetadata(s);return!((e.layers?.length??0)>1)&&{}}await e.load();let d=await a.fetchItemData(e);if(i){const{data:r,preferredHost:t}=await y(d,s,a);c(e,t);const n=R(r);if("object"==typeof n){const e=m(r,n.id);n.className
|
|
2
|
+
import e from"../../core/Error.js";import{findAssociatedFeatureService as a}from"../../layers/support/associatedFeatureServiceUtils.js";import{getLayerModuleType as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as t}from"../../layers/support/LayerLoadContext.js";import{layersLoaderMap as s}from"../../layers/support/layersLoader.js";import{sceneServiceLayerTypeToClassName as n,applyPreferredHostToPortalItem as c,getPreferredHost as o}from"../../layers/support/layerUtils.js";import i from"../PortalItem.js";import{getFirstLayerOrTable as u,getNumLayersAndTables as l,preprocessFSItemData as y,getLayerOrTable as m,layerTypeToLayerModuleType as f,populateSceneServiceItemData as p}from"./loadUtils.js";import{hasTypeKeyword as d}from"./portalItemUtils.js";async function L(e){let{portalItem:a}=e;!a||a instanceof i||(a=new i(a));const r=await w(a);return new(0,r.constructor)({portalItem:a,...r.properties})}async function w(e){await e.load();const a=new t;return N(await S(e,a))}async function S(a,r){switch(a.type){case"3DTiles Service":return a.typeKeywords.includes("3DObject")?F():a.typeKeywords.includes("GaussianSplat")?b():P();case"CSV":return K();case"Feature Collection":return M(a);case"Feature Service":return h(a,r);case"Feed":return J();case"GeoJson":return G();case"Group Layer":return k();case"Image Service":return g(a,r);case"KML":return V();case"Knowledge Graph Layer":return W();case"Map Service":return v(a,r);case"Media Layer":return $();case"Scene Service":return I(a,r);case"Stream Service":return j();case"Video Service":return T(a,r);case"Vector Tile Service":return C();case"WCS":return U();case"WFS":return D();case"WMS":return O();case"WMTS":return x();default:throw new e("portal:unknown-item-type","Unknown item type '${type}'",{type:a.type})}}async function N(e){const a=e.className,r=s[a];return{constructor:await r(),properties:e.properties}}async function v(e,a){return await A(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}async function h(e,a){const r=await E(e,a);if("object"==typeof r){const{sourceJSON:e,className:a}=r,t={sourceJSON:e};return null!=r.id&&(t.layerId=r.id),{className:a||"FeatureLayer",properties:t}}return{className:"GroupLayer"}}async function I(e,r){const t=await E(e,r,async()=>{try{if(!e.url)return[];const{serverUrl:t}=await a(e.url,{sceneLayerItem:e}),s=await r.fetchServiceMetadata(t);return s?.tables??[]}catch{return[]}});if("object"==typeof t){const a={};let s;if(null!=t.id?(a.layerId=t.id,s=`${e.url}/layers/${t.id}`):s=e.url,e.typeKeywords?.length)for(const r of Object.keys(n))if(e.typeKeywords.includes(r))return{className:n[r]};const c=await r.fetchServiceMetadata(s,{customParameters:await r.fetchCustomParameters(e,e=>u(e)?.customParameters)});return{className:n[c?.layerType]||"SceneLayer",properties:a}}if(!1===t){const a=await r.fetchServiceMetadata(e.url);if("Voxel"===a?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}async function M(e){await e.load();const a=d(e,"Map Notes"),r=d(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if(d(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===l(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}async function g(e,a){await e.load();const r=e.typeKeywords?.map(e=>e.toLowerCase())??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await a.fetchItemData(e),s=t?.layerType;if("ArcGISTiledImageServiceLayer"===s)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===s)return{className:"ImageryLayer"};const n=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),c=n.cacheType?.toLowerCase(),o=n.capabilities?.toLowerCase().includes("tilesonly"),i=n.tileInfo?.format?.toLowerCase()??"",u=null==c&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(i);return"map"===c||u||o?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}function j(){return{className:"StreamLayer"}}async function T(e,a){return"object"==typeof await E(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}function C(){return{className:"VectorTileLayer"}}function G(){return{className:"GeoJSONLayer"}}function P(){return{className:"IntegratedMesh3DTilesLayer"}}function b(){return{className:"GaussianSplatLayer"}}function F(){return{className:"UnsupportedLayer"}}function K(){return{className:"CSVLayer"}}function V(){return{className:"KMLLayer"}}function W(){return{className:"KnowledgeGraphLayer"}}function U(){return{className:"WCSLayer"}}function D(){return{className:"WFSLayer"}}function O(){return{className:"WMSLayer"}}function x(){return{className:"WMTSLayer"}}function J(){return{className:"StreamLayer"}}function k(){return{className:"GroupLayer"}}function $(){return{className:"MediaLayer"}}async function A(e,a){const{tileInfo:r}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return r}async function E(e,a,t){const{url:s,type:n}=e,i="Feature Service"===n;if(!s)return{};if(/\/\d+$/.test(s)){if(i){const t=await a.fetchServiceMetadata(s,{customParameters:await a.fetchCustomParameters(e,e=>u(e)?.customParameters)});return c(e,o()),{id:t.id,className:r(t.type),sourceJSON:t}}return{}}if("Video Service"===n){const e=await a.fetchServiceMetadata(s);return!((e.layers?.length??0)>1)&&{}}await e.load();let d=await a.fetchItemData(e);if(i){const{data:r,preferredHost:t}=await y(d,s,a);c(e,t);const n=R(r);if("object"==typeof n){const e=m(r,n.id);return{id:n.id,className:f(e?.layerType)}}return n}"Scene Service"===n&&(d=await p(e,d,a));if(l(d)>0)return R(d);const L=await a.fetchServiceMetadata(s);return t&&(L.tables=await t()),R(L)}function R(e){return 1===l(e)&&{id:u(e)?.id}}export{L as fromItem,S as selectLayerClassPath};
|
|
@@ -41,7 +41,7 @@ export type FlowTheme = "flow-line" | "wave-front";
|
|
|
41
41
|
export type UnivariateSymbolStyle = "caret" | "circle-caret" | "arrow" | "circle-arrow" | "plus-minus" | "circle-plus-minus" | "square" | "circle" | "triangle" | "happy-sad" | "thumb" | "custom";
|
|
42
42
|
|
|
43
43
|
/** @since 5.0 */
|
|
44
|
-
export type AuthoringInfoVisualVariableTypes = "size" | "color" | "opacity";
|
|
44
|
+
export type AuthoringInfoVisualVariableTypes = "size" | "color" | "opacity" | "rotation";
|
|
45
45
|
|
|
46
46
|
/** @since 5.0 */
|
|
47
47
|
export type AuthoringInfoVisualVariableStyles = "percent" | "ratio" | "percent-of-total";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type VisualVariable from "./VisualVariable.js";
|
|
2
2
|
import type { VisualVariableProperties } from "./VisualVariable.js";
|
|
3
3
|
|
|
4
|
-
export interface RotationVariableProperties extends VisualVariableProperties, Partial<Pick<RotationVariable, "axis" | "
|
|
4
|
+
export interface RotationVariableProperties extends VisualVariableProperties, Partial<Pick<RotationVariable, "axis" | "rotationType">> {}
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The rotation visual variable, determined by mapping the values to data in a field or
|
|
@@ -56,21 +56,6 @@ export default class RotationVariable extends VisualVariable {
|
|
|
56
56
|
* @default "heading"
|
|
57
57
|
*/
|
|
58
58
|
accessor axis: "heading" | "tilt" | "roll";
|
|
59
|
-
/**
|
|
60
|
-
* The name of the data series configuration from which to derive an expression used to drive the rotation.
|
|
61
|
-
* This allows client applications to link a rotation visual variable to a specific data series configuration
|
|
62
|
-
* after configuring it.
|
|
63
|
-
*
|
|
64
|
-
* When [field](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/RotationVariable/#field),
|
|
65
|
-
* [valueExpression](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/RotationVariable/#valueExpression), and `dataSeriesName` are all defined,
|
|
66
|
-
* `dataSeriesName` takes precedence.
|
|
67
|
-
*
|
|
68
|
-
* Only applicable when at least one [TimeSeriesInfo](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeSeriesInfo/) has been defined in
|
|
69
|
-
* [DataSeriesLayer.dataSeriesInfos](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/DataSeriesLayer/#dataSeriesInfos).
|
|
70
|
-
*
|
|
71
|
-
* @since 5.1
|
|
72
|
-
*/
|
|
73
|
-
accessor dataSeriesName: string | null | undefined;
|
|
74
59
|
/**
|
|
75
60
|
* Defines the origin and direction of rotation depending
|
|
76
61
|
* on how the angle of rotation was measured. See the table below for a list of possible values.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as i}from"../../core/accessorSupport/decorators.js";import o from"./VisualVariable.js";var r;let s=r=class extends o{constructor(e){super(e),this.axis=null,this.type="rotation",this.rotationType="geographic"
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as i}from"../../core/accessorSupport/decorators.js";import o from"./VisualVariable.js";var r;let s=r=class extends o{constructor(e){super(e),this.axis=null,this.type="rotation",this.rotationType="geographic"}get cache(){return{hasExpression:!!this.valueExpression,compiledFunc:null}}clone(){return new r({axis:this.axis,rotationType:this.rotationType,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,legendOptions:this.legendOptions?.clone()})}};e([t({readOnly:!0})],s.prototype,"cache",null),e([t({type:["heading","tilt","roll"],json:{origins:{"web-scene":{default:"heading",write:!0}}}})],s.prototype,"axis",void 0),e([t({type:["rotation"],json:{type:["rotationInfo"]}})],s.prototype,"type",void 0),e([t({type:["geographic","arithmetic"],json:{write:!0,origins:{"web-document":{write:!0,default:"geographic"}}}})],s.prototype,"rotationType",void 0),s=r=e([i("esri.renderers.visualVariables.RotationVariable")],s);export{s as default};
|
package/rest/support/Query.d.ts
CHANGED
|
@@ -846,6 +846,7 @@ export default class Query extends JSONSupport {
|
|
|
846
846
|
* @see [Graphic.statisticsAggregatedIds](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#statisticsAggregatedIds)
|
|
847
847
|
* @internal
|
|
848
848
|
* @since 5.1
|
|
849
|
+
* @internal
|
|
849
850
|
* @example
|
|
850
851
|
* // query for the count of trees in each park and include the IDs of
|
|
851
852
|
* // the trees contributing to each count. The aggregateIds can then be
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const b="20260606",c="d8ee14a2ccf68ca837bb142b5286bd73f24da848";export{b as buildDate,c as commitHash};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{isDeleteItem as t,isAddAttachmentItem as e,isDeleteAttachmentItem as a,isAddItem as r,isModifyItem as
|
|
2
|
+
import{isDeleteItem as t,isAddAttachmentItem as e,isDeleteAttachmentItem as a,isModifyAttachmentItem as s,isAddItem as r,isModifyItem as h}from"./ApplySetItem.js";class p{constructor(){this.applyItems=new Map,this.featureState=null}get items(){return[...this.applyItems.values()]}get deleteItems(){return this.items.filter(t)}_add(t){this.applyItems.set(t.featureChangeId,t)}revert(){this.featureState?.clearAll(),this.applyItems.clear()}push(p){if(e(p))return void this._add(p);const i=this.applyItems.get(p.featureChangeId);i?(r(i)&&t(p)&&(this.applyItems.delete(i.featureChangeId),this.featureState?.removeLocalState(i)),r(i)&&h(p)&&(i.graphic=p.graphic,this.featureState?.updateLocalState(i)),h(i)&&t(p)&&(this.applyItems.delete(i.featureChangeId),p.graphic=i.revertGraphic,this._add(p),this.featureState?.removeLocalState(i),this.featureState?.applyLocalState(p)),h(i)&&h(p)&&(i.graphic=p.graphic,this.featureState?.updateLocalState(i)),s(i)&&a(p)&&(this.applyItems.delete(i.featureChangeId),this._add(p)),s(i)&&s(p)&&(i.attachmentData=p.attachmentData)):(this._add(p),a(p)||s(p)||this.featureState?.applyLocalState(p))}}export{p as ApplySet};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
let t=-1383920;function e(t,e=""){""!==e&&t.reasonsIncluded.add(e)}function a(t){return"delete"===t.type}function
|
|
2
|
+
let t=-1383920;function e(t,e=""){""!==e&&t.reasonsIncluded.add(e)}function a(t){return"delete"===t.type}function n(t){return"modify"===t.type}function r(t){return"add"===t.type}function s(t){return"addAttachment"===t.type}function i(t){return"deleteAttachment"===t.type}function c(t){return"modifyAttachment"===t.type}class h{constructor(t){this.reasonsIncluded=new Set,this.graphic=t.graphic.clone(),this.layer=t.layer,e(this,t.reason)}get featureChangeId(){return`${this.layer.id}:${this.graphic.attributes[this.layer.objectIdField].toString()}`}}class d extends h{constructor(t){super(t),this.type="delete"}}class o extends h{constructor(e){super(e),this.type="add";const a=t--;e.graphic.attributes[e.layer.objectIdField]=a,this.graphic.attributes[e.layer.objectIdField]=a}}class u extends h{constructor(t){super(t),this.type="modify",this.revertGraphic=t.originalGraphic.clone()}}class l extends h{constructor(t){super(t),this.type="addAttachment",this.attachmentData=null,this.attachmentData=t.attachmentData}}class p extends h{constructor(t){super(t),this.type="deleteAttachment",this.attachment=t.attachment}get featureChangeId(){return`${this.layer.id}:attach:${this.attachment.id.toString()}`}}class y extends h{constructor(t){super(t),this.type="modifyAttachment",this.attachmentData=null,this.attachmentData=t.attachmentData,this.originalAttachment=t.originalAttachment}get featureChangeId(){return`${this.layer.id}:attach:${this.originalAttachment?.id.toString()}`}}export{l as ApplySetAddAttachmentItem,o as ApplySetAddItem,p as ApplySetDeleteAttachmentItem,d as ApplySetDeleteItem,h as ApplySetItemBase,y as ApplySetModifyAttachmentItem,u as ApplySetModifyItem,s as isAddAttachmentItem,r as isAddItem,i as isDeleteAttachmentItem,a as isDeleteItem,c as isModifyAttachmentItem,n as isModifyItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{AttributeStoreView as
|
|
2
|
+
import{AttributeStoreView as e}from"./webgl/AttributeStoreView.js";import t from"./webgl/TileContainer.js";const i=60;class s extends t{constructor(t){super(t),this._statisticsByLevel=new Map,this._entityIndex=new Map,this.attributeView=new e}destroy(){super.destroy(),this.children.forEach(e=>e.destroy()),this.removeAllChildren(),this.attributeView.destroy()}doRender(e){e.context.capabilities.enable("textureFloatLinear"),super.doRender(e)}get hasAnimations(){for(const e of this.children)if(e.hasAnimations)return!0;return!1}_reindexAndUpdateFeaturesIfNeeded(){if(this.hasAnimations&&(this._reindexFeatures(),0!==this.attributeView.size))for(const e of this._entityIndex.values())e.dirty&&(this.attributeView.setData(e.displayId,7,0,e.firstIndexed),e.dirty=!1)}restartAnimation(e){const t=this._entityIndex.get(e);if(!t)return;const i=performance.now()/1e3;t.firstIndexed=i,t.dirty=!0}restartAllAnimations(){const e=performance.now()/1e3;for(const[t,i]of this._entityIndex)i.firstIndexed=e,i.dirty=!0}_reindexFeatures(){const e=performance.now()/1e3;for(const t of this.children)for(const i of t.entityIds){const{objectId:t}=i;let s=this._entityIndex.get(t);s||(s={objectId:t,displayId:0,firstIndexed:e,lastIndexed:0,dirty:!0},this._entityIndex.set(t,s)),s.lastIndexed=e,s.displayId=i.displayId}for(const[t,s]of this._entityIndex)e-s.lastIndexed>i&&this._entityIndex.delete(t)}_updateAttributeView(){this.attributeView.update()&&this.requestRender(),this._reindexAndUpdateFeaturesIfNeeded()}createRenderParams(e){const t=super.createRenderParams(e);return t.attributeView=this.attributeView,t.instanceStore=this._instanceStore,t.statisticsByLevel=this._statisticsByLevel,t}}export{s as AFeatureContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../../../../core/Error.js";import has from"../../../../core/has.js";import e from"../../../../core/Logger.js";import{estimateNumberArrayMemory as i}from"../../../../core/memoryEstimations.js";import{signal as s}from"../../../../core/signal.js";import{dataDrivenUnit2 as r,dataDrivenUnit1 as a,dataDrivenUnit0 as n,visualVariableUnit as u,localTimeOriginUnit as h,gpgpuUnit as o,animationUnit as d,filterFlagsUnit as l}from"./definitions.js";import{getDisplayIdTexel as
|
|
2
|
+
import t from"../../../../core/Error.js";import has from"../../../../core/has.js";import e from"../../../../core/Logger.js";import{estimateNumberArrayMemory as i}from"../../../../core/memoryEstimations.js";import{signal as s}from"../../../../core/signal.js";import{dataDrivenUnit2 as r,dataDrivenUnit1 as a,dataDrivenUnit0 as n,visualVariableUnit as u,localTimeOriginUnit as h,gpgpuUnit as o,animationUnit as d,filterFlagsUnit as l}from"./definitions.js";import{getDisplayIdTexel as g}from"./DisplayId.js";import{getPixelArrayCtor as p,getPixelBytes as _}from"./Utils.js";import{SizedPixelFormat as c}from"../../../webgl/enums.js";import{DisposableFramebufferObject as x}from"../../../webgl/FramebufferObject.js";import f from"../../../webgl/Texture.js";import{TextureDescriptor as b}from"../../../webgl/TextureDescriptor.js";const m=()=>e.getLogger("esri.views.2d.engine.webgl.AttributeStoreView");class T{constructor(t,e,i){this._texture=null,this._lastTexture=null,this._fbos={},this.texelSize=4;const{buffer:s,pixelType:r,textureOnly:a}=t,n=p(r);this.blockIndex=i,this.pixelType=r,this.size=e,this.textureOnly=a,a||(this.data=new n(s)),this._resetRange()}destroy(){this._texture?.dispose();for(const t in this._fbos){const e=this._fbos[t];e&&("0"===t&&e.detachColorTexture(),e.dispose()),this._fbos[t]=null}this._texture=null}get _textureDesc(){const t=new b(this.size);if(t.wrapMode=33071,t.samplingMode=9728,t.dataType=this.pixelType,2===this.blockIndex)t.pixelFormat=6403,t.internalFormat=c.R8;return t}get usedMemory(){return null!=this.data?i(this.data):0}setData(t,e,i){const s=g(t),r=this.data,a=s*this.texelSize+e;!r||a>=r.length||(r[a]=i,this.dirtyStart=Math.min(this.dirtyStart,s),this.dirtyEnd=Math.max(this.dirtyEnd,s))}getData(t,e){if(null==this.data)return null;const i=g(t)*this.texelSize+e;return!this.data||i>=this.data.length?null:this.data[i]}getTexture(t){return this._texture??this._initTexture(t)}getFBO(t,e=0){if(!this._fbos[e]){const i=0===e?this.getTexture(t):this._textureDesc;this._fbos[e]=new x(t,i)}return this._fbos[e]}get hasDirty(){const t=this.dirtyStart;return this.dirtyEnd>=t}updateTexture(e,i){try{const s=this.dirtyStart,r=this.dirtyEnd;if(!this.hasDirty)return;has("esri-2d-update-debug")&&console.debug(`Version[${i}] AttributeStoreView.updateTexture`,{start:s,end:r,firstBytes:new Uint8Array(this.data.buffer.slice(0,16)),block:this}),this._resetRange();const a=this.data.buffer,n=this.getTexture(e),u=4,h=(s-s%this.size)/this.size,o=(r-r%this.size)/this.size,d=h,l=this.size,g=o,_=h*this.size*u,c=(l+g*this.size)*u-_,x=p(this.pixelType),f=new x(a,_*x.BYTES_PER_ELEMENT,c),b=this.size,T=g-d+1;if(T>this.size)return void m().error(new t("mapview-webgl","Out-of-bounds index when updating AttributeData"));n.updateData(0,0,d,b,T,f)}catch(s){}}update(t){const{data:e,start:i,end:s}=t;if(null!=e&&null!=this.data){const s=this.data,r=i*this.texelSize;for(let i=0;i<e.length;i++){const a=1<<i%this.texelSize;t.layout&a&&(s[r+i]=e[i])}}this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,s)}resize(t,e){const i=this.size;if(this.size=e,this.textureOnly)return void(i!==this.size&&(this._lastTexture=this._texture,this._texture=null));const s=p(this.pixelType);this.destroy(),this.data=new s(t.buffer)}_resetRange(){this.dirtyStart=2147483647,this.dirtyEnd=0}_initTexture(t){const e=new f(t,this._textureDesc,this.data??void 0);if(null!=this._lastTexture&&this._fbos[0]){const i=this._lastTexture.descriptor.width,s=this._lastTexture.descriptor.height,r=this._lastTexture.descriptor.dataType,a=this._lastTexture.descriptor.pixelFormat,n=this.getFBO(t),u=_(r),h=new(p(r))(new ArrayBuffer(i*s*u*this.texelSize)),o=t.boundFramebuffer,{x:d,y:l,width:g,height:c}=t.getViewport();t.bindFramebuffer(n),n.readPixels(0,0,i,s,a,r,h),e.updateData(0,0,0,2*i,s/2,h),t.setViewport(d,l,g,c),t.bindFramebuffer(o)}return this.destroy(),this._texture=e,this._texture}}class y{constructor(){this.size=0,this._pendingAttributeUpdates=[],this._version=0,this._epoch=0,this._hasPendingUpdate=s(!1),this._locked=!1}get updating(){return this._hasPendingUpdate.value}get locked(){return this._locked}get usedMemory(){let t=0;for(const e of this._data??[])null!=e&&(t+=e.usedMemory);return t}_initialize(t){if(!t)throw new Error("InternalError: initArgs must be defined");const e=t.blockDescriptors;if(this.size=t.blockSize,has("esri-2d-update-debug")&&console.debug("AttributeStoreView.initialize",{message:t}),null==this._data)this._data=e.map((t,e)=>null!=t?new T(t,this.size,e):null);else for(let i=0;i<this._data.length;i++){const t=this._data[i],s=e[i];null!=s&&(null==t?this._data[i]=new T(s,this.size,i):t.resize(s,this.size))}}destroy(){for(const t of this._data??[])t?.destroy();this._defaultTexture?.dispose(),this._defaultTexture=null,this._pendingAttributeUpdates=[]}isEmpty(){return null==this._data}getBlock(t){if(null==this._data)return null;return this._data[t]}setLabelMinZoom(t,e){this.setData(t,0,1,e)}setLocalTimeOrigin(t,e){this.setData(t,7,0,e)}getLabelMinZoom(t){return this.getData(t,0,1,255)}getFilterFlags(t){return this.getData(t,0,0,0)}getVisualVariableData(t,e){return this.getData(t,3,e,0)}getData(t,e,i,s){if(!this._data)return 0;const r=this._data[e];if(null==r)return 0;const a=r.getData(t,i);return null!=a?a:s}setData(t,e,i,s){this._data[e].setData(t,i,s)}lockTextureUploads(){this._locked=!0}unlockTextureUploads(){this._locked=!1,this.update()}requestUpdate(t){this._version=t.version,this._pendingAttributeUpdates.push(t),this._hasPendingUpdate.value=!0,has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] AttributeStoreView.requestUpdate`,{message:t})}get currentEpoch(){return this._epoch}get hasPendingUpdates(){return this._pendingAttributeUpdates.length>0}update(){if(this._locked)return!1;const t=this._pendingAttributeUpdates;this._pendingAttributeUpdates=[];const e=!!t.length;for(const i of t){const{blockData:t,initArgs:e,sendUpdateEpoch:s,version:r}=i;has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] Epoch[${s}] AttributeStoreView.applyUpdate`),this._version=r,this._epoch=s,null!=e&&this._initialize(e);const a=this._data;for(let i=0;i<t.length;i++){const e=t[i],s=a[i];null!=s&&null!=e&&(has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] CpuBlock[${i}] AttributeStoreView.update`,{block:e}),s.update(e))}}return this._hasPendingUpdate.value=!1,e}getUniforms(){return{size:this.size}}getTextures(t){return{filterFlags:{texture:this._getTexture(t,0),unit:l},animation:{texture:this._getTexture(t,1),unit:d},gpgpu:{texture:this._getTexture(t,2),unit:o},localTimeOrigin:{texture:this._getTexture(t,7),unit:h},visualVariableData:{texture:this._getTexture(t,3),unit:u},dataDriven0:{texture:this._getTexture(t,4),unit:n},dataDriven1:{texture:this._getTexture(t,5),unit:a},dataDriven2:{texture:this._getTexture(t,6),unit:r}}}_getTexture(t,e){const i=this._data?.[e];return i?(i.updateTexture(t,this._version),i.getTexture(t)):this._getDefaultTexture(t)}_getDefaultTexture(t){if(null==this._defaultTexture){const e=new b(1);e.wrapMode=33071,e.samplingMode=9728,this._defaultTexture=new f(t,e,new Uint8Array(4))}return this._defaultTexture}}export{y as AttributeStoreView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import has from"../../../../core/has.js";import e from"../../../../core/Logger.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{AFeatureTile as s}from"./AFeatureTile.js";import{RESHUFFLING_EXEMPT_MEMORY_BYTES as i,RESHUFFLING_TARGET_MEMORY_EFFICIENCY as r,RESHUFFLING_EXEMPT_DRAW_CALLS as a,RESHUFFLING_TARGET_DRAW_EFFICIENCY as d,tileSize as o}from"./definitions.js";import n from"./DisplayEntity.js";import{TileCpuState as h}from"./TileCpuState.js";import{TileGpuState as u}from"./TileGpuState.js";import{debugMeshDataInfo as p}from"./mesh/meshDebugUtils.js";import l from"./util/Reader.js";import{deserializeList as m}from"./util/serializationUtils.js";const
|
|
2
|
+
import has from"../../../../core/has.js";import e from"../../../../core/Logger.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{AFeatureTile as s}from"./AFeatureTile.js";import{RESHUFFLING_EXEMPT_MEMORY_BYTES as i,RESHUFFLING_TARGET_MEMORY_EFFICIENCY as r,RESHUFFLING_EXEMPT_DRAW_CALLS as a,RESHUFFLING_TARGET_DRAW_EFFICIENCY as d,tileSize as o}from"./definitions.js";import n from"./DisplayEntity.js";import{TileCpuState as h}from"./TileCpuState.js";import{TileGpuState as u}from"./TileGpuState.js";import{debugMeshDataInfo as p}from"./mesh/meshDebugUtils.js";import l from"./util/Reader.js";import{deserializeList as m}from"./util/serializationUtils.js";const c=()=>e.getLogger("esri.views.2d.engine.webgl.FeatureTile");class g extends s{constructor(e,s,i,r,a,d){super(e,s,i,r),this._fader=a,this._labelInstanceId=d,this._cpuState=new h,this._gpuState=new u,this._requiresRefresh=!1,this._ended=!1,this._geometryInvalidated=!1,this.decluttering=!1,this.presenting=!1,this.visible=!0,this.transforms.tileUnitsToPixels=t()}destroy(){super.destroy();const e=this._cpuState.takeMetrics();this._fader?.removeFeatureTileMetrics(this,e),this._cpuState.destroy(),this._gpuState.destroy()}beforeRender(e){super.beforeRender(e),this._needsReshuffle&&e.reshuffleManager.schedule(this)}get symbols(){const e=new Map;for(const t of this._cpuState.metrics)e.get(t.labelClassId)||e.set(t.labelClassId,[]),e.get(t.labelClassId).push(t);return e}get id(){return this.key.id}get hasData(){return!!this._cpuState.meshes.size}get requiresRefresh(){return this._requiresRefresh}get ended(){return this._ended}get hasAnimations(){return this._cpuState.hasAnimations}get hasMetrics(){return this._cpuState.metrics.length>0}get entityIds(){return this._cpuState.getEntityObjectIds()}get usedMemory(){return this._cpuState.usedMemory+this._gpuState.usedMemory}get isReady(){return this.presenting}getDisplayList(){return this._gpuState.displayList}getMesh(e){const t=this._gpuState.getMesh(e);if(null==t)throw new Error(`InternalError: Unable to find VAO for instance: ${e}`);return t}getSortKeys(e){return this._cpuState.getSortKeys(e)}clearCpuState(){const e=this._cpuState.takeMetrics();this._fader?.removeFeatureTileMetrics(this,e),this._cpuState.destroy(),this._cpuState=new h}update(e){switch(e.type){case"append":this._onAppendMessage(e);break;case"update":this._onUpdateMessage(e)}e.objectIdMap&&this._cpuState.mergeObjectIdMap(e.objectIdMap),this._aggregateMemoryStats(),e.end&&(has("esri-2d-update-debug")&&console.debug(`Tile[${this.key.id}] FeatureTile.end`),this._ended=!0),this._geometryInvalidated=!0}reshuffle(e=!1){this.destroyed||(this._geometryInvalidated=!0,this._cpuState.reshuffle(e),this._aggregateMemoryStats(),has("esri-2d-update-debug")&&c().info(`Tile ${this.key.id} was reshuffled.`))}upload(e,t){this.presenting&&(this.hasMetrics&&(this._cpuState.setMetricVisibility(this._labelInstanceId),this._gpuState.uploadVisibility(this._cpuState)),this._geometryInvalidated&&(this._geometryInvalidated=!1,this._cpuState.prepareForUpload(t),this._aggregateMemoryStats(),this._gpuState.uploadGeometry(this,e,t,this._cpuState)))}copyPixelBufferedEntitesFrom(e,t,s,i){const r=s*o,a=i*o,d=this._cpuState.copyPixelBufferedEntitiesFrom(e._cpuState,t,r,a);this._geometryInvalidated||=d}_onAppendMessage(e){if(has("esri-2d-update-debug")&&console.debug(`Tile[${this.key.id}] FeatureTile.append`,{append:p(e?.append)}),!e.append)return;this._requiresRefresh||=e.append.requiresRefresh;const t=m(new l(e.append.entities),n),{insertedMetrics:s}=this._cpuState.append(t,e.append.data,!1,this);this._fader?.insertFeatureTileMetrics(this,s)}_onUpdateMessage(e){has("esri-2d-update-debug")&&console.debug(`Tile[${this.key.id}] FeatureTile.update`,{isPixelBuffer:e.isPixelBuffer,modify:p(e.modify),remove:e.remove});const t=m(new l(e.modify.entities),n),s=t.map(e=>e.id),i=e.isPixelBuffer??!1,r=[...e.remove,...s];if(i){const e=this._cpuState.removeByIdsFromBuffer(r);this._fader?.removeFeatureTileMetrics(this,e)}else{const e=this._cpuState.removeByIds(r);this._fader?.removeFeatureTileMetrics(this,e)}const{insertedMetrics:a}=this._cpuState.append(t,e.modify.data,i,this);this._fader?.insertFeatureTileMetrics(this,a)}_aggregateMemoryStats(){this.debugInfo.memory.bytesUsed=0,this.debugInfo.memory.bytesReserved=0;for(const e of this._cpuState.meshes.values())this.debugInfo.memory.bytesUsed+=e.memoryStats.bytesUsed,this.debugInfo.memory.bytesReserved+=e.memoryStats.bytesReserved}get _needsReshuffle(){if(this.destroyed)return!1;const{bytesUsed:e,bytesReserved:t}=this.debugInfo.memory,s=e/t,{minOrderedLength:o,length:n}=this.debugInfo.display;return t>i&&s<r||n>a&&o/n<d}}export{g as FeatureTile};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{unique as e}from"../../../../../core/arrayUtils.js";import{vertexLayoutHash as t}from"../shaderGraph/techniques/mesh/utils.js";import{BufferObject as i}from"../../../../webgl/BufferObject.js";import{DataType as r}from"../../../../webgl/enums.js";import{VertexArrayObject as s}from"../../../../webgl/VertexArrayObject.js";import{VertexBuffer as u}from"../../../../webgl/VertexBuffer.js";import{VertexElementDescriptor as o}from"../../../../webgl/VertexElementDescriptor.js";const f=4,n=[{name:"visibility",offset:0,type:r.FLOAT,count:1}],a={hash:t(n),attributes:n,stride:f};function l(t,i){return e(t.attributes,(e,t)=>e.name===t.name).filter(e=>i.locations.has(e.name)).map(e=>new o(e.name,e.count,e.type,e.offset,t.stride,e.normalized??!1)).sort((e,t)=>i.locations.get(e.name)-i.locations.get(t.name))}function
|
|
2
|
+
import{unique as e}from"../../../../../core/arrayUtils.js";import{vertexLayoutHash as t}from"../shaderGraph/techniques/mesh/utils.js";import{BufferObject as i}from"../../../../webgl/BufferObject.js";import{DataType as r}from"../../../../webgl/enums.js";import{VertexArrayObject as s}from"../../../../webgl/VertexArrayObject.js";import{VertexBuffer as u}from"../../../../webgl/VertexBuffer.js";import{VertexElementDescriptor as o}from"../../../../webgl/VertexElementDescriptor.js";const f=4,n=[{name:"visibility",offset:0,type:r.FLOAT,count:1}],a={hash:t(n),attributes:n,stride:f};function l(t,i){return e(t.attributes,(e,t)=>e.name===t.name).filter(e=>i.locations.has(e.name)).map(e=>new o(e.name,e.count,e.type,e.offset,t.stride,e.normalized??!1)).sort((e,t)=>i.locations.get(e.name)-i.locations.get(t.name))}function h(t,i){const r=[],s=e(t.attributes,(e,t)=>e.name===t.name).filter(e=>i.locations.has(e.name));for(const e of s){r.push(new o(e.name,e.count,e.type,e.offset,t.stride,e.normalized??!1));const s=i.computeAttributeMap[e.name];null!=s&&2===s.length&&(r.push(new o(s[0],e.count,e.type,e.offset+t.stride,t.stride,e.normalized??!1)),r.push(new o(s[1],e.count,e.type,e.offset+2*t.stride,t.stride,e.normalized??!1)))}return r.sort((e,t)=>i.locations.get(e.name)-i.locations.get(t.name))}class d{constructor(e){this._layout=e}destroy(){this._uploadedMeshData=null,this._vertexBuffer?.dispose(),this._computeVertexBuffer?.dispose(),this._visibilityBuffer?.dispose(),this._indexBuffer?.dispose(),this._computeIndexBuffer?.dispose(),this._computeVAO?.disposeVAOOnly(),this._geometryVAO?.disposeVAOOnly()}upload(e){if(e.layout.hash!==this._layout.hash)throw new Error("InternalError: Tried to update buffer with differing layout");const t=e.vertexBuffer,i=e.indexBuffer;if(!t||!i||!t.bufferSize)return;this._uploadedMeshData=e;const r=this._syncVertexGpuBuffer(t),s=this._syncIndexGpuBuffer(i),u=r||s,o=this._syncComputeBuffers(t,i);u&&(this._geometryVAO?.disposeVAOOnly(),this._geometryVAO=null),o&&(this._computeVAO?.disposeVAOOnly(),this._computeVAO=null),t.markGpuUploadComplete(),i.markGpuUploadComplete(),i.markComputeUploadComplete()}uploadVisibility(e){if(e.layout.hash!==this._layout.hash)throw new Error("InternalError: Tried to update buffer with differing layout");const t=e.visibilityBuffer;if(!t)return;this._uploadedMeshData=e;this._syncVisibilityGpuBuffer(t)&&(this._geometryVAO?.disposeVAOOnly(),this._geometryVAO=null,this._computeVAO?.disposeVAOOnly(),this._computeVAO=null),t.markGpuUploadComplete()}getAttributePrecisionPackFactors(){const e={};for(const t of this._layout.attributes)t.packPrecisionFactor&&(e[t.name]=t.packPrecisionFactor);return e}getDebugVertexInfo(e=!1,t){return this._uploadedMeshData?.getDebugVertexInfo(e,t)??null}getGeometryVAO(e,t){const r=this._uploadedMeshData;if(!r)return null;const o=r.vertexBuffer,f=r.indexBuffer,n=r.visibilityBuffer;if(!o||!f||!o.bufferSize)return null;if(this._vertexBuffer??=new u(e,l(this._layout,t),o.array,35048),this._indexBuffer??=i.createIndex(e,35048,f.array),n&&null==this._visibilityBuffer&&(this._visibilityBuffer=new u(e,l(a,t),n.array,35048)),!this._geometryVAO){const t=new Map([["geometry",this._vertexBuffer]]);this._visibilityBuffer&&t.set("visibility",this._visibilityBuffer),this._geometryVAO=new s(e,t,this._indexBuffer)}return this._geometryVAO}getComputeVAO(e,t){const i=this._uploadedMeshData;if(!i)return null;const r=i.vertexBuffer,o=i.indexBuffer,f=i.visibilityBuffer;if(!r||!o||!r.bufferSize)return null;if(this._computeVertexBuffer??=new u(e,h(this._layout,t),r.array,35048),this._computeIndexBuffer??=this._createComputeIndexBuffer(e,o),f&&null==this._visibilityBuffer&&(this._visibilityBuffer=new u(e,l(a,t),f.array,35048)),!this._computeVAO){const t=new Map([["geometry",this._computeVertexBuffer]]);this._visibilityBuffer&&t.set("visibility",this._visibilityBuffer),this._computeVAO=new s(e,t,this._computeIndexBuffer)}return this._computeVAO}_syncVertexGpuBuffer(e){let t=!1;return e.needsGpuRebuild?(this._vertexBuffer?.dispose(),this._computeVertexBuffer?.dispose(),this._vertexBuffer=null,this._computeVertexBuffer=null,t=!0):e.hasDirtyRange&&(this._vertexBuffer?.setSubData(e.array,e.dirtyStart,e.dirtyStart,e.dirtyEnd),this._computeVertexBuffer?.setSubData(e.array,e.dirtyStart,e.dirtyStart,e.dirtyEnd)),t}_syncVisibilityGpuBuffer(e){return e.needsGpuRebuild?(this._visibilityBuffer?.dispose(),this._visibilityBuffer=null,!0):(e.hasDirtyRange&&this._visibilityBuffer?.setSubData(e.array,e.dirtyStart,e.dirtyStart,e.dirtyEnd),!1)}_syncIndexGpuBuffer(e){return e.needsGpuRebuild?(this._indexBuffer?.dispose(),this._indexBuffer=null,!0):(e.hasDirtyRange&&this._indexBuffer?.setSubData(e.array,e.dirtyStart,e.dirtyStart,e.dirtyEnd),!1)}_syncComputeBuffers(e,t){let i=!1;return e.needsGpuRebuild&&(this._computeVertexBuffer?.dispose(),this._computeVertexBuffer=null,i=!0),(t.needsGpuRebuild||t.needsComputeRebuild)&&(this._computeIndexBuffer?.dispose(),this._computeIndexBuffer=null,i=!0),i}_createComputeIndexBuffer(e,t){const r=new Uint32Array(t.fillPointer/3);for(let i=0;i<t.fillPointer;i+=3)r[i/3]=t.array[i];return i.createIndex(e,35048,r)}}export{d as GpuMeshState};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../DisplayEntity.js";import e from"../DisplayRecord.js";import{VertexDataWriter as r}from"./VertexDataWriter.js";import i from"../util/Writer.js";class n{constructor(e,r=0){this._id=e,this._sizeHint=r,this._entityRecordCountOffset=0,this._entityCountOffset=0,this._entityIdIndex=0,this._entitySortKeyIndex=0,this._didEntityStart=!1,this._instanceIdToVertexData=new Map,this._recordIndexStart=0,this._recordIndexCount=0,this._recordVertexStart=0,this._recordVertexCount=0,this._current={metric:null,writer:null,start:0,sortKey:0,instanceId:0,layoutHash:0,indexStart:0,vertexStart:0,textureKey:0,metricBoxLenPointer:0},this._requiresRefresh=!1,this._entities=new i(Uint32Array,this._sizeHint*t.byteSizeHint),this._entityCountOffset=this._entities.push(0)}get id(){return this._id}serialize(){const t=new Array,e=[],r=this._entities.buffer();for(const i of this._instanceIdToVertexData.values())e.push(i.serialize(t));return{message:{data:e,entities:r},transferList:t}}get requiresRefresh(){return this._requiresRefresh}set requiresRefresh(t){this._requiresRefresh=t}vertexStart(){return this._current.vertexStart??0}vertexCount(){return this._current.writer?.vertexCount??0}indexCount(){return this._current.writer?.indexCount??0}vertexEnsureSize(t){this._current.writer.vertexEnsureSize(t)}indexEnsureSize(t){this._current.writer.indexEnsureSize(t)}vertexWrite(t){this._current.writer.writeVertex(t)}vertexWriteRegion(t){this._current.writer.writeVertexRegion(t)}vertexWriteF32(t){this._current.writer.writeVertexF32(t)}recordBounds(t,e,r,i){}indexWrite(t){this._current.writer.writeIndex(t)}metricStart(t){this._current.metric=t,this._current.metric.recordStart=this.recordCount()}metricEnd(){const t=this._current.writer;this._current.metric&&(this._current.metric.recordCount=this.recordCount()-this._current.metric.recordStart),this._current.metric?.bounds.length&&this._current.metric?.recordCount?(t.writeMetric(this._current.metric),this._current.metric=null):this._current.metric=null}metricBoxWrite(t){this._current.metric.bounds.push(t)}entityStart(t,e=t){this._entityIdIndex=this._entities.push(t),this._entitySortKeyIndex=this._entities.writeF32(e),this._entityRecordCountOffset=this._entities.push(0),this._didEntityStart=!0}entityRecordCount(){return this._entities.getValue(this._entityRecordCountOffset)}entityEnd(){if(!this._didEntityStart)return;0===this.entityRecordCount()?this._entities.seek(this._entityIdIndex):this._entities.incr(this._entityCountOffset),this._didEntityStart=!1}recordCount(){return this._entities.getValue(this._entityRecordCountOffset)}recordStart(t,e,r=0){this._current.writer=this._getVertexWriter(t,e),this._current.indexStart=this._current.writer.indexCount,this._current.vertexStart=this._current.writer.vertexCount,this._current.instanceId=t,this._current.layoutHash=e.hash,this._current.textureKey=r}recordEnd(t=0){const r=this._current.vertexStart,i=this._current.writer.vertexCount-r;if(!i)return!1;const n=this._current.indexStart,s=this._current.writer.indexCount-n;return this._recordIndexStart=n,this._recordIndexCount=s,this._recordVertexStart=r,this._recordVertexCount=i,this._entities.incr(this._entityRecordCountOffset),e.write(this._entities,this._current.instanceId,this._current.textureKey,n,s,r,i,t),!0}copyLast(t,r){const i=this._recordVertexStart+this._recordVertexCount;this._entities.incr(this._entityRecordCountOffset),e.write(this._entities,this._current.instanceId,this._current.textureKey,this._recordIndexStart+this._recordIndexCount,this._recordIndexCount,i,this._recordVertexCount,0);const n=this._current.writer.indexWriter,s=this._current.writer.vertexWriter,c=this._recordIndexStart+this._recordIndexCount,u=this._recordVertexCount;for(let e=this._recordIndexStart;e!==c;e++){const t=n.getValue(e);n.push(t+u)}const o=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT,h=this._recordVertexStart*o,_=(this._recordVertexStart+this._recordVertexCount)*o;for(let e=h;e!==_;e++){const t=s.getValue(e);s.push(t)}const d=this._current.writer.layout.position,a=d.packPrecisionFactor??1,x=d.offset/Uint32Array.BYTES_PER_ELEMENT,y=t*a,
|
|
2
|
+
import t from"../DisplayEntity.js";import e from"../DisplayRecord.js";import{VertexDataWriter as r}from"./VertexDataWriter.js";import i from"../util/Writer.js";class n{constructor(e,r=0){this._id=e,this._sizeHint=r,this._entityRecordCountOffset=0,this._entityCountOffset=0,this._entityIdIndex=0,this._entitySortKeyIndex=0,this._didEntityStart=!1,this._instanceIdToVertexData=new Map,this._recordIndexStart=0,this._recordIndexCount=0,this._recordVertexStart=0,this._recordVertexCount=0,this._current={metric:null,writer:null,start:0,sortKey:0,instanceId:0,layoutHash:0,indexStart:0,vertexStart:0,textureKey:0,metricBoxLenPointer:0},this._requiresRefresh=!1,this._entities=new i(Uint32Array,this._sizeHint*t.byteSizeHint),this._entityCountOffset=this._entities.push(0)}get id(){return this._id}serialize(){const t=new Array,e=[],r=this._entities.buffer();for(const i of this._instanceIdToVertexData.values())e.push(i.serialize(t));return{message:{data:e,entities:r},transferList:t}}get requiresRefresh(){return this._requiresRefresh}set requiresRefresh(t){this._requiresRefresh=t}vertexStart(){return this._current.vertexStart??0}vertexCount(){return this._current.writer?.vertexCount??0}indexCount(){return this._current.writer?.indexCount??0}vertexEnsureSize(t){this._current.writer.vertexEnsureSize(t)}indexEnsureSize(t){this._current.writer.indexEnsureSize(t)}vertexWrite(t){this._current.writer.writeVertex(t)}vertexWriteRegion(t){this._current.writer.writeVertexRegion(t)}vertexWriteF32(t){this._current.writer.writeVertexF32(t)}recordBounds(t,e,r,i){}indexWrite(t){this._current.writer.writeIndex(t)}metricStart(t){this._current.metric=t,this._current.metric.recordStart=this.recordCount()}metricEnd(){const t=this._current.writer;this._current.metric&&(this._current.metric.recordCount=this.recordCount()-this._current.metric.recordStart),this._current.metric?.bounds.length&&this._current.metric?.recordCount?(t.writeMetric(this._current.metric),this._current.metric=null):this._current.metric=null}metricBoxWrite(t){this._current.metric.bounds.push(t)}entityStart(t,e=t){this._entityIdIndex=this._entities.push(t),this._entitySortKeyIndex=this._entities.writeF32(e),this._entityRecordCountOffset=this._entities.push(0),this._didEntityStart=!0}entityRecordCount(){return this._entities.getValue(this._entityRecordCountOffset)}entityEnd(){if(!this._didEntityStart)return;0===this.entityRecordCount()?this._entities.seek(this._entityIdIndex):this._entities.incr(this._entityCountOffset),this._didEntityStart=!1}recordCount(){return this._entities.getValue(this._entityRecordCountOffset)}recordStart(t,e,r=0){this._current.writer=this._getVertexWriter(t,e),this._current.indexStart=this._current.writer.indexCount,this._current.vertexStart=this._current.writer.vertexCount,this._current.instanceId=t,this._current.layoutHash=e.hash,this._current.textureKey=r}recordEnd(t=0){const r=this._current.vertexStart,i=this._current.writer.vertexCount-r;if(!i)return!1;const n=this._current.indexStart,s=this._current.writer.indexCount-n;return this._recordIndexStart=n,this._recordIndexCount=s,this._recordVertexStart=r,this._recordVertexCount=i,this._entities.incr(this._entityRecordCountOffset),e.write(this._entities,this._current.instanceId,this._current.textureKey,n,s,r,i,t),!0}copyLast(t,r){const i=this._recordVertexStart+this._recordVertexCount;this._entities.incr(this._entityRecordCountOffset),e.write(this._entities,this._current.instanceId,this._current.textureKey,this._recordIndexStart+this._recordIndexCount,this._recordIndexCount,i,this._recordVertexCount,0);const n=this._current.writer.indexWriter,s=this._current.writer.vertexWriter,c=this._recordIndexStart+this._recordIndexCount,u=this._recordVertexCount;for(let e=this._recordIndexStart;e!==c;e++){const t=n.getValue(e);n.push(t+u)}const o=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT,h=this._recordVertexStart*o,_=(this._recordVertexStart+this._recordVertexCount)*o;for(let e=h;e!==_;e++){const t=s.getValue(e);s.push(t)}const d=this._current.writer.layout.position,a=d.packPrecisionFactor??1,x=d.offset/Uint32Array.BYTES_PER_ELEMENT,y=t*a,S=r*a;for(let e=i*o;e<=s.length;e+=o)s.i1616Add(e+x,y,S)}copyLastFrom(t,e,r){const i=t._entities.getValue(t._entityIdIndex),n=this._entities.getValue(this._entityIdIndex);if(!this._didEntityStart||i!==n){const e=t._entities.getValueF32(t._entitySortKeyIndex);this.entityStart(i,e)}this.recordStart(t._current.instanceId,t._current.writer.layout,t._current.textureKey);const s=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT,c=this._current.vertexStart,u=t._current.vertexStart-c,o=this._current.writer.indexWriter,h=this._current.writer.vertexWriter,_=t._current.writer.indexWriter,d=t._current.writer.vertexWriter;for(let l=t._current.indexStart;l!==_.length;l++){const t=_.getValue(l);o.push(t-u)}for(let l=t._current.vertexStart*s;l!==d.length;l++){const t=d.getValue(l);h.push(t)}const a=this._current.writer.layout.position,x=a.packPrecisionFactor??1,y=a.offset/Uint32Array.BYTES_PER_ELEMENT,S=e*x,f=r*x;for(let l=c*s;l<=h.length;l+=s)h.i1616Add(l+y,S,f);this.recordEnd()}_getVertexWriter(t,e){const i=this._instanceIdToVertexData;return i.has(t)||i.set(t,new r(t,e,this._sizeHint)),i.get(t)}}export{n as MeshData};
|