-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Condensed driver key and pose sampler key into one class since they do the same thing.
- Loading branch information
1 parent
375429c
commit 49dcb85
Showing
18 changed files
with
94 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/com/trainguy9512/animationoverhaul/animation/data/AnimationDataKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.trainguy9512.animationoverhaul.animation.data; | ||
|
||
import com.trainguy9512.animationoverhaul.animation.pose.sample.PoseSampler; | ||
|
||
import java.util.function.Supplier; | ||
|
||
/** | ||
* Represents a key for associating with data within pose samplers and animation driver containers | ||
* <p> | ||
* These keys are used for storing the default value of a type of data, and then accessing it | ||
* whenever an instance is needed. | ||
* <p> | ||
* | ||
* @param <D> The type of data associated with the key | ||
* @param identifier String identifier used for debugging | ||
* @param dataSupplier The default value of the key | ||
* | ||
* @see PoseSampler | ||
* @see AnimationDriverContainer | ||
*/ | ||
public record AnimationDataKey<D>(String identifier, Supplier<D> dataSupplier) { | ||
|
||
public AnimationDataKey<D> of(String identifier, Supplier<D> dataSupplier){ | ||
return new AnimationDataKey<>(identifier, dataSupplier); | ||
} | ||
|
||
public D createInstance(){ | ||
return this.dataSupplier.get(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 0 additions & 70 deletions
70
src/main/java/com/trainguy9512/animationoverhaul/animation/data/AnimationDriverKey.java
This file was deleted.
Oops, something went wrong.
70 changes: 0 additions & 70 deletions
70
src/main/java/com/trainguy9512/animationoverhaul/animation/data/PoseSamplerKey.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.