Appearance
composer ?
Composer ?
Kind: global class
- Composer
- new Composer(opts)
- .enableComposer(enable)
- .enableGammaCorrect(enable)
- .enableSaoPass(enable)
- .enableOutlinePass(enable)
- .enableSsrPass(enable, radius, position)
- .setSsrEnabled(enable)
- .setSsrDistance(maxDistance)
- .setSsrThickness(thickness)
- .enableUnrealBloomPass(unrealBloomEnabled, bloomRadius, bloomStrength, bloomThreshold)
- .setBloomPassEnabled(unrealBloomEnabled)
- .setBloomPassRadius(bloomRadius)
- .setBloomPassThreshold(bloomThreshold)
- .setBloomPassStrength(bloomStrength)
- .enableSsaoPass(ssaoEnabled, ssaoRadius, ssaoMinDistance, ssaoMaxDistance)
- .setSSAOEnabled(ssaoEnabled)
- .setSSAORadius(ssaoRadius)
- .setSsaoMaxDistance(ssaoMaxDistance)
- .setSsaoMinDistance(ssaoMinDistance)
- .enableDofPass(dofEnabled, dofFocus, dofAperture, dofMaxblur)
- .setDofEnabled(dofEnabled)
- .setDofFocus(dofFocus)
- .setDofAperture(dofAperture)
- .setDofMaxblur(dofMaxblur)
- .enableSmaaPass(enable)
- .enableLUTPass(lutEnabled, lutIntensity, lutType, lutUrl)
- .setlutEnabled(lutEnabled)
- .setLutIntensity(lutIntensity)
- .setLutType(lutType)
- .enableDistortPass(enabled, intensity)
- .setDistortPassEnabled(enabled, lutEnabled)
- .seDistortPassIntensity(intensity, lutIntensity)
- .enableEdgeBlurPass(enabled, intensity, radius)
- .setEdgeBlurEnabled(enabled)
- .setEdgeBlurRadius(radius)
- .setEdgeBlurIntensity(intensity)
- .enableMsaa(msaaEnabled, samples)
- .setPostProcessing(opts)
new Composer(opts) ?
后期處理類
| Param | Type | Description |
|---|---|---|
| opts | object | 后處理參數(shù) |
| opts.ssrEnabled | boolean | 是否開啟環(huán)境反射 |
| opts.ssrDistance | number | 環(huán)境反射距離 |
| opts.ssrThickness | number | 環(huán)境反射強(qiáng)度 |
| opts.ssaoEnabled | boolean | 全局陰影 |
| opts.ssaoRadius | number | 全局投影半徑 |
| opts.ssaoMinDistance | number | 全局投影最小距離 |
| opts.ssaoMaxDistance | number | 全局投影最大距離 |
| opts.dofEnabled | boolean | 是否開啟景深模糊 |
| opts.dofFocus | number | 景深焦距 |
| opts.dofAperture | number | 景深孔徑 |
| opts.dofMaxblur | number | 景深最大模糊程度 |
| opts.unrealBloomEnabled | boolean | 是否開啟泛光 |
| opts.bloomRadius | number | 泛光半徑 |
| opts.bloomStrength | number | 泛光強(qiáng)度 |
| opts.bloomThreshold | number | 泛光線性衰減程度 |
| opts.lutEnabled | boolean | 是否開啟 |
| opts.lutIntensity | number | lut 強(qiáng)度 |
| opts.lutType | number | lut 濾鏡類型 |
| opts.lutUrl | string | lut 濾鏡素材地址 |
| opts.outlineEnabled | boolean | 是否泛光 |
| opts.gammaEnabled | boolean | 是否開啟顏色校正 |
| opts.smaaEnabled | boolean | 是否開啟 smaa 抗鋸齒 |
| opts.distortEnabled | boolean | 是否開啟色差 |
| opts.distortIntensity | number | 色差強(qiáng)度 |
| opts.fxaaEnabled | boolean | 是否開啟 fxaa 抗鋸齒 |
| opts.msaaEnabled | boolean | 是否開啟 msaa 抗鋸齒 |
| opts.samples | boolean | msaa 的重采樣次數(shù) |
composer.enableComposer(enable) ?
是否開啟后處理效果合成器
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| enable | boolean | 是否開啟 |
composer.enableGammaCorrect(enable) ?
是否開啟顏色校正
Kind: instance method of Composer
| Param | Type |
|---|---|
| enable | * |
composer.enableSaoPass(enable) ?
sao 開關(guān)
Kind: instance method of Composer
| Param | Type |
|---|---|
| enable | boolean |
composer.enableOutlinePass(enable) ?
是否開啟外輪廓高亮
Kind: instance method of Composer
| Param | Type |
|---|---|
| enable | boolean |
composer.enableSsrPass(enable, radius, position) ?
鏡面反射開關(guān)
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| enable | boolean | 是否開啟鏡面反射 |
| radius | number | 反射直徑 |
| position | Array | 反射平面位置 |
composer.setSsrEnabled(enable) ?
設(shè)置全局鏡面反射開關(guān)
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| enable | boolean | - 是否開啟 |
composer.setSsrDistance(maxDistance) ?
鏡面反射距離
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| maxDistance | number | 距離 |
composer.setSsrThickness(thickness) ?
鏡面反射強(qiáng)度
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| thickness | number | 強(qiáng)度 |
composer.enableUnrealBloomPass(unrealBloomEnabled, bloomRadius, bloomStrength, bloomThreshold) ?
開啟泛光
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| unrealBloomEnabled | boolean | 是否開啟泛光 |
| bloomRadius | number | 泛光半徑 |
| bloomStrength | number | 泛光強(qiáng)度 |
| bloomThreshold | number | 泛光線性衰減程度 |
composer.setBloomPassEnabled(unrealBloomEnabled) ?
是否開啟泛光
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| unrealBloomEnabled | boolean | 是否開啟 |
composer.setBloomPassRadius(bloomRadius) ?
設(shè)置泛光半徑
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| bloomRadius | number | 泛光半徑 |
composer.setBloomPassThreshold(bloomThreshold) ?
設(shè)置泛光線性衰減程度
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| bloomThreshold | number | 泛光線性衰減程度 |
composer.setBloomPassStrength(bloomStrength) ?
設(shè)置泛光強(qiáng)度
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| bloomStrength | number | 泛光強(qiáng)度 |
composer.enableSsaoPass(ssaoEnabled, ssaoRadius, ssaoMinDistance, ssaoMaxDistance) ?
全局投影是否開啟
Kind: instance method of Composer
| Param | Type | Default | Description |
|---|---|---|---|
| ssaoEnabled | boolean | 全局投影開關(guān) | |
| ssaoRadius | number | 12.32 | 全局投影半徑 |
| ssaoMinDistance | number | 0.001 | 全局投影最小距離 |
| ssaoMaxDistance | number | 0.3 | 全局投影最大距離 |
composer.setSSAOEnabled(ssaoEnabled) ?
設(shè)置全局陰影是否開啟
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| ssaoEnabled | boolean | 全局陰影是否開啟 |
composer.setSSAORadius(ssaoRadius) ?
設(shè)置全局投影半徑
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| ssaoRadius | number | 全局陰影半徑 |
composer.setSsaoMaxDistance(ssaoMaxDistance) ?
設(shè)置全局投影最大距離
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| ssaoMaxDistance | number | 全局投影最大距離 |
composer.setSsaoMinDistance(ssaoMinDistance) ?
設(shè)置全局投影最小距離
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| ssaoMinDistance | number | 全局投影最小距離 |
composer.enableDofPass(dofEnabled, dofFocus, dofAperture, dofMaxblur) ?
是否開啟景深模糊
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| dofEnabled | boolean | 景深開關(guān) |
| dofFocus | number | 景深焦距 |
| dofAperture | number | 景深孔徑 |
| dofMaxblur | number | 景深最大模糊程度 |
composer.setDofEnabled(dofEnabled) ?
設(shè)置是否開啟景深
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| dofEnabled | boolean | 景深開關(guān) |
composer.setDofFocus(dofFocus) ?
設(shè)置景深孔徑
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| dofFocus | number | 景深孔徑 |
composer.setDofAperture(dofAperture) ?
設(shè)置景深焦距
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| dofAperture | number | 景深焦距 |
composer.setDofMaxblur(dofMaxblur) ?
設(shè)置景深最大模糊程度
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| dofMaxblur | number | 景深最大模糊程度 |
composer.enableSmaaPass(enable) ?
是否開啟 smaa 抗鋸齒
Kind: instance method of Composer
| Param | Type |
|---|---|
| enable | boolean |
composer.enableLUTPass(lutEnabled, lutIntensity, lutType, lutUrl) ?
lut 濾鏡
Kind: instance method of Composer
| Param | Type | Default | Description |
|---|---|---|---|
| lutEnabled | boolean | 是否開啟 | |
| lutIntensity | number | 1 | lut 強(qiáng)度 |
| lutType | number | Lenox 340 | lut 濾鏡類型 |
| lutUrl | string | lut 濾鏡素材地址 |
composer.setlutEnabled(lutEnabled) ?
是否開啟 lut 濾鏡
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| lutEnabled | boolean | 是否開啟 |
composer.setLutIntensity(lutIntensity) ?
設(shè)置 lut 濾鏡
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| lutIntensity | number | lut 濾鏡強(qiáng)度 |
composer.setLutType(lutType) ?
設(shè)置 lut 濾鏡類型
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| lutType | string | lut 濾鏡類型 |
composer.enableDistortPass(enabled, intensity) ?
設(shè)置色差
Kind: instance method of Composer
| Param | Type |
|---|---|
| enabled | boolean |
| intensity | number |
composer.setDistortPassEnabled(enabled, lutEnabled) ?
是否開啟色差
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| enabled | ||
| lutEnabled | boolean | 是否開啟 |
composer.seDistortPassIntensity(intensity, lutIntensity) ?
設(shè)置色差強(qiáng)度
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| intensity | ||
| lutIntensity | number | 強(qiáng)度 |
composer.enableEdgeBlurPass(enabled, intensity, radius) ?
是否開啟邊角模糊
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| enabled | boolean | 是否開啟 |
| intensity | number | 強(qiáng)度 |
| radius | number | 半徑 |
composer.setEdgeBlurEnabled(enabled) ?
設(shè)置邊角模糊是否開啟
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| enabled | boolean | 是否開啟 |
composer.setEdgeBlurRadius(radius) ?
設(shè)置邊角模糊半徑
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| radius | number | 半徑 |
composer.setEdgeBlurIntensity(intensity) ?
設(shè)置邊角模糊強(qiáng)度
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| intensity | number | 強(qiáng)度 |
composer.enableMsaa(msaaEnabled, samples) ?
是否開啟 msaa 抗鋸齒
Kind: instance method of Composer
| Param | Default | Description |
|---|---|---|
| msaaEnabled | 是否開啟 | |
| samples | 4 | 重采樣次數(shù) |
composer.setPostProcessing(opts) ?
設(shè)置后處理參數(shù)
Kind: instance method of Composer
| Param | Type | Description |
|---|---|---|
| opts | object | 后處理參數(shù) |
| opts.ssrEnabled | boolean | 是否開啟鏡面反射 |
| opts.ssrPosition | Array | 鏡面坐標(biāo)數(shù)組 |
| opts.ssrRadius | number | 鏡面反射范圍 |
| opts.ssrDistance | number | 鏡面反射距離 |
| opts.ssrThickness | number | 鏡面反射強(qiáng)度 |
| opts.ssaoEnabled | boolean | 全局陰影 |
| opts.ssaoRadius | number | 全局投影半徑 |
| opts.ssaoMinDistance | number | 全局投影最小距離 |
| opts.ssaoMaxDistance | number | 全局投影最大距離 |
| opts.dofEnabled | boolean | 是否開啟景深模糊 |
| opts.dofFocus | number | 景深焦距 |
| opts.dofAperture | number | 景深孔徑 |
| opts.dofMaxblur | number | 景深最大模糊程度 |
| opts.unrealBloomEnabled | boolean | 是否開啟泛光 |
| opts.bloomRadius | number | 泛光半徑 |
| opts.bloomStrength | number | 泛光強(qiáng)度 |
| opts.bloomThreshold | number | 泛光線性衰減程度 |
| opts.lutEnabled | boolean | 是否開啟 |
| opts.lutIntensity | number | lut 強(qiáng)度 |
| opts.lutType | number | lut 濾鏡類型 |
| opts.lutUrl | string | lut 濾鏡素材地址 |
| opts.outlineEnabled | boolean | 是否泛光 |
| opts.gammaEnabled | boolean | 是否開啟顏色校正 |
| opts.smaaEnabled | boolean | 是否開啟 smaa 抗鋸齒 |
| opts.distortIntensity | number | 色差強(qiáng)度 |
| opts.fxaaEnabled | boolean | 是否開啟 fxaa 抗鋸齒 |
| opts.msaaEnabled | boolean | 是否開啟 msaa 抗鋸齒 |
| opts.samples | boolean | msaa 的重采樣次數(shù) |