Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Release v0.1.4 #152

Merged
merged 3 commits into from
Feb 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
binda (0.1.3)
binda (0.1.4)
aasm (>= 4.11, < 4.13)
ancestry (>= 2.1, < 3.1)
bourbon (= 4.3.4)
Expand Down Expand Up @@ -100,7 +100,7 @@ GEM
railties (>= 4.1.0, < 5.2)
responders
warden (~> 1.2.3)
devise-i18n (1.5.0)
devise-i18n (1.5.1)
devise (>= 3.4)
diff-lcs (1.3)
docile (1.1.5)
Expand Down
38 changes: 19 additions & 19 deletions app/assets/javascripts/binda/components/login-shader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
class Shader {
constructor() {}
constructor() {
this.uniforms = {
uTime: { type: "1f", value: 0.0 },
uCurrentTime: { type: "1f", value: Math.sin(Date.now()) + 0.5 },
uMouse: {
type: "2f",
value: [window.innerWidth, window.innerHeight]
},
uWindowSize: {
type: "2f",
value: [window.innerWidth, window.innerHeight]
}
};
}

isSet() {
if ($("#background-shader").length > 0) {
Expand All @@ -20,7 +33,7 @@ class Shader {
window.innerHeight
);

//Add the canvas to the HTML document
// //Add the canvas to the HTML document

document
.getElementById("background-shader")
Expand All @@ -32,29 +45,16 @@ class Shader {
this.renderer.view.style.position = "fixed";
this.renderer.view.style.display = "block";

let fragmentShader = document.getElementById("fragmentShader").innerHTML;

this.customShader = new PIXI.AbstractFilter(
null,
document.getElementById("fragmentShader").innerHTML,
fragmentShader,
this.uniforms
);
this.drawRectagle();
}

uniforms() {
return {
uTime: { type: "1f", value: 0.0 },
uCurrentTime: { type: "1f", value: Math.sin(Date.now()) + 0.5 },
uMouse: {
type: "2f",
value: [window.innerWidth, window.innerHeight]
},
uWindowSize: {
type: "2f",
value: [window.innerWidth, window.innerHeight]
}
};
}

// DRAW RECTANGLE
drawRectagle() {
this.rectangle = new PIXI.Graphics();
Expand Down Expand Up @@ -197,4 +197,4 @@ function hexToShaderRgb(hex) {

/* init - you can init any event */
throttle("resize", "optimizedResize");
})();
})();
35 changes: 17 additions & 18 deletions app/assets/javascripts/binda/dist/binda.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,19 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var Shader = function () {
function Shader() {
_classCallCheck(this, Shader);

this.uniforms = {
uTime: { type: "1f", value: 0.0 },
uCurrentTime: { type: "1f", value: Math.sin(Date.now()) + 0.5 },
uMouse: {
type: "2f",
value: [window.innerWidth, window.innerHeight]
},
uWindowSize: {
type: "2f",
value: [window.innerWidth, window.innerHeight]
}
};
}

_createClass(Shader, [{
Expand All @@ -875,7 +888,7 @@ var Shader = function () {
// Create 'renderer'
this.renderer = PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight);

//Add the canvas to the HTML document
// //Add the canvas to the HTML document

document.getElementById("background-shader").appendChild(this.renderer.view);

Expand All @@ -885,25 +898,11 @@ var Shader = function () {
this.renderer.view.style.position = "fixed";
this.renderer.view.style.display = "block";

this.customShader = new PIXI.AbstractFilter(null, document.getElementById("fragmentShader").innerHTML, this.uniforms);
var fragmentShader = document.getElementById("fragmentShader").innerHTML;

this.customShader = new PIXI.AbstractFilter(null, fragmentShader, this.uniforms);
this.drawRectagle();
}
}, {
key: "uniforms",
value: function uniforms() {
return {
uTime: { type: "1f", value: 0.0 },
uCurrentTime: { type: "1f", value: Math.sin(Date.now()) + 0.5 },
uMouse: {
type: "2f",
value: [window.innerWidth, window.innerHeight]
},
uWindowSize: {
type: "2f",
value: [window.innerWidth, window.innerHeight]
}
};
}

// DRAW RECTANGLE

Expand Down
6 changes: 3 additions & 3 deletions app/helpers/binda/components_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def prepare_description_for_form_hint(field_setting)
# @param field_setting [Binda::FieldSetting] The field setting object
def prepare_description_for_selections_form_hint(field_setting)
description = []
if field_setting.description.blank? && field_setting.allow_null?
description << field_setting.description
description << I18n.t("binda.null_is_not_allowed") if !field_setting.allow_null?
unless field_setting.description.blank? && field_setting.allow_null?
description << field_setting.description unless field_setting.description.blank?
description << I18n.t("binda.null_is_not_allowed") if !field_setting.allow_null?
return description.join('. ')
else
return false
Expand Down
2 changes: 1 addition & 1 deletion lib/binda/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Binda
VERSION = '0.1.3'.freeze
VERSION = '0.1.4'.freeze
end