Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuilder committed Jul 3, 2014
1 parent 192e8a1 commit d118509
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
26 changes: 13 additions & 13 deletions va3c-viewer-html5-r2.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
<link rel=stylesheet href=http://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css />
</head>
<body>
<script src=https://mrdoob.github.io/three.js/build/three.min.js ></script>
<script src=https://mrdoob.github.io/three.js/examples/js/controls/OrbitControls.js ></script>
<script src=https://mrdoob.github.io/three.js/examples/js/libs/stats.min.js ></script>
<script src=https://mrdoob.github.io/three.js/examples/js/loaders/ColladaLoader.js ></script>
<script src=va3c-viewer-v3aa.js ></script>
<script src=va3c-viewer-v3at.js ></script>
<script src=va3c-viewer-v3cc.js ></script>
<script src=va3c-viewer-v3pl.js ></script>
<script src=va3c-viewer-v3fo.js ></script>
<script src=va3c-viewer-v3bu.js ></script>
<script src=va3c-viewer-v3su.js ></script>
<script src=first-person-controls-theo.js ></script>
<script src=../../sun-position.js ></script>
<script src=assets/three.min.js ></script>
<script src=assets/OrbitControls.js ></script>
<script src=assets/stats.min.js ></script>
<script src=assets/ColladaLoader.js ></script>
<script src=assets/va3c-viewer-v3aa.js ></script>
<script src=assets/va3c-viewer-v3at.js ></script>
<script src=assets/va3c-viewer-v3cc.js ></script>
<script src=assets/va3c-viewer-v3pl.js ></script>
<script src=assets/va3c-viewer-v3fo.js ></script>
<script src=assets/va3c-viewer-v3bu.js ></script>
<script src=assets/va3c-viewer-v3su.js ></script>
<script src=assets/first-person-controls-theo.js ></script>
<script src=assets/sun-position.js ></script>
<script>
// Theo Armour ~ 2014-05-27 ~ MIT License
// every name space used below relates to a JavaScript file with the same name suffix
Expand Down
30 changes: 15 additions & 15 deletions viewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function modelscripts() {
wp_enqueue_script('firstperson-theo');
wp_enqueue_script('sun-position');
}
add_action( 'wp_enqueue_scripts', 'modelscripts' );
/*-------------------------------------------------------*/
/* Add Clientside Location from IP
/*-------------------------------------------------------*/
Expand Down Expand Up @@ -109,7 +108,7 @@ function ModelViewer( $atts ) {
if ($loc == 'ip') {
$clientloc = geoCheckIP(get_ip());
}
add_action( 'wp_enqueue_scripts', 'modelscripts' );
echo '<canvas width="'.$width.'" height="'.$height.'"></canvas>';

echo "<script>
Expand Down Expand Up @@ -175,18 +174,19 @@ function animate() {
}
add_shortcode( 'model', 'ModelViewer' );

function ModelFrame() {
/* Load as an object with iframe fallback */
echo '<!--[if !IE]>-->
<object data="'.plugins_url('va3c-viewer-html5-r2.html').'" type="text/html" style="width:'.$width.';height:'.$height.';" class="va3c" id="va3c">
<p>Sorry. This content cannot be rendered (non-IE object). Stop living in the past and upgrade to <a href="http://www.abetterbrowser.com">a better browser</a></p>
</object>
<!--<![endif]-->
<!--[if IE]>
<iframe src="'.plugins_url('va3c-viewer-html5-r2.html').'" type="text/html" style="width:'.$width.';height:'.$height.'; border: 0" class="va3c" id="va3c">
<p>Sorry. This content cannot be rendered (IE iframe). Stop living in the past and upgrade to <a href="http://www.abetterbrowser.com">a better browser</a></p>
</iframe>
<![endif]-->';
function ModelFrame( $atts ) {
extract( shortcode_atts( array(
'type' => 'object',
'width' => '100%',
'height' => '50em'
), $atts, 'va3c' ) );
$error = '<p>Sorry. This content cannot be rendered. Stop living in the past and upgrade to <a href="http://www.abetterbrowser.com">a better browser</a></p>';
/* Load as an object */
if ($type === 'object'){
echo '<object data="'.plugins_url('va3c-viewer-html5-r2.html', __FILE__).'" type="text/html" style="width:'.$width.'; height:'.$height.'" class="va3c" id="va3c">'.$error.'</object>';
}
if ($type === 'frame'){
echo '<iframe src="'.plugins_url('va3c-viewer-html5-r2.html', __FILE__).'" type="text/html" style="width:'.$width.'; height:'.$height.'; border: 0" class="va3c" id="va3c">'.$error.'</iframe>';
}
}
add_shortcode( 'va3c', 'ModelFrame' );

0 comments on commit d118509

Please sign in to comment.