Commit 10392b15 authored by iSergio's avatar iSergio
Browse files

Simple create options and small fixes.

parent 2400f690
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ public class ModelExperimental {
    /**
     * The currently playing glTF animations.
     */
    @JsProperty(name = "")
    @JsProperty(name = "activeAnimations")
    public native ModelExperimentalAnimationCollection activeAnimations();
    /**
     * Whether to cull back-facing geometry. When true, back face culling is determined by the material's doubleSided property; when false, back face culling is disabled. Back faces are not culled if ModelExperimental#color is translucent or ModelExperimental#silhouetteSize is greater than 0.0.
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ public class ModelExperimentalAnimation {
     * The scene time to start playing this animation. When this is undefined, the animation starts at the next frame.
     * Default: undefined
     */
    @JsProperty
    @JsProperty(name = "startTime")
    public native JulianDate startTime();
    /**
     * The event fired when this animation is stopped. This can be used, for example, to play a sound or start a
+62 −0
Original line number Diff line number Diff line
@@ -17,12 +17,14 @@
package org.cesiumjs.cs.scene.experimental.options;

import jsinterop.annotations.JsConstructor;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import org.cesiumjs.cs.core.JulianDate;
import org.cesiumjs.cs.js.JsArray;
import org.cesiumjs.cs.scene.enums.ModelAnimationLoop;
import org.cesiumjs.cs.scene.experimental.ModelExperimental;
import org.cesiumjs.cs.scene.experimental.ModelExperimentalAnimation;

/**
@@ -89,4 +91,64 @@ public class ModelExperimentalAnimationOptions {

    @JsConstructor
    public ModelExperimentalAnimationOptions() {}

    @JsOverlay
    public final ModelExperimentalAnimationOptions setName(String name) {
        this.name = name;
        return this;
    }

    @JsOverlay
    public final ModelExperimentalAnimationOptions setIndex(int index) {
        this.index = index;
        return this;
    }

    @JsOverlay
    public final ModelExperimentalAnimationOptions setStartTime(JulianDate startTime) {
        this.startTime = startTime;
        return this;
    }

    @JsOverlay
    public final ModelExperimentalAnimationOptions setDelay(double delay) {
        this.delay = delay;
        return this;
    }

    @JsOverlay
    public final ModelExperimentalAnimationOptions setStopTime(JulianDate stopTime) {
        this.stopTime = stopTime;
        return this;
    }

    @JsOverlay
    public final ModelExperimentalAnimationOptions setRemoveOnStop(boolean removeOnStop) {
        this.removeOnStop = removeOnStop;
        return this;
    }

    @JsOverlay
    public final ModelExperimentalAnimationOptions setMultiplier(double multiplier) {
        this.multiplier = multiplier;
        return this;
    }

    @JsOverlay
    public final ModelExperimentalAnimationOptions setReverse(boolean reverse) {
        this.reverse = reverse;
        return this;
    }

    @JsOverlay
    public final ModelExperimentalAnimationOptions setLoop(Number loop) {
        this.loop = loop;
        return this;
    }

    @JsOverlay
    public final ModelExperimentalAnimationOptions setAnimationTime(ModelExperimentalAnimation.AnimationTimeCallback animationTime) {
        this.animationTime = animationTime;
        return this;
    }
}