Babylon.js 第十六章 灯光(JS版)
发布时间
阅读量:
阅读量
一、点亮灯光
let light1=new BABYLON.PointLight('light',new BABYLON.Vector3(10,10,10),scene)
AI写代码javascript
运行
二、定向光
var light2 = new BABYLON.DirectionalLight("DirectionalLight",
new BABYLON.Vector3(1, -1, 0), scene);
AI写代码javascript
运行
三、聚光灯
聚光灯的特性由多个参数共同决定,包括其位置、照射方向、开口角度以及衰减指数。这些参数共同作用,确定了从指定位置沿特定方向延伸的光线锥体。以弧度为单位的角度值用于描述该锥形光束所覆盖的照明区域范围,而衰减指数则决定了光线强度随着传播距离增加而减弱的速率。
var light3 = new BABYLON.SpotLight("spotLight",
new BABYLON.Vector3(0, 30, -10),
new BABYLON.Vector3(0, -1, 0), Math.PI /
全部评论 (0)
还没有任何评论哟~
