Skip to content

Releases: trusktr/geometry-interfaces

Release list

v2.0.0

Choose a tag to compare

@trusktr trusktr released this 28 Dec 05:27

What's Changed

  • Update DOMMatrix.js by @NaridaL in #6
  • Update DOMPoint to match the current draft spec (the one actually implemented by browsers) by @PaulCapron in #8
  • Rect and quad by @KevinDoughty in #10
  • Convert to TypeScript with @lume/cli, update some methods to latest spec, add unit tests, and fix issues.
    • BREAKING:

      There are no more varying types of builds, only ES Modules are now shipped in the dist/ folder, for example no more global.js or CommonJS files. To upgrade you will need to ensure that you use native ES Modules (with an importmap script in your browser) or that your build tooling supports ESM (most modern tools do).

      The recommended way to load this in a browser is now with an importmap like so:

      <script type="importmap">
          {
              "imports": {
                  "geometry-interfaces": "/node_modules/geometry-interfaces/dist/index.js"
              }
          }
      </script>
      
      <script type="module">
          import {DOMMatrix} from 'geometry-interfaces'
      
          // ... use DOMMatrix like before ...
      </script>

      If you want to load geometry-interfaces from CDN, you can replace "/node_modules/geometry-interfaces/dist/index.js" with https://cdn.jsdelivr.net/npm/geometry-interfaces@2.0.0/dist/index.js in your importmap:

      <script type="importmap">
          {
              "imports": {
                  "geometry-interfaces": "https://cdn.jsdelivr.net/npm/geometry-interfaces@2.0.0/dist/index.js"
              }
          }
      </script>

      To automatically generate an importmap to copy/paste into your HTML, visit https://generator.jspm.io, input geometry-interfaces into the UI on the left, and on the right will be an importmap automatically generated, and you can also configure which CDN the generator will use (jsdelivr highly recommended).

      All exports are now named, there are no more default exports (f.e. convert import DOMMatrix from 'geometry-interfaces' to import {DOMMatrix} from 'geometry-interfaces'.

      The rotate, rotateSelf, scale, and scaleSelf methods been updated to the latest version of the spec (and scaleNonUniform and scaleNonUniformSelf have been deprecated in facor of rotate and rotateSelf).

New Contributors

Full Changelog: v1.1.4...v2.0.0