* Implemented property animation mechanism
 * Added easing functions to Ghoul and make them usable in animation
 * Make sure that we don't leave properties around if SceneGraphNodes are deleted
 * Adding opacity settings to base renderables
This commit is contained in:
Alexander Bock
2018-03-13 10:35:10 -04:00
committed by GitHub
parent f38c26eff0
commit 737e82584a
31 changed files with 575 additions and 253 deletions

View File

@@ -111,6 +111,9 @@ RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary)
"RenderablePlane"
);
addProperty(_opacity);
registerUpdateRenderBinFromOpacity();
_size = static_cast<float>(dictionary.value<double>(SizeInfo.identifier));
if (dictionary.hasKey(BillboardInfo.identifier)) {
@@ -185,6 +188,8 @@ void RenderablePlane::deinitializeGL() {
void RenderablePlane::render(const RenderData& data, RendererTasks&) {
_shader->activate();
_shader->setUniform("opacity", _opacity);
// Model transform and view transform needs to be in double precision
const glm::dmat4 rotationTransform = _billboard ?
glm::inverse(glm::dmat4(data.camera.viewRotationMatrix())) :