Socket
Book a DemoInstallSign in
Socket

org.realityforge.com.google.elemental2:elemental2-webgl

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org.realityforge.com.google.elemental2:elemental2-webgl

Thin Java abstractions for the native Web Graphics Library APIs.

Source
mavenMaven
Version
2.27
Version published
Maintainers
1
Source

Elemental2 · Latest Release · Build Status

Elemental2 provides type checked access to all browser APIs for Java code. This is done by using closure extern files and generating JsTypes, which are part of the new JsInterop specification that is both implemented in GWT and J2CL.

Bazel dependencies

Using Bazel 8 or later, add to your `MODULE.bazel` file:

bazel_dep(name = "elemental2", version = "<RELEASE_VERSION>")

Replace RELEASE_VERSION with an actual release version:

Now from you can add elemental2 targets as needed to your j2cl_library deps.

Following are the different elemental2 modules and their target names:

moduleBazel targets for J2CL
core@elemental2//:elemental2-core-j2cl
dom@elemental2//:elemental2-dom-j2cl
promise@elemental2//:elemental2-promise-j2cl
indexeddb@elemental2//:elemental2-indexeddb-j2cl
svg@elemental2//:elemental2-svg-j2cl
webgl@elemental2//:elemental2-webgl-j2cl
media@elemental2//:elemental2-media-j2cl
webstorage@elemental2//:elemental2-webstorage-j2cl

Maven dependencies

If your project uses Maven, add the following maven dependencies in your pom.xml. Replace RELEASE_VERSION with an actual release version:

<dependency>
  <groupId>com.google.elemental2</groupId>
  <artifactId>${artifact-id}</artifactId>
  <version>RELEASE_VERSION</version>
</dependency>
moduleartifact-id
coreelemental2-core
domelemental2-dom
promiseelemental2-promise
indexeddbelemental2-indexeddb
svgelemental2-svg
webglelemental2-webgl
mediaelemental2-media
webstorageelemental2-webstorage

GWT

Elemental2 v1.0.0+ requires GWT 2.9 or above.

If you use Elemental2 with GWT, you need to inherit the right gwt module in your gwt.xml file:

moduleGWT module name
coreelemental2.core.Core
domelemental2.dom.Dom
promiseelemental2.promise.Promise
indexeddbelemental2.indexeddb.IndexedDb
svgelemental2.svg.Svg
webglelemental2.webgl.WebGl
mediaelemental2.media.Media
webstorageelemental2.webstorage.WebStorage

Build GWT compatible maven jar files

If you want to modify and/or build the last version on your own, follow the instructions below:

  • Install Bazelisk:
    $ npm install -g @bazel/bazelisk
    $ alias bazel=bazelisk
  • Clone this git repository:
    $ git clone https://github.com/google/elemental2.git
    
  • Run the release script:
        $ cd elemental2
        $ ./maven/release_elemental.sh --version local --no-deploy
    

The script will output the directory containing the generated jar files that can be used with maven.

Contributing

Please refer to the contributing document.

Licensing

Please refer to the license file.

Disclaimer

This is not an official Google product.

FAQs

Package last updated on 08 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts