Skip to content

Releases: iTwin/itwinjs-core

v4.10.2

21 Nov 15:23
Compare
Choose a tag to compare

Release notes

Changes

  • Resolve GHSA-3xgq-45jj-v275 (backport #7388) [release/4.10.x] (#7389)
  • Fix containerType being overwritten with "property-store" (backport #7374) [release/4.11.x] (backport #7391) [release/4.10.x] (#7393)
  • documentation: fix link to isInUseLocksError (backport #7394) [release/4.10.x] (#7396)
  • Fix duplicate Bing map attributions. (backport #7408) [release/4.10.x] (#7410)
  • Improve Error Message for throwSqlError() (backport #7308) [release/4.10.x] (#7383)

Full changelog: 4.10.1...4.10.2

v4.10.1

14 Nov 18:11
Compare
Choose a tag to compare

Release notes

Changes

  • Presentation: Fix enum values formatting (backport #7345) [release/4.10.x] (#7359)
  • Allow 'should be able to cancel a snap' test to pass when a cancel successfully occurs (backport #7351) [release/4.10.x] (#7362)
  • Add Search Paramater Re-Insertion to Child Tile URLs in RealityDataSourceTilesetUrlImpl (backport #7352) [release/4.10.x] (#7364)
  • Build tools: Bump typedoc to a version that supports typescript 5.6 (backport #7353) [release/4.10.x] (#7368)

Full changelog: 4.10.0...4.10.1

v4.10.0

13 Nov 15:24
Compare
Choose a tag to compare

deltaDoc: true
version: '4.10.0'

4.10.0 Change Notes

Table of contents:

Revert timeline changes

At present, the sole method to reverse a defective changeset is to remove it from the iModel hub, which can lead to numerous side effects. A preferable approach would be to reverse the changeset in the timeline and introduce it as a new changeset. Although this method remains intrusive and necessitates a schema lock, it is safer because it allows for the reversal to restore previous changes, ensuring that nothing is permanently lost from the timeline.

BriefcaseDb.revertAndPushChanges Allow to push a single changeset that undo all changeset from tip to specified changeset in history.

Some detail and requirements are as following.

  • When invoking the iModel, it must not have any local modifications.
  • The operation is atomic; if it fails, the database will revert to its previous state.
  • The revert operation necessitates a schema lock (an exclusive lock on the iModel) because it does not lock each individual element affected by the revert.
  • If no description is provided after a revert, a default description for the changeset will be created and pushed, which releases the schema lock.
  • Schema changes are not reverted during SchemaSync, or they can be optionally skipped when SchemaSync is not utilized.

Display

Instancing

Some scenarios involve displaying the same basic graphic repeatedly. For example, imagine you are writing a Decorator that displays stop signs at many intersections along a road network. You might create one RenderGraphic for each individual stop sign and draw them all, but doing so would waste a lot of memory by duplicating the same geometry many times, and negatively impact your frame rate by invoking many draw calls.

WebGL provides instanced rendering to more efficiently support this kind of use case. You can define a single representation of the stop sign graphic, and then tell the renderer to draw it many times at different locations, orientations, and scales. iTwin.js now provides APIs that make it easy for you to create instanced graphics:

GraphicTemplate and RenderInstances are both reusable - you can produce multiple sets of instances of a given template, and use the same set of instances with multiple different templates.

For the stop sign example described above, you might have a glTF model representing a stop sign and an array containing the position of each stop sign. You could then use a function like the following to produce a graphic that draws the stop sign at each of those positions.

[[include:Gltf_Instancing]]

Overriding line color

iTwin.js allows you to dynamically override aspects of the appearance of geometry at display time. However, unlike SubCategoryAppearance and GeometryParams, which can distinguish between "line color" and "fill color", FeatureAppearance only provides a single color override that applies to both types of geometry.

To address this discrepancy, we've added a way to dynamically override the color and transparency of linear geometry independently from the rest of the geometry. Linear geometry includes open curves, line strings, point strings, and the outlines of planar regions. FeatureAppearance.lineRgb controls the color of linear geometry, and FeatureAppearance.lineTransparency controls the transparency. Both of these properties can be undefined, in which case the existing rgb or transparency property affects linear geometry - just as it always has. Or, they can be false, indicating that no color/transparency override is applied to linear geometry. Or, they can specify a transparency value or RgbColor that applies only to linear geometry.

Context Reality model visibility

Context reality models that have been attached using DisplayStyleState.attachRealityModel, can now be hidden by turning ON the ContextRealityModel.invisible flag. Previous implementation requiered context reality models to be detached in order to hide it from the scene.

Contour Display

A new rendering technique has been added to iTwin.js which allows a user to apply specific contour line renderings to subcategories within a scene.

iTwin.js now provides the following API to use this feature:

  • DisplayStyle3dSettings now has a contours property which contains all of the subcategories-to-styling association data necessary to enable this feature. That object is of type ContourDisplay.
  • ContourDisplay defines how contours are displayed in the iModel based on a list of ContourGroup objects in the groups property. Whether or not contours will be displayed in the viewport is controlled by this object's displayContours property, which defaults to false.
  • ContourGroup describes an association of subcategories to contour styling. It contains a set of subcategory IDs titled subCategories. Those subcategories will have the contour styling within the same group's Contour contourDef object applied to them.
  • Contour describes the rendering settings that apply to a specific set of subcategories within a ContourGroup. This actually describes stylings for two sets of contours: major and minor. These stylings are separate from each other. The minor contour occurs at a defined interval in meters. These intervals draw at a fixed height; they are not dependent on the range of the geometry to which they are applied. The major contour is dependent on the minor contour. The interval of its occurence is not measured directly in meters; rather its occurence is determined by the major interval count thusly: every nth contour will be styled as a major contour where n = the major interval count. For example, if you set this number to 1, every contour will be styled as a major contour. When it is 2, every other contour will be styled as a major contour, and so on. The properties describing how major and minor contours are styled are listed here:
    • majorStyle is the style that a major contour line will use. Defaults to an instantation of ContourStyle using pixelWidth of 2 and default values for the other properties.
    • minorStyle is the style that a minor contour line will use. Defaults to an instantation of ContourStyle using default values for the properties.
    • minorInterval is the interval for the minor contour occurrence in meters; these can be specified as fractional. Defaults to 1. If a value <= 0 is specified, this will be treated as 1 meter.
    • majorIntervalCount is the count of minor contour intervals that define a major interval (integer > 0). A value of 1 means no minor contours will be shown, only major contours. Defaults to 5. If a value < 1 is specified, this will be treated as 1. If a non-integer value is specified, it will be treated as if it were rounded to the nearest integer.
    • showGeometry, if true, shows underlying geometry along with the associated contours. If false, only shows the contours, not the underlying geometry. Defaults to true.
  • ContourStyle describes the style settings used by either a major or minor contour. It contains the following properties:
    • color is a color used by the major or minor contour of type RgbColor. Defaults to black.
    • pixelWidth is the width in pixels of a major or minor contour line, using range 1 to 8.5 in 0.5 increments. Defaults to 1.
    • pattern is the line pattern applied to a major or minor contour line of type LinePixels. Defaults to LinePixels.Solid.

Consult the following code for an example of enabling and configuring contour display in iTwin.js:

Read more

v4.9.7

06 Nov 19:23
Compare
Choose a tag to compare

Release notes

Changes

  • Enable ContentFormatter formatting struct and array type properties with 'undefined' value (backport #7270) [release/4.9.x] (#7327)
  • Add Undefined mercatorOrigin Check to computeMercatorFractionToDb (backport #7269) [release/4.9.x] (#7328)

Full changelog: 4.9.6...4.9.7

v4.9.6

05 Nov 15:23
Compare
Choose a tag to compare

Release notes

Changes

  • Update oidc-signin-tool to 4.3.7 (backport #7303) [release/4.9.x] (#7304)
  • iOS tests fix (backport #7306) [release/4.9.x] (#7307)
  • Fix ArcGIS Feature request failures on specific server (backport #7295) [release/4.9.x] (#7305)

Full changelog: 4.9.5...4.9.6

v4.9.5

22 Oct 20:02
Compare
Choose a tag to compare

Release notes

Changes

  • Add disableClipStyle to BranchState (backport #7109) [release/4.9.x] (#7254)
  • @bentley/imodeljs-native 4.9.32
  • Regression 4.9.2 where aliased ECClassId switch from returning classId to className (backport #7279) [release/4.9.x] (#7282)
  • BaseClass Differencing Validation fix (backport #7224) [release/4.9.x] (#7290)
  • @bentley/imodeljs-native 4.9.35

Full changelog: 4.9.4...4.9.5

v4.9.4

09 Oct 20:22
Compare
Choose a tag to compare

Release notes

Changes

  • Fix async worker return type (backport #7249) [release/4.9.x] (#7250)
  • Fix regression caused by ClassId conversion to class name vs hexid (backport #7238) [release/4.9.x] (#7246)

Full changelog: 4.9.3...4.9.4

v4.9.3

03 Oct 19:16
Compare
Choose a tag to compare

Release notes

Changes

  • Fix 4.9.0 changehistory image urls (backport #7213) [release/4.9.x] (#7229)
  • Limit the number of returned exports to 5 (backport #7223) [release/4.9.x] (#7225)
  • @bentley/imodeljs-native 4.9.30

Full changelog: 4.9.2...4.9.3

v4.9.2

02 Oct 15:15
Compare
Choose a tag to compare

Release notes

Changes

  • improve error serialization in rpc logs (backport #7216) [release/4.9.x] (#7217)

Full changelog: 4.9.1...4.9.2

v4.9.1

25 Sep 20:11
Compare
Choose a tag to compare

Release notes

Changes

  • Resolve GHSA-gcx4-mw62-g8wm (backport #7189) [release/4.9.x] (#7191)
  • Fix Cherry-pick: Resolve GHSA-gcx4-mw62-g8wm (backport #7189) [release/4.9.x] (#7192)
  • Revert "Added test cases to test support for boolean exps in select statements" (backport #7194) [release/4.9.x] (#7197)
  • Presentation: Fix failure to deserialize content from JSON for instances with nulls in array property values (backport #7196) [release/4.9.x] (#7198)

Full changelog: 4.9.0...4.9.1