提供创建裁剪面的能力 裁剪面需要在对象的 style 下使用。
Parameters:
| Name |
Type |
Description |
param |
object
|
初始化参数列表
Properties
| Name |
Type |
Description |
planes |
Array.<ClippingPlaneResult>
|
上,下,左,右,前,后的平面法线方向以及距离 每个裁剪面的格式为{ direction: [x, y, z], height: h } |
|
Example
let clippingPlanes = [
{ direction: [0, -1, 0], height: 6 }, // top
{ direction: [0, 1, 0], height: 2 }, // bottom
{ direction: [-1, 0, 0], height: 10 }, // right
{ direction: [1, 0, 0], height: 10 }, // left
{ direction: [0, 0, -1], height: 10 }, // front
{ direction: [0, 0, 1], height: 10 } // back
];
let clippingPlanesObject = new THING.ClippingPlanes({
parent: parentObj,
planes: clippingPlanes,
});
parentObj.style.clippingPlanes = clippingPlanesObject;