You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

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

com.google.elemental2:elemental2-webgl

Thin Java abstractions for the native Web Graphics Library APIs.


Version published
Maintainers
1

Readme

Source

Elemental2 · 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

If your project uses Bazel, add this repository as an external dependency in your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "com_google_elemental2",
    strip_prefix = "elemental2-1.1.0",
    url = "https://github.com/google/elemental2/archive/1.1.0.zip",
)

load("@com_google_elemental2//build_defs:repository.bzl", "load_elemental2_repo_deps")
load_elemental2_repo_deps()

load("@com_google_elemental2//build_defs:workspace.bzl", "setup_elemental2_workspace")
setup_elemental2_workspace()

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@com_google_elemental2//:elemental2-core-j2cl
dom@com_google_elemental2//:elemental2-dom-j2cl
promise@com_google_elemental2//:elemental2-promise-j2cl
indexeddb@com_google_elemental2//:elemental2-indexeddb-j2cl
svg@com_google_elemental2//:elemental2-svg-j2cl
webgl@com_google_elemental2//:elemental2-webgl-j2cl
media@com_google_elemental2//:elemental2-media-j2cl
webstorage@com_google_elemental2//:elemental2-webstorage-j2cl

Maven dependencies

If your project uses Maven, add the following maven dependencies in your pom.xml:

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

Download the jar files

You can also download manually the jars files.

modulejar file
coreelemental2-core.jar
domelemental2-dom.jar
promiseelemental2-promise.jar
indexeddbelemental2-indexeddb.jar
svgelemental2-svg.jar
webglelemental2-webgl.jar
mediaelemental2-media.jar
webstorageelemental2-webstorage.jar

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 03 Aug 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc