Skip to content

Commit

Permalink
Disable three.js code, add DOM element. Starting on GH-5
Browse files Browse the repository at this point in the history
  • Loading branch information
deathcap committed Feb 8, 2015
1 parent 168d73d commit cc9ce92
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function WebviewPlugin(game, opts)
}

WebviewPlugin.prototype.enable = function() {
/*
var THREE = this.game.THREE;
loadCSS3DRenderer(THREE); // adds CSS3DObject, CSS3DSprite, CSS3DRenderer to THREE
Expand All @@ -46,6 +47,7 @@ WebviewPlugin.prototype.enable = function() {
// create a new scene to hold CSS
var sceneCSS = new THREE.Scene();
*/

var element = document.createElement('iframe');
element.setAttribute('id', 'voxel-webview');
Expand All @@ -54,7 +56,12 @@ WebviewPlugin.prototype.enable = function() {
var elementHeight = this.elementWidth * aspectRatio;
element.style.width = this.elementWidth + 'px';
element.style.height = elementHeight + 'px';
element.style.position = 'absolute'; // display over WebGL canvas

this.element = element;
document.body.appendChild(element);

/*
var cssObject = new THREE.CSS3DObject(element);
cssObject.position = planeMesh.position;
cssObject.rotation = planeMesh.rotation;
Expand Down Expand Up @@ -88,6 +95,7 @@ WebviewPlugin.prototype.enable = function() {
renderWebGL(sceneWebGL);
};
this.originalRender = renderWebGL;
*/

var self = this;

Expand Down

0 comments on commit cc9ce92

Please sign in to comment.