Skip to content

Commit

Permalink
ember + remote iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
jifeon committed Jun 24, 2012
1 parent 3634a92 commit 798d43f
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 2 deletions.
4 changes: 3 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ module.exports = {
'house' : 'site.house',
'first_person' : 'site.first_person',
'hospital' : 'site.hospital',
'lodma' : 'site.lodma'
'lodma' : 'site.lodma',
'ember' : 'site.ember',
'remote' : 'remote.show'
}
},

Expand Down
14 changes: 14 additions & 0 deletions controllers/remote.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = Remote.inherits( autodafe.Controller );

function Remote( params ) {
this._init( params );
}


Remote.prototype.show = function(params, client){
this.send_response( 'remote', client, {
obj_name : params.model || 'ember',
width : params.width || 700,
height : params.height || 400
} );
}
3 changes: 2 additions & 1 deletion controllers/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ SiteController.prototype.house = function(){}
SiteController.prototype.lodma = function(){}
SiteController.prototype.hospital = function(){}
SiteController.prototype.first_person = function(){}
SiteController.prototype.building = function(){}
SiteController.prototype.building = function(){}
SiteController.prototype.ember = function(){}
14 changes: 14 additions & 0 deletions iframe test/ember.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>Ember</title>
</head>
<body>
Text on the page.. <br>

<iframe src="http://autodafe.ws:3000/remote?width=1100&height=700" frameborder="0" width="1100" height="700"></iframe>
<br>

after iframe
</body>
</html>
Binary file added standalone/WebPlayer/ember.unity3d
Binary file not shown.
58 changes: 58 additions & 0 deletions views/remote.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{obj_name}</title>
<script type="text/javascript"
src="http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject.js"></script>
<script type="text/javascript">
<!--
function GetUnity() {
if (typeof unityObject != "undefined") {
return unityObject.getObjectById("unityPlayer");
}
return null;
}
if (typeof unityObject != "undefined") {
unityObject.embedUnity("unityPlayer", "/WebPlayer/{obj_name}.unity3d", {width}, {height});
}
-->
</script>
<style type="text/css">
body {
background-color : white;
color : black;
}

div.missing {
margin : auto;
position : relative;
top : 50%;
width : 193px;
}

div.missing a {
height : 63px;
position : relative;
top : -31px;
}

div.missing img {
border-width : 0px;
}

div#unityPlayer {
cursor : default;
}
</style>
</head>
<body>
<div id="unityPlayer">
<div class="missing">
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now!">
<img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png"
width="193" height="63"/>
</a>
</div>
</div>
</body>
</html>

0 comments on commit 798d43f

Please sign in to comment.