repo: janusweb action: commit revision: path_from: revision_from: 40ab6dc195f29ae6b0831d8e20998c06f8bf5b5d: path_to: revision_to:
commit 40ab6dc195f29ae6b0831d8e20998c06f8bf5b5d Author: James BaicoianuDate: Tue Aug 8 17:46:52 2017 -0700 Fixed devicePixelRatio for websurfaces diff --git a/scripts/websurface.js b/scripts/websurface.js
--- a/scripts/websurface.js
+++ b/scripts/websurface.js
@@ -4,6 +4,7 @@ elation.require(['engine.things.generic'], function() {
elation.engine.things.januswebsurface.extendclass.postinit.call(this);
this.defineProperties({
websurface_id: { type: 'string' },
+ image_id: { type: 'string' },
color: { type: 'color', default: 0xffffff },
hovercolor: { type: 'color', default: 0x009900 },
activecolor: { type: 'color', default: 0x00ff00 }
@@ -89,7 +90,7 @@ elation.require(['engine.things.generic'], function() {
iframe.style.height = height + 'px';
var obj = new THREE.CSS3DObject(div);
- obj.scale.set(1/width, 1/height, 1);
+ obj.scale.set(1/width / devicePixelRatio, 1/height / devicePixelRatio, 1);
this.iframe = iframe;
this.domobj = obj;
-----END OF PAGE-----