Loading .gitlab-ci.yml +87 −80 Original line number Diff line number Diff line image: gis4fun.org/openjdk:8 variables: MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository" MAVEN_CLI_OPTS: "--no-transfer-progress" WILDFLY_VERSION: "20.0.1.Final" WILDFLY_BASE_CLI: "./wildfly-$WILDFLY_VERSION/bin/jboss-cli.sh --controller=$WILDFLY_URL --user=$WILDFLY_USER --password=$WILDFLY_PASS --connect" VERSION: "" cache: untracked: true key: "$CI_BUILD_REF_NAME" key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" paths: - .m2/repository stages: - setup # - codequality need refactoring - compile - junit - javadoc - compile_showcase - init - build - test - package - deploy default: tags: - cesiumjs4gwt - docker interruptible: true setup:initialize: stage: setup script: - mvn clean before_script: - > if [[ "${CI_COMMIT_TAG}" != "" ]]; then mvn $MAVEN_CLI_OPTS versions:set -DnewVersion=${CI_COMMIT_TAG} else VERSION=$(mvn $MAVEN_CLI_OPTS -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) if [[ "${VERSION}" == *-SNAPSHOT ]]; then mvn $MAVEN_CLI_OPTS versions:set -DnewVersion=${VERSION} else mvn $MAVEN_CLI_OPTS versions:set -DnewVersion=${VERSION}-SNAPSHOT VERSION=${VERSION}-SNAPSHOT fi fi compile:cesiumjs4gwt-main: stage: compile stage: build script: - mvn -pl cesiumjs4gwt-main -DskipTests=true install - mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main -DskipTests=true compile junit:cesiumjs4gwt-main: stage: junit compile:cesiumjs4gwt-showcase: stage: build script: - mvn -pl cesiumjs4gwt-main test - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-showcase -DskipTests=true compile -am -DskipTests=true javadoc:cesiumjs4gwt-main: stage: javadoc test:cesiumjs4gwt-main: stage: test script: - mvn -pl cesiumjs4gwt-main javadoc:javadoc -Dadditionalparam=-Xdoclint:none - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main test compileshowcase:cesiumjs4gwt-showcase: stage: compile_showcase dependencies: - javadoc:cesiumjs4gwt-main package:cesiumjs4gwt-main: stage: package only: - master - develop - tags script: - mvn -pl cesiumjs4gwt-showcase -am package - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main -DskipTests=true package #artifacts: #paths: #- cesiumjs4gwt-main/target/*.jar deploy:artifactory: deploy:cesiumjs4gwt-main: stage: deploy dependencies: - compile:cesiumjs4gwt-main before_script: # Install JFrog CLI - curl -fL https://getcli.jfrog.io | sh # Configure Artifactory instance with JFrog CLI - ./jfrog rt config --url=$ARTIFACTORY_URL --user=$ARTIFACTORY_USER --password=$ARTIFACTORY_PASS - ./jfrog rt c show # Set the M2_HOME environment variable - export M2_HOME=/usr/share/maven # Определяем версию пакета. Если с коммитом не пришёл тэг, то принудительно снапшотим пакеты - > if [[ "${CI_COMMIT_TAG}" != "" ]]; then mvn versions:set -DnewVersion=${CI_COMMIT_TAG} sed -i 's,MAVEN_REPO_KEY,'"$MAVEN_REPO_KEY"',g' configuration.yml else VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) if [[ "${VERSION}" == *-SNAPSHOT ]]; then mvn versions:set -DnewVersion=${VERSION} else mvn versions:set -DnewVersion=${VERSION}-SNAPSHOT fi sed -i 's,MAVEN_REPO_KEY,'"$MAVEN_REPO_KEY_SNAPSHOT"',g' configuration.yml fi only: - master - develop - tags script: - echo $CI_JOB_ID # Run the MVN command - ./jfrog rt mvn "clean -pl cesiumjs4gwt-main install" configuration.yml --build-name=gitlabci-maven-artifactory --build-number=$CI_JOB_ID # Collect the environment variables - ./jfrog rt bce gitlabci-maven-artifactory $CI_JOB_ID # Pass the build information to Artifactory - ./jfrog rt bp gitlabci-maven-artifactory $CI_JOB_ID #- cat report-aggregate/target/site/jacoco-aggregate/index.html - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main -DskipTests=true deploy artifacts: paths: - cesiumjs4gwt-main/target/*.jar package:cesiumjs4gwt-showcase: stage: package only: - master - develop - tags script: - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-showcase package -am -DskipTests=true artifacts: paths: - cesiumjs4gwt-showcase/target/*.war deploy:wildfly: deploy:cesiumjs4gwt-showcase: stage: deploy dependencies: - compileshowcase:cesiumjs4gwt-showcase before_script: only: - master - develop - tags script: - curl https://gis4fun.org/wildfly/wildfly-$WILDFLY_VERSION.tar.gz --output wildfly.tar.gz && tar -zxf wildfly.tar.gz - > if [[ "${CI_COMMIT_TAG}" != "" ]]; then VERSION=${CI_COMMIT_TAG} else VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) if [[ "${VERSION}" == *-SNAPSHOT ]]; then VERSION=${VERSION} SUFFIX="-SNAPSHOT" else VERSION=${VERSION}-SNAPSHOT SUFFIX="" fi - EXISTS=`$WILDFLY_BASE_CLI --commands="deployment-info --server-group=main-server-group --name=cesiumjs4gwt-showcase$SUFFIX.war"` - > if [[ $EXISTS = "" ]]; then echo "empty" $WILDFLY_BASE_CLI --commands="deploy cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase-$VERSION.war --name=cesiumjs4gwt-showcase$SUFFIX.war --server-groups=main-server-group" else echo "notempty" $WILDFLY_BASE_CLI --commands="deploy cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase-$VERSION.war --name=cesiumjs4gwt-showcase$SUFFIX.war --force" fi script: - echo $VERSION - mv cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase-$VERSION.war cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase.war - jboss-cli.sh --controller=127.0.0.1:9999 --user=$WILDFLY_USER --password=$WILDFLY_PASS --connect --commands="deploy cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase.war --force" only: - master - tags No newline at end of file README.md +2 −0 Original line number Diff line number Diff line [](https://gis4fun.org/gitlab/iSergio/cesiumjs4gwt/-/commits/master) [](https://gis4fun.org/gitlab/iSergio/cesiumjs4gwt/-/commits/develop) # GWT Cesium Wrapper [CesiumJS](http://cesiumjs.org) GWT Wrapper based on JsInterop 1.0.2 for [GWT 2.8.x](http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_2). Loading cesiumjs4gwt-main/pom.xml +123 −123 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>cesiumjs4gwt</artifactId> <groupId>org.cesiumjs</groupId> <version>1.74</version> <version>1.79.1</version> </parent> <name>CesiumJS GWT Wrapper</name> Loading cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/Cesium.java +390 −356 Original line number Diff line number Diff line Loading @@ -16,26 +16,18 @@ package org.cesiumjs.cs; import jsinterop.annotations.*; import org.cesiumjs.cs.collections.EntityCollection; import org.cesiumjs.cs.core.Cartographic; import org.cesiumjs.cs.core.Ellipsoid; import org.cesiumjs.cs.core.JulianDate; import org.cesiumjs.cs.core.TimeInterval; import org.cesiumjs.cs.core.*; import org.cesiumjs.cs.core.providers.CesiumTerrainProvider; import org.cesiumjs.cs.core.providers.TerrainProvider; import org.cesiumjs.cs.datasources.graphics.ModelGraphics; import org.cesiumjs.cs.js.JsObject; import org.cesiumjs.cs.promise.Promise; import org.cesiumjs.cs.scene.Material; import org.cesiumjs.cs.scene.Scene; import org.cesiumjs.cs.widgets.Command; import jsinterop.annotations.JsConstructor; import jsinterop.annotations.JsFunction; import jsinterop.annotations.JsMethod; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; /** * @author Serge Silaev aka iSergio */ Loading Loading @@ -184,15 +176,16 @@ public class Cesium { Cartographic[] positions); // TODO: Example /** * Destroys an object. Each of the object's functions, including functions in * its prototype, is replaced with a function that throws a DeveloperError, * except for the object's isDestroyed function, which is set to a function that * returns true. The object's properties are removed with delete. * * <p> * This function is used by objects that hold native resources, e.g., WebGL * resources, which need to be * * <p> * explicitly released. Client code calls an object's destroy function, which * then releases the native resource and calls destroyObject to put itself in a * destroyed state. Loading @@ -203,15 +196,16 @@ public class Cesium { public static native void destroyObject(Object object); // TODO: Example /** * Destroys an object. Each of the object's functions, including functions in * its prototype, is replaced with a function that throws a DeveloperError, * except for the object's isDestroyed function, which is set to a function that * returns true. The object's properties are removed with delete. * * <p> * This function is used by objects that hold native resources, e.g., WebGL * resources, which need to be * * <p> * explicitly released. Client code calls an object's destroy function, which * then releases the native resource and calls destroyObject to put itself in a * destroyed state. Loading Loading @@ -271,6 +265,17 @@ public class Cesium { @JsMethod(namespace = "Cesium", name = "exportKml") public static native Promise<JsObject, Void> exportKml(ExportKmlOptions options); /** * Creates a Material that combines multiple layers of color/gradient bands and maps them to terrain heights. * The shader does a binary search over all the heights to find out which colors are above and below a given height, * and interpolates between them for the final color. This material supports hundreds of entries relatively cheaply. * * @param options {@link ElevationBandMaterialOptions} with the following properties * @return A new Material instance. */ @JsMethod(namespace = "Cesium", name = "createElevationBandMaterial") public static native Material createElevationBandMaterial(ElevationBandMaterialOptions options); @JsFunction public interface Function { Object function(Object... args); Loading Loading @@ -423,4 +428,33 @@ public class Cesium { String Callback(ModelGraphics model, org.cesiumjs.cs.core.JulianDate time, JsObject externalFiles); } } /** * Options for {@link Cesium#createElevationBandMaterial(ElevationBandMaterialOptions)}. */ @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") public static class ElevationBandMaterialOptions { /** * The scene where the visualization is taking place. */ @JsProperty public Scene scene; /** * A list of bands ordered from lowest to highest precedence. */ @JsProperty public ElevationBandMaterialBand[] layers; @JsConstructor protected ElevationBandMaterialOptions() { } @JsOverlay public static ElevationBandMaterialOptions create(Scene scene, ElevationBandMaterialBand[] layers) { ElevationBandMaterialOptions options = new ElevationBandMaterialOptions(); options.scene = scene; options.layers = layers; return options; } } } cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/collections/BillboardCollection.java +111 −107 Original line number Diff line number Diff line Loading @@ -16,11 +16,7 @@ package org.cesiumjs.cs.collections; import jsinterop.annotations.JsConstructor; import jsinterop.annotations.JsMethod; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; import jsinterop.annotations.*; import org.cesiumjs.cs.collections.options.BillboardCollectionOptions; import org.cesiumjs.cs.core.Matrix4; import org.cesiumjs.cs.core.Transforms; Loading @@ -32,6 +28,7 @@ import org.cesiumjs.cs.scene.options.BillboardOptions; /** * A renderable collection of billboards. Billboards are viewport-aligned images * positioned in the 3D scene. * * @author Serge Silaev aka iSergio */ // TODO: Examples Loading Loading @@ -67,6 +64,13 @@ public class BillboardCollection extends Collection<Billboard> { @JsProperty public Matrix4 modelMatrix; /** * Determines if the billboards in the collection will be shown. * Default: true */ @JsProperty public boolean show; /** * A renderable collection of billboards. Billboards are viewport-aligned images * positioned in the 3D scene. Billboards are added and removed from the Loading Loading
.gitlab-ci.yml +87 −80 Original line number Diff line number Diff line image: gis4fun.org/openjdk:8 variables: MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository" MAVEN_CLI_OPTS: "--no-transfer-progress" WILDFLY_VERSION: "20.0.1.Final" WILDFLY_BASE_CLI: "./wildfly-$WILDFLY_VERSION/bin/jboss-cli.sh --controller=$WILDFLY_URL --user=$WILDFLY_USER --password=$WILDFLY_PASS --connect" VERSION: "" cache: untracked: true key: "$CI_BUILD_REF_NAME" key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" paths: - .m2/repository stages: - setup # - codequality need refactoring - compile - junit - javadoc - compile_showcase - init - build - test - package - deploy default: tags: - cesiumjs4gwt - docker interruptible: true setup:initialize: stage: setup script: - mvn clean before_script: - > if [[ "${CI_COMMIT_TAG}" != "" ]]; then mvn $MAVEN_CLI_OPTS versions:set -DnewVersion=${CI_COMMIT_TAG} else VERSION=$(mvn $MAVEN_CLI_OPTS -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) if [[ "${VERSION}" == *-SNAPSHOT ]]; then mvn $MAVEN_CLI_OPTS versions:set -DnewVersion=${VERSION} else mvn $MAVEN_CLI_OPTS versions:set -DnewVersion=${VERSION}-SNAPSHOT VERSION=${VERSION}-SNAPSHOT fi fi compile:cesiumjs4gwt-main: stage: compile stage: build script: - mvn -pl cesiumjs4gwt-main -DskipTests=true install - mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main -DskipTests=true compile junit:cesiumjs4gwt-main: stage: junit compile:cesiumjs4gwt-showcase: stage: build script: - mvn -pl cesiumjs4gwt-main test - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-showcase -DskipTests=true compile -am -DskipTests=true javadoc:cesiumjs4gwt-main: stage: javadoc test:cesiumjs4gwt-main: stage: test script: - mvn -pl cesiumjs4gwt-main javadoc:javadoc -Dadditionalparam=-Xdoclint:none - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main test compileshowcase:cesiumjs4gwt-showcase: stage: compile_showcase dependencies: - javadoc:cesiumjs4gwt-main package:cesiumjs4gwt-main: stage: package only: - master - develop - tags script: - mvn -pl cesiumjs4gwt-showcase -am package - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main -DskipTests=true package #artifacts: #paths: #- cesiumjs4gwt-main/target/*.jar deploy:artifactory: deploy:cesiumjs4gwt-main: stage: deploy dependencies: - compile:cesiumjs4gwt-main before_script: # Install JFrog CLI - curl -fL https://getcli.jfrog.io | sh # Configure Artifactory instance with JFrog CLI - ./jfrog rt config --url=$ARTIFACTORY_URL --user=$ARTIFACTORY_USER --password=$ARTIFACTORY_PASS - ./jfrog rt c show # Set the M2_HOME environment variable - export M2_HOME=/usr/share/maven # Определяем версию пакета. Если с коммитом не пришёл тэг, то принудительно снапшотим пакеты - > if [[ "${CI_COMMIT_TAG}" != "" ]]; then mvn versions:set -DnewVersion=${CI_COMMIT_TAG} sed -i 's,MAVEN_REPO_KEY,'"$MAVEN_REPO_KEY"',g' configuration.yml else VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) if [[ "${VERSION}" == *-SNAPSHOT ]]; then mvn versions:set -DnewVersion=${VERSION} else mvn versions:set -DnewVersion=${VERSION}-SNAPSHOT fi sed -i 's,MAVEN_REPO_KEY,'"$MAVEN_REPO_KEY_SNAPSHOT"',g' configuration.yml fi only: - master - develop - tags script: - echo $CI_JOB_ID # Run the MVN command - ./jfrog rt mvn "clean -pl cesiumjs4gwt-main install" configuration.yml --build-name=gitlabci-maven-artifactory --build-number=$CI_JOB_ID # Collect the environment variables - ./jfrog rt bce gitlabci-maven-artifactory $CI_JOB_ID # Pass the build information to Artifactory - ./jfrog rt bp gitlabci-maven-artifactory $CI_JOB_ID #- cat report-aggregate/target/site/jacoco-aggregate/index.html - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-main -DskipTests=true deploy artifacts: paths: - cesiumjs4gwt-main/target/*.jar package:cesiumjs4gwt-showcase: stage: package only: - master - develop - tags script: - mvn $MAVEN_CLI_OPTS -pl cesiumjs4gwt-showcase package -am -DskipTests=true artifacts: paths: - cesiumjs4gwt-showcase/target/*.war deploy:wildfly: deploy:cesiumjs4gwt-showcase: stage: deploy dependencies: - compileshowcase:cesiumjs4gwt-showcase before_script: only: - master - develop - tags script: - curl https://gis4fun.org/wildfly/wildfly-$WILDFLY_VERSION.tar.gz --output wildfly.tar.gz && tar -zxf wildfly.tar.gz - > if [[ "${CI_COMMIT_TAG}" != "" ]]; then VERSION=${CI_COMMIT_TAG} else VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) if [[ "${VERSION}" == *-SNAPSHOT ]]; then VERSION=${VERSION} SUFFIX="-SNAPSHOT" else VERSION=${VERSION}-SNAPSHOT SUFFIX="" fi - EXISTS=`$WILDFLY_BASE_CLI --commands="deployment-info --server-group=main-server-group --name=cesiumjs4gwt-showcase$SUFFIX.war"` - > if [[ $EXISTS = "" ]]; then echo "empty" $WILDFLY_BASE_CLI --commands="deploy cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase-$VERSION.war --name=cesiumjs4gwt-showcase$SUFFIX.war --server-groups=main-server-group" else echo "notempty" $WILDFLY_BASE_CLI --commands="deploy cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase-$VERSION.war --name=cesiumjs4gwt-showcase$SUFFIX.war --force" fi script: - echo $VERSION - mv cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase-$VERSION.war cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase.war - jboss-cli.sh --controller=127.0.0.1:9999 --user=$WILDFLY_USER --password=$WILDFLY_PASS --connect --commands="deploy cesiumjs4gwt-showcase/target/cesiumjs4gwt-showcase.war --force" only: - master - tags No newline at end of file
README.md +2 −0 Original line number Diff line number Diff line [](https://gis4fun.org/gitlab/iSergio/cesiumjs4gwt/-/commits/master) [](https://gis4fun.org/gitlab/iSergio/cesiumjs4gwt/-/commits/develop) # GWT Cesium Wrapper [CesiumJS](http://cesiumjs.org) GWT Wrapper based on JsInterop 1.0.2 for [GWT 2.8.x](http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_2). Loading
cesiumjs4gwt-main/pom.xml +123 −123 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>cesiumjs4gwt</artifactId> <groupId>org.cesiumjs</groupId> <version>1.74</version> <version>1.79.1</version> </parent> <name>CesiumJS GWT Wrapper</name> Loading
cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/Cesium.java +390 −356 Original line number Diff line number Diff line Loading @@ -16,26 +16,18 @@ package org.cesiumjs.cs; import jsinterop.annotations.*; import org.cesiumjs.cs.collections.EntityCollection; import org.cesiumjs.cs.core.Cartographic; import org.cesiumjs.cs.core.Ellipsoid; import org.cesiumjs.cs.core.JulianDate; import org.cesiumjs.cs.core.TimeInterval; import org.cesiumjs.cs.core.*; import org.cesiumjs.cs.core.providers.CesiumTerrainProvider; import org.cesiumjs.cs.core.providers.TerrainProvider; import org.cesiumjs.cs.datasources.graphics.ModelGraphics; import org.cesiumjs.cs.js.JsObject; import org.cesiumjs.cs.promise.Promise; import org.cesiumjs.cs.scene.Material; import org.cesiumjs.cs.scene.Scene; import org.cesiumjs.cs.widgets.Command; import jsinterop.annotations.JsConstructor; import jsinterop.annotations.JsFunction; import jsinterop.annotations.JsMethod; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; /** * @author Serge Silaev aka iSergio */ Loading Loading @@ -184,15 +176,16 @@ public class Cesium { Cartographic[] positions); // TODO: Example /** * Destroys an object. Each of the object's functions, including functions in * its prototype, is replaced with a function that throws a DeveloperError, * except for the object's isDestroyed function, which is set to a function that * returns true. The object's properties are removed with delete. * * <p> * This function is used by objects that hold native resources, e.g., WebGL * resources, which need to be * * <p> * explicitly released. Client code calls an object's destroy function, which * then releases the native resource and calls destroyObject to put itself in a * destroyed state. Loading @@ -203,15 +196,16 @@ public class Cesium { public static native void destroyObject(Object object); // TODO: Example /** * Destroys an object. Each of the object's functions, including functions in * its prototype, is replaced with a function that throws a DeveloperError, * except for the object's isDestroyed function, which is set to a function that * returns true. The object's properties are removed with delete. * * <p> * This function is used by objects that hold native resources, e.g., WebGL * resources, which need to be * * <p> * explicitly released. Client code calls an object's destroy function, which * then releases the native resource and calls destroyObject to put itself in a * destroyed state. Loading Loading @@ -271,6 +265,17 @@ public class Cesium { @JsMethod(namespace = "Cesium", name = "exportKml") public static native Promise<JsObject, Void> exportKml(ExportKmlOptions options); /** * Creates a Material that combines multiple layers of color/gradient bands and maps them to terrain heights. * The shader does a binary search over all the heights to find out which colors are above and below a given height, * and interpolates between them for the final color. This material supports hundreds of entries relatively cheaply. * * @param options {@link ElevationBandMaterialOptions} with the following properties * @return A new Material instance. */ @JsMethod(namespace = "Cesium", name = "createElevationBandMaterial") public static native Material createElevationBandMaterial(ElevationBandMaterialOptions options); @JsFunction public interface Function { Object function(Object... args); Loading Loading @@ -423,4 +428,33 @@ public class Cesium { String Callback(ModelGraphics model, org.cesiumjs.cs.core.JulianDate time, JsObject externalFiles); } } /** * Options for {@link Cesium#createElevationBandMaterial(ElevationBandMaterialOptions)}. */ @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") public static class ElevationBandMaterialOptions { /** * The scene where the visualization is taking place. */ @JsProperty public Scene scene; /** * A list of bands ordered from lowest to highest precedence. */ @JsProperty public ElevationBandMaterialBand[] layers; @JsConstructor protected ElevationBandMaterialOptions() { } @JsOverlay public static ElevationBandMaterialOptions create(Scene scene, ElevationBandMaterialBand[] layers) { ElevationBandMaterialOptions options = new ElevationBandMaterialOptions(); options.scene = scene; options.layers = layers; return options; } } }
cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/collections/BillboardCollection.java +111 −107 Original line number Diff line number Diff line Loading @@ -16,11 +16,7 @@ package org.cesiumjs.cs.collections; import jsinterop.annotations.JsConstructor; import jsinterop.annotations.JsMethod; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; import jsinterop.annotations.*; import org.cesiumjs.cs.collections.options.BillboardCollectionOptions; import org.cesiumjs.cs.core.Matrix4; import org.cesiumjs.cs.core.Transforms; Loading @@ -32,6 +28,7 @@ import org.cesiumjs.cs.scene.options.BillboardOptions; /** * A renderable collection of billboards. Billboards are viewport-aligned images * positioned in the 3D scene. * * @author Serge Silaev aka iSergio */ // TODO: Examples Loading Loading @@ -67,6 +64,13 @@ public class BillboardCollection extends Collection<Billboard> { @JsProperty public Matrix4 modelMatrix; /** * Determines if the billboards in the collection will be shown. * Default: true */ @JsProperty public boolean show; /** * A renderable collection of billboards. Billboards are viewport-aligned images * positioned in the 3D scene. Billboards are added and removed from the Loading