Loading cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/core/providers/CustomHeightmapTerrainProvider.java +17 −4 Original line number Diff line number Diff line Loading @@ -16,10 +16,10 @@ package org.cesiumjs.cs.core.providers; import jsinterop.annotations.JsMethod; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; import com.google.gwt.typedarrays.shared.ArrayBufferView; import jsinterop.annotations.*; import org.cesiumjs.cs.core.*; import org.cesiumjs.cs.core.providers.options.CustomHeightmapTerrainProviderOptions; import org.cesiumjs.cs.js.JsObject; import org.cesiumjs.cs.promise.Promise; Loading Loading @@ -84,6 +84,17 @@ public class CustomHeightmapTerrainProvider implements TerrainProvider { @JsProperty(name = "width") public native Number width(); @JsConstructor private CustomHeightmapTerrainProvider() {} @JsConstructor public CustomHeightmapTerrainProvider(CustomHeightmapTerrainProviderOptions options) {} @JsOverlay public static CustomHeightmapTerrainProvider create(GeometryCallback callback, int width, int height) { return new CustomHeightmapTerrainProvider(CustomHeightmapTerrainProviderOptions.create(callback, width, height)); } /** * Gets the maximum geometric error allowed in a tile at a given level. This * function should not be called before {@link GeoserverTerrainProvider#ready} Loading Loading @@ -137,6 +148,8 @@ public class CustomHeightmapTerrainProvider implements TerrainProvider { @JsMethod public native Promise<TerrainData, Void> requestTileGeometry(int x, int y, int level, Request request); @FunctionalInterface @JsFunction public interface GeometryCallback { /** * Loading @@ -146,6 +159,6 @@ public class CustomHeightmapTerrainProvider implements TerrainProvider { * @return An array or a promise to an array of heights in row-major order. If undefined, * the globe will render the parent tile. */ JsObject callback(int x, int y, int level); ArrayBufferView callback(int x, int y, int level); } } cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/core/providers/options/CustomHeightmapTerrainProviderOptions.java +2 −3 Original line number Diff line number Diff line Loading @@ -16,9 +16,7 @@ package org.cesiumjs.cs.core.providers.options; import jsinterop.annotations.JsConstructor; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsProperty; import jsinterop.annotations.*; import org.cesiumjs.cs.core.Credit; import org.cesiumjs.cs.core.Ellipsoid; import org.cesiumjs.cs.core.TilingScheme; Loading @@ -27,6 +25,7 @@ import org.cesiumjs.cs.core.providers.CustomHeightmapTerrainProvider; /** * Options for {@link CustomHeightmapTerrainProvider}. */ @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") public class CustomHeightmapTerrainProviderOptions { /** * The callback function for requesting tile geometry. Loading cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/scene/options/ShadowMapOptions.java +2 −4 Original line number Diff line number Diff line Loading @@ -16,10 +16,7 @@ package org.cesiumjs.cs.scene.options; import jsinterop.annotations.JsConstructor; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; import jsinterop.annotations.*; import org.cesiumjs.cs.scene.Camera; /** Loading Loading @@ -102,6 +99,7 @@ public class ShadowMapOptions { * @param lightCamera A camera representing the light source. * @return ShadowMapOptions instance. */ @JsOverlay public static ShadowMapOptions create(Camera lightCamera) { ShadowMapOptions options = new ShadowMapOptions(); options.lightCamera = lightCamera; Loading Loading
cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/core/providers/CustomHeightmapTerrainProvider.java +17 −4 Original line number Diff line number Diff line Loading @@ -16,10 +16,10 @@ package org.cesiumjs.cs.core.providers; import jsinterop.annotations.JsMethod; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; import com.google.gwt.typedarrays.shared.ArrayBufferView; import jsinterop.annotations.*; import org.cesiumjs.cs.core.*; import org.cesiumjs.cs.core.providers.options.CustomHeightmapTerrainProviderOptions; import org.cesiumjs.cs.js.JsObject; import org.cesiumjs.cs.promise.Promise; Loading Loading @@ -84,6 +84,17 @@ public class CustomHeightmapTerrainProvider implements TerrainProvider { @JsProperty(name = "width") public native Number width(); @JsConstructor private CustomHeightmapTerrainProvider() {} @JsConstructor public CustomHeightmapTerrainProvider(CustomHeightmapTerrainProviderOptions options) {} @JsOverlay public static CustomHeightmapTerrainProvider create(GeometryCallback callback, int width, int height) { return new CustomHeightmapTerrainProvider(CustomHeightmapTerrainProviderOptions.create(callback, width, height)); } /** * Gets the maximum geometric error allowed in a tile at a given level. This * function should not be called before {@link GeoserverTerrainProvider#ready} Loading Loading @@ -137,6 +148,8 @@ public class CustomHeightmapTerrainProvider implements TerrainProvider { @JsMethod public native Promise<TerrainData, Void> requestTileGeometry(int x, int y, int level, Request request); @FunctionalInterface @JsFunction public interface GeometryCallback { /** * Loading @@ -146,6 +159,6 @@ public class CustomHeightmapTerrainProvider implements TerrainProvider { * @return An array or a promise to an array of heights in row-major order. If undefined, * the globe will render the parent tile. */ JsObject callback(int x, int y, int level); ArrayBufferView callback(int x, int y, int level); } }
cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/core/providers/options/CustomHeightmapTerrainProviderOptions.java +2 −3 Original line number Diff line number Diff line Loading @@ -16,9 +16,7 @@ package org.cesiumjs.cs.core.providers.options; import jsinterop.annotations.JsConstructor; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsProperty; import jsinterop.annotations.*; import org.cesiumjs.cs.core.Credit; import org.cesiumjs.cs.core.Ellipsoid; import org.cesiumjs.cs.core.TilingScheme; Loading @@ -27,6 +25,7 @@ import org.cesiumjs.cs.core.providers.CustomHeightmapTerrainProvider; /** * Options for {@link CustomHeightmapTerrainProvider}. */ @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") public class CustomHeightmapTerrainProviderOptions { /** * The callback function for requesting tile geometry. Loading
cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/scene/options/ShadowMapOptions.java +2 −4 Original line number Diff line number Diff line Loading @@ -16,10 +16,7 @@ package org.cesiumjs.cs.scene.options; import jsinterop.annotations.JsConstructor; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; import jsinterop.annotations.*; import org.cesiumjs.cs.scene.Camera; /** Loading Loading @@ -102,6 +99,7 @@ public class ShadowMapOptions { * @param lightCamera A camera representing the light source. * @return ShadowMapOptions instance. */ @JsOverlay public static ShadowMapOptions create(Camera lightCamera) { ShadowMapOptions options = new ShadowMapOptions(); options.lightCamera = lightCamera; Loading