-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
136 changed files
with
2,641 additions
and
353 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef _RIVE_ADVANCE_FLAGS_HPP_ | ||
#define _RIVE_ADVANCE_FLAGS_HPP_ | ||
|
||
#include "rive/enum_bitset.hpp" | ||
|
||
namespace rive | ||
{ | ||
enum class AdvanceFlags : unsigned short | ||
{ | ||
None = 0, | ||
|
||
/// Whether NestedArtboards should advance | ||
AdvanceNested = 1 << 0, | ||
|
||
/// Whether the Component should animate when advancing | ||
Animate = 1 << 1, | ||
|
||
/// Whether this Component is on the root artboard | ||
IsRoot = 1 << 2, | ||
|
||
/// Whether we are advancing to a new frame | ||
NewFrame = 1 << 3, | ||
}; | ||
RIVE_MAKE_ENUM_BITSET(AdvanceFlags) | ||
} // namespace rive | ||
#endif |
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,20 @@ | ||
#ifndef _RIVE_ADVANCING_COMPONENT_HPP_ | ||
#define _RIVE_ADVANCING_COMPONENT_HPP_ | ||
|
||
#include "rive/advance_flags.hpp" | ||
|
||
namespace rive | ||
{ | ||
class Component; | ||
class AdvancingComponent | ||
{ | ||
public: | ||
virtual bool advanceComponent( | ||
float elapsedSeconds, | ||
AdvanceFlags flags = AdvanceFlags::Animate | | ||
AdvanceFlags::NewFrame) = 0; | ||
static AdvancingComponent* from(Component* component); | ||
}; | ||
} // namespace rive | ||
|
||
#endif |
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
16 changes: 16 additions & 0 deletions
16
defold-rive/include/rive/animation/blend_state_1d_input.hpp
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,16 @@ | ||
#ifndef _RIVE_BLEND_STATE1_DINPUT_HPP_ | ||
#define _RIVE_BLEND_STATE1_DINPUT_HPP_ | ||
#include "rive/generated/animation/blend_state_1d_input_base.hpp" | ||
#include <stdio.h> | ||
namespace rive | ||
{ | ||
class BlendState1DInput : public BlendState1DInputBase | ||
{ | ||
public: | ||
bool hasValidInputId() const { return inputId() != Core::emptyId; } | ||
|
||
StatusCode import(ImportStack& importStack) override; | ||
}; | ||
} // namespace rive | ||
|
||
#endif |
20 changes: 20 additions & 0 deletions
20
defold-rive/include/rive/animation/blend_state_1d_viewmodel.hpp
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,20 @@ | ||
#ifndef _RIVE_BLEND_STATE1_DVIEW_MODEL_HPP_ | ||
#define _RIVE_BLEND_STATE1_DVIEW_MODEL_HPP_ | ||
#include "rive/generated/animation/blend_state_1d_viewmodel_base.hpp" | ||
#include "rive/data_bind/bindable_property.hpp" | ||
#include <stdio.h> | ||
namespace rive | ||
{ | ||
class BlendState1DViewModel : public BlendState1DViewModelBase | ||
{ | ||
public: | ||
StatusCode import(ImportStack& importStack) override; | ||
|
||
BindableProperty* bindableProperty() const { return m_bindableProperty; }; | ||
|
||
protected: | ||
BindableProperty* m_bindableProperty; | ||
}; | ||
} // namespace rive | ||
|
||
#endif |
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
27 changes: 27 additions & 0 deletions
27
defold-rive/include/rive/animation/data_converter_range_mapper_flags.hpp
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,27 @@ | ||
#ifndef _RIVE_DATA_CONVERTER_RANGE_MAPPER_FLAGS_HPP_ | ||
#define _RIVE_DATA_CONVERTER_RANGE_MAPPER_FLAGS_HPP_ | ||
|
||
#include "rive/enum_bitset.hpp" | ||
|
||
namespace rive | ||
{ | ||
enum class DataConverterRangeMapperFlags : unsigned short | ||
{ | ||
|
||
/// Whether the lower bound should be clamped | ||
ClampLower = 1 << 0, | ||
|
||
/// Whether the upper bound should be clamped | ||
ClampUpper = 1 << 1, | ||
|
||
/// Whether the value should wrap if it exceeds the range | ||
Modulo = 1 << 2, | ||
|
||
/// Whether to reverse the mapping | ||
Reverse = 1 << 3, | ||
|
||
}; | ||
|
||
RIVE_MAKE_ENUM_BITSET(DataConverterRangeMapperFlags) | ||
} // namespace rive | ||
#endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef _RIVE_HITTABLE_HPP_ | ||
#define _RIVE_HITTABLE_HPP_ | ||
|
||
#include "rive/math/aabb.hpp" | ||
|
||
namespace rive | ||
{ | ||
class Component; | ||
|
||
// A Component that can be hit-tested via two passes: a faster AABB pass, and a | ||
// more accurate HiFi pass. | ||
class Hittable | ||
{ | ||
public: | ||
static Hittable* from(Component* component); | ||
virtual bool hitTestAABB(const Vec2D& position) = 0; | ||
virtual bool hitTestHiFi(const Vec2D& position, float hitRadius) = 0; | ||
virtual ~Hittable() {} | ||
}; | ||
} // namespace rive | ||
|
||
#endif |
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
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.