Skip to content

Commit

Permalink
Merge branch 'gh-pages'
Browse files Browse the repository at this point in the history
  • Loading branch information
tparisi committed Jan 26, 2015
2 parents 760591f + 17bb75d commit 4329f8f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
7 changes: 6 additions & 1 deletion build/glam-nodeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -13551,7 +13551,12 @@ glam.DOMInput.add = function(docelt, obj) {
}
);
for (var propName in event) {
domEvent[propName] = event[propName];
if (domEvent[propName] === undefined) {
domEvent[propName] = event[propName];
}
else {
; // console.log("Skipping prop", propName);
}
}
var res = docelt.dispatchEvent(domEvent);

Expand Down
2 changes: 1 addition & 1 deletion build/glam-nodeps.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion build/glam.js
Original file line number Diff line number Diff line change
Expand Up @@ -59685,7 +59685,12 @@ glam.DOMInput.add = function(docelt, obj) {
}
);
for (var propName in event) {
domEvent[propName] = event[propName];
if (domEvent[propName] === undefined) {
domEvent[propName] = event[propName];
}
else {
; // console.log("Skipping prop", propName);
}
}
var res = docelt.dispatchEvent(domEvent);

Expand Down
2 changes: 1 addition & 1 deletion build/glam.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -11483,7 +11483,7 @@ this.onGamepadAxesChanged=function(a){a=a.changedAxes;var b,c=a.length;for(b=0;b
this.mouseLook)&&this.lookSpeed){a=this.lastMouseX-this.mouseX;Math.abs(a);a=900*(a/this.viewHalfX);this.lon+=a*this.lookSpeed;a=this.lastMouseY-this.mouseY;Math.abs(a);a=900*(a/this.viewHalfY);this.lat+=a*this.lookSpeed;this.theta=THREE.Math.degToRad(this.lon);this.lat=Math.max(-85,Math.min(85,this.lat));this.phi=THREE.Math.degToRad(this.lat);a=this.target;var b=this.object.position;a.x=b.x-Math.sin(this.theta);a.y=b.y+Math.sin(this.phi);a.z=b.z-Math.cos(this.theta);this.object.lookAt(a);this.lastMouseX=
this.mouseX;this.lastMouseY=this.mouseY}if(this.turnRight||this.turnLeft||this.tiltUp||this.tiltDown)a=0,this.turnRight?a=1:this.turnLeft&&(a=-1),this.lon+=a*this.turnSpeed,a=0,this.tiltUp?a=1:this.tiltDown&&(a=-1),this.lat+=a*this.tiltSpeed,this.theta=THREE.Math.degToRad(this.lon),this.lat=Math.max(-85,Math.min(85,this.lat)),this.phi=THREE.Math.degToRad(this.lat),a=this.target,b=this.object.position,this.turnSpeed&&(a.x=b.x-Math.sin(this.theta)),this.tiltSpeed&&(a.y=b.y+Math.sin(this.phi),a.z=b.z-
Math.cos(this.theta)),(this.turnSpeed||this.tiltSpeed)&&this.object.lookAt(a)}};this.domElement.addEventListener("contextmenu",function(a){a.preventDefault()},!1);this.domElement.addEventListener("mousemove",c(this,this.onMouseMove),!0);this.domElement.addEventListener("mousedown",c(this,this.onMouseDown),!1);this.domElement.addEventListener("mouseup",c(this,this.onMouseUp),!1);this.domElement.addEventListener("touchstart",c(this,this.onTouchStart),!1);this.domElement.addEventListener("touchmove",
c(this,this.onTouchMove),!1);this.domElement.addEventListener("touchend",c(this,this.onTouchEnd),!1);this.domElement.addEventListener("keydown",c(this,this.onKeyDown),!1);this.domElement.addEventListener("keyup",c(this,this.onKeyUp),!1);this.domElement.addEventListener("resize",c(this,this.handleResize),!1);var d=glam.Gamepad.instance;d&&(d.addEventListener("buttonsChanged",c(this,this.onGamepadButtonsChanged),!1),d.addEventListener("axesChanged",c(this,this.onGamepadAxesChanged),!1));this.handleResize()};glam.DOMInput={};glam.DOMInput.add=function(a,b){function c(b,c){b.addEventListener(c,function(b){var d=new CustomEvent(c,{detail:{},bubbles:!0,cancelable:!0}),e;for(e in b)d[e]=b[e];a.dispatchEvent(d)})}var d=new glam.Picker,e="click mouseover mouseout mousedown mouseup mousemove".split(" "),f;for(f in e)c(d,e[f]);b.addComponent(d);d=new glam.ViewPicker;b.addComponent(d);c(d,"viewover");c(d,"viewout")};glam.DOMStyle=function(a){this.docelt=a;this._properties={};this.setPropertyHandlers=[];this.defineStandardProperties()};glam.DOMStyle.prototype={};glam.DOMStyle.prototype.addProperties=function(a){for(var b in a)this.addProperty(b,a[b])};glam.DOMStyle.prototype.addProperty=function(a,b){this.defineProperty(a,b);this._properties[a]=b};
c(this,this.onTouchMove),!1);this.domElement.addEventListener("touchend",c(this,this.onTouchEnd),!1);this.domElement.addEventListener("keydown",c(this,this.onKeyDown),!1);this.domElement.addEventListener("keyup",c(this,this.onKeyUp),!1);this.domElement.addEventListener("resize",c(this,this.handleResize),!1);var d=glam.Gamepad.instance;d&&(d.addEventListener("buttonsChanged",c(this,this.onGamepadButtonsChanged),!1),d.addEventListener("axesChanged",c(this,this.onGamepadAxesChanged),!1));this.handleResize()};glam.DOMInput={};glam.DOMInput.add=function(a,b){function c(b,c){b.addEventListener(c,function(b){var d=new CustomEvent(c,{detail:{},bubbles:!0,cancelable:!0}),e;for(e in b)void 0===d[e]&&(d[e]=b[e]);a.dispatchEvent(d)})}var d=new glam.Picker,e="click mouseover mouseout mousedown mouseup mousemove".split(" "),f;for(f in e)c(d,e[f]);b.addComponent(d);d=new glam.ViewPicker;b.addComponent(d);c(d,"viewover");c(d,"viewout")};glam.DOMStyle=function(a){this.docelt=a;this._properties={};this.setPropertyHandlers=[];this.defineStandardProperties()};glam.DOMStyle.prototype={};glam.DOMStyle.prototype.addProperties=function(a){for(var b in a)this.addProperty(b,a[b])};glam.DOMStyle.prototype.addProperty=function(a,b){this.defineProperty(a,b);this._properties[a]=b};
glam.DOMStyle.prototype.addPropertiesFromString=function(a){a=a.split(";");var b={},c,d=a.length;for(c=0;c<d;c++){var e=a[c].split(":"),f=e[0];(f=f.replace(/ /g,""))&&(b[f]=e[1])}this.addProperties(b)};glam.DOMStyle.prototype.onPropertyChanged=function(a,b){var c,d=this.setPropertyHandlers.length;for(c=0;c<d;c++){var e=this.setPropertyHandlers[c];e&&e(a,b)}};
glam.DOMStyle.prototype.defineProperty=function(a,b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,get:function(){return this._properties[a]},set:function(b){this._properties[a]=b;this.onPropertyChanged(a,b)}})};glam.DOMStyle.prototype.defineStandardProperties=function(){var a=glam.DOMStyle._standardProperties,b;for(b in a)this.defineProperty(b,a[b])};
glam.DOMStyle._standardProperties={angle:"","backface-visibility":"visible","background-type":"","bevel-size":"","bevel-thickness":"",color:"","diffuse-color":"",diffuseColor:"","specular-color":"",specularColor:"","dash-size":"",depth:"",distance:"","end-angle":"","cube-image-back":"","cube-image-bottom":"","cube-image-front":"","cube-image-left":"","cube-image-right":"","cube-image-top":"","sphere-image":"",sphereImage:"","font-bevel":"","font-depth":"","font-family":"","font-size":"","font-style":"",
Expand Down
7 changes: 6 additions & 1 deletion src/dom/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ glam.DOMInput.add = function(docelt, obj) {
}
);
for (var propName in event) {
domEvent[propName] = event[propName];
if (domEvent[propName] === undefined) {
domEvent[propName] = event[propName];
}
else {
; // console.log("Skipping prop", propName);
}
}
var res = docelt.dispatchEvent(domEvent);

Expand Down

0 comments on commit 4329f8f

Please sign in to comment.