You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>雾-指数([name]</h1>
<p class="desc">该类所包含的参数定义了指数雾,它可以在相机附近提供清晰的视野,且距离相机越远,雾的浓度随着指数增长越快。</p>
<h2>代码示例</h2>
<code>
const scene = new THREE.Scene();
scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 );
</code>
<h2>构造器</h2>
<h3>[name]( [param:Integer color], [param:Float density] )</h3>
<p>颜色参数传入[page:Color]构造函数中来设置颜色属性。颜色可以是一个十六进制的整型数或者是CSS风格的字符串。</p>
<h2>属性</h2>
<h3>[property:Boolean isFogExp2]</h3>
<p>
只读属性,用于检查给定对象是否为[name]类型。
</p>
<h3>[property:String name]</h3>
<p>对象的名称,可选、不必唯一。默认值是一个空字符串。</p>
<h3>[property:Color color]</h3>
<p>雾的颜色。比如说,如果将其设置为黑色,远处的物体将被渲染成黑色。</p>
<h3>[property:Float density]</h3>
<p>定义雾的密度将会增长多块。</p>
<p>默认值是0.00025.</p>
<h2>方法</h2>
<h3>[method:FogExp2 clone]()</h3>
<p>返回一个具有和当前雾参数相同的新的FogExp2实例。</p>
<h3>[method:Object toJSON]()</h3>
<p>以JSON格式返回FogExp2的数据。</p>
<h2>源代码</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>