use of com.gempukku.libgdx.graph.util.ArrayValuePerVertex in project gdx-graph by MarcinSc.
the class SpriteShaderTestScene method initializeScene.
@Override
public void initializeScene() {
camera = new OrthographicCamera();
pipelineRenderer = loadPipelineRenderer();
ArrayValuePerVertex<Vector2> uvPerVertex = new ArrayValuePerVertex<>(new Vector2(0, 0), new Vector2(1, 0), new Vector2(0, 1), new Vector2(1, 1));
GraphModels graphModels = pipelineRenderer.getPluginData(GraphModels.class);
spriteBatch = new MultiPageSpriteBatchModel(true, 2, graphModels, "Test");
MapWritablePropertyContainer sprite1 = new MapWritablePropertyContainer();
sprite1.setValue("Position", new Vector3(0, 0, -10));
sprite1.setValue("UV", uvPerVertex);
ArrayValuePerVertex<Vector2> colorPerVertex = new ArrayValuePerVertex<>(new Vector2(0, 1), new Vector2(1, 0), new Vector2(0, 0), new Vector2(1, 1));
sprite1.setValue("Vertex Color", colorPerVertex);
MapWritablePropertyContainer sprite2 = new MapWritablePropertyContainer();
sprite2.setValue("Position", new Vector3(150, 0, -10));
sprite2.setValue("UV", uvPerVertex);
spriteBatch.addSprite(new DefaultRenderableSprite(sprite1));
spriteBatch.addSprite(new DefaultRenderableSprite(sprite2));
graphModels.setGlobalProperty("Test", "Color", new Vector2(1f, 1f));
}
Aggregations