35 return std::make_shared<PathNode>(
json);
79 const std::array<Vector2f, 4>
verts = {
86 std::copy(
reinterpret_cast<const float*
>(&
verts.front()),
reinterpret_cast<const float*
>(&
verts.back()),
vertexArray->vertices.data.begin());
105 const std::array<Vector2f, 4>
verts = {
112 const std::array<unsigned int, 6>
indices = {0, 1, 2, 1, 3, 2};
133 pathFSM->updateState(deltaTime);
213 if (
json.contains(
"name"))
name =
json[
"name"].get<std::string>();
225 if (
json.contains(
"pathFSM")) {
std::string getAssetFolderPath() const
void runTaskOnMainThread(std::function< void()> task)
std::vector< CubicBezier > beziers
Rect getBoundingBox() const
static unsigned int fillUniform
static unsigned int localUniform
static unsigned int numBeziersUniform
std::shared_ptr< SkeletalAnimatable > skeletalAnimatable
static unsigned int posAttribute
virtual void preUpdate(size_t threadNum, const Scene &scene, float deltaTime) override
static unsigned int cameraUniform
static unsigned int strokeUniform
virtual void render(const Camera &camera, float deltaTime) const override
static unsigned int zPositionUniform
std::optional< std::vector< BezierWeights > > skeletalWeights
static std::unique_ptr< const OpenGL::Shader > shader
static unsigned int strokeRadiusUniform
std::optional< Path > basePath
std::unique_ptr< OpenGL::VertexArray< Vector2f, 2 > > vertexArray
std::optional< StateAnimatable< Path > > pathFSM
virtual void end(const Scene &scene) override
virtual void begin(const Scene &scene) override
static unsigned int vertexColorUniform
static unsigned int strokeColorUniform
static unsigned int beziersUniform
static void addNodeSaveStateConstructor(const std::string &key, std::function< std::shared_ptr< Node >(JSON)> constructor)
Vector2f topRight() const
Vector2f bottomLeft() const