Skip to content
import SceneModification from "@arcgis/core/layers/support/SceneModification.js";
Inheritance:
SceneModificationAccessor
Since
ArcGIS Maps SDK for JavaScript 4.16

A SceneModification is used to perform a client-side geometric modification. Clip, mask, and replace are supported modification types. A collection of SceneModifications can be applied to an IntegratedMeshLayer.modifications or IntegratedMesh3DTilesLayer.modifications.

Scene modifications need to be projectable to the spatial reference of the layer they modify without using the client-side projectOperator (see supported coordinate systems). Reprojection of the geometry to other spatial references can be done with the projectOperator.

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
PropertyTypeClass
declaredClass
readonly inherited
"clip" | "mask" | "replace"

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

geometry

autocast Property
Type
Polygon | null | undefined

The geometry representing the location of the modification. Only polygon geometries are currently supported.

Known Limitations

The polygon geometry must be simple.

Polygon geometries can be inspected and simplified before they are used as modifications. Use the simplifyOperator to make sure that modifications are applied correctly.

type

Property
Type
"clip" | "mask" | "replace"

The type of modification to perform.

IllustrationModificationDescription
modification-type-clipclip - removes selected areaClip-out portions of the integrated mesh to see features below. For example, utility work on gas or water lines in an area. Planners can create a scene in which the integrated mesh is clipped out at a site to expose the water or gas lines below it.
modification-type-maskmask - displays only selected areaDefine an area of interest. Use a polygon and draw only parts of the integrated mesh inside that polygon. For example, if you want to show only a portion of an integrated mesh within the boundaries of a city.
modification-type-replacereplace - flattens selected areaReplace an area of an integrated mesh based on a 3D polygon. For example, to add constructed buildings, flatten the integrated mesh at the footprint of a building so the new building can be visualized. Create different scenarios of the new construction area and share the scenarios as a web scene to discuss with stakeholders. The integrated mesh flattens to the minimum z-vertex of the modification polygon.
See also
Default value
"clip"

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
clone(): SceneModification
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameters
ParameterTypeDescriptionRequired
json
any

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
any

Returns a new instance of this class.

clone

Method
Signature
clone (): SceneModification

Creates a clone of this object.

Returns
SceneModification

A clone of the SceneModification instance that invoked this method.

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.