Skip to content

Commit d5ffaf0

Browse files
committed
🔧 0.4.3
1 parent e8fcf5a commit d5ffaf0

File tree

5 files changed

+55
-10
lines changed

5 files changed

+55
-10
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "construct",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "WebGL framework using markup for declarative 3D",
55
"keywords": [
66
"construct", "webgl", "markup", "declarative", "3d", "web-components"

build.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,12 @@ function minify(srcPath, distPath) {
102102
ast = pro.ast_squeeze(ast);
103103
*/
104104

105-
var min = uglify.minify(srcPath, { compressor: {
106-
comments : /@name|@author|@cc_on|@url|@license/
107-
} });
105+
var min = uglify.minify(srcPath, {
106+
mangle: true,
107+
output: {
108+
comments : /@name|@author|@cc_on|@url|@license/
109+
}
110+
});
108111

109112
// disable gzip
110113
return fs.writeFileSync(distPath, min.code, FILE_ENCODING);

build/construct-min.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/construct.js

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @name construct
33
* WebGL framework using markup for declarative 3Ds
44
*
5-
* Version: 0.4.2 (Fri, 15 Apr 2016 08:02:50 GMT)
5+
* Version: 0.4.3 (Sun, 17 Apr 2016 08:31:32 GMT)
66
* Source: http://github.com/makesites/construct
77
*
88
* @author makesites
@@ -123,8 +123,11 @@ construct.init = function(){
123123
// #10 resolving promises with construct options as an argument
124124
construct.promise.resolve( construct.options );
125125

126+
// stop now if not initializing router
127+
if( !config.init.router ) return;
128+
126129
// initialize APP
127-
if( construct.options.require ){
130+
if( config.require ){
128131
// async init
129132
new APP({ require : true }, function( Controller ){
130133
var app = new Controller();
@@ -219,7 +222,9 @@ construct.config = function( custom ){
219222
};
220223

221224
var config = {
222-
225+
init: {
226+
router: false
227+
},
223228
/* dependency loader */
224229
require: {
225230
deps: []
@@ -519,7 +524,7 @@ construct.promise.add(function(){
519524
// automatic startup
520525
// - save Three.js instance
521526
this.$3d = $3d;
522-
this.$3d.clock = new THREE.Clock(), // one clock for all $3d?
527+
this.$3d.clock = new THREE.Clock(); // one clock for all $3d?
523528

524529
// now start the rendering
525530
this.render();
@@ -594,6 +599,10 @@ construct.promise.add(function(){
594599
rendered: false
595600
},
596601

602+
events: {
603+
//"css-filter": "_customFilter"
604+
},
605+
597606
// extend existing params is available....
598607
params: ( View.prototype.params ) ? View.prototype.params.set( params.toJSON() ) : params,
599608

@@ -613,6 +622,8 @@ construct.promise.add(function(){
613622
// bind class methods
614623
_.bindAll(this, '_updateLOD');
615624

625+
this._setupEvents(); // events object isn't working...
626+
616627
var self = this;
617628
// HACK!!! wait till the parent arrives...
618629
setTimeout(function(){
@@ -736,10 +747,27 @@ construct.promise.add(function(){
736747
return View.prototype.remove.call(this);
737748
},
738749

750+
// Placeholders
751+
customFilter: function(){
752+
753+
},
754+
739755
// Internal
740756
// - validate is required in backbone models
741757
_validate: function(){
742758
return true;
759+
},
760+
761+
// setup events
762+
_setupEvents: function(){
763+
// events
764+
$(this.el).on('css-filter',_.bind(this._customFilter, this) );
765+
//this.el.addEventListener('css-filter', function(){ console.log("dodododod"); }, false);
766+
},
767+
768+
_customFilter: function(){
769+
// user actions
770+
this.customFilter();
743771
}
744772

745773
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name" : "construct",
3-
"version" : "0.4.2",
3+
"version" : "0.4.3",
44
"author" : "makesites",
55
"description" : "WebGL framework using markup for declarative 3Ds",
66
"homepage" : "https://github.com/makesites/construct",

0 commit comments

Comments
 (0)