Three.js作为网站的背景可能吗? [英] Three.js as background of website possible?

查看:24
本文介绍了Three.js作为网站的背景可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在考虑使用three.js 在网站上进行有趣的实验.我想使用当前的实验(我已经有了它的代码)并将其用作我网站的背景.

I've been looking at using three.js for a fun experiment on a site. I would like to use a current experiment (for which I already have the code for) and use it as a background for my site.

有人知道怎么做吗?

我在这里看到了它:http://janjorissen.be/

三个 JS API:https://github.com/mrdoob/three.js/wiki/API-参考

推荐答案

通常我会使用 iframe.这样您就不会与基页发生冲突.

usually i use iframe for that. Thus you dont have conflict with the base page.

<style>
iframe {
    z-index : -9999;
    position: absolute;
    top : 0;
    left    : 0;
    width   : 100%;
    height  : 100%;
    margin  : 0;
    padding : 0;
}
</style>
<iframe src="http://example.com/"></iframe> 

一个例子https://github.com/jeromeetienne/www.jetienne.com/blob/master/index-webgl.html#L128 为来源http://jetienne.com/index-webgl.html 活代码

an example of it https://github.com/jeromeetienne/www.jetienne.com/blob/master/index-webgl.html#L128 for the source http://jetienne.com/index-webgl.html for the living code

这篇关于Three.js作为网站的背景可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆