大约有 40 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0042 秒)
使用3D精灵(Sprite3D)一、概述二、属性和功能2.1 节点的名字2.2 是否激活2.3 是否为静态2.4 蒙版层2.5 变换三、子父级关系四、克隆五、添加组件六、添加脚本七、各种渲染精灵简介7.1 Mesh精灵7.2 SkinnedMesh精灵7.3 Particle3D 精灵7.4 Pi...
来源: Laya3.0_文档 发布时间: 20251010
...E中使用 2.1 添加组件 在LayaAir-IDE的层级面板中,添加一个Sprite3D节点,如图2-1所示, (图2-1) 然后在节点的属性上增加一个3D UI组件,如动图2-2所示,在属性面板中,点击添加组件,选择渲染->3D UI组件。 (动图2-2) 2.2 属性...
来源: Laya3.0_文档 发布时间: 20251010
...效果 2.3 使用代码设置 //创建点光源 let pointLight = new Laya.Sprite3D(); let pointCom = pointLight.addComponent(Laya.PointLightCom); this.scene.addChild(pointLight); //点光源的颜色 pointCom.color = new Laya.Color(1.0, 0.5, 0.0, 1); //设置点光源的范围 pointCom.range = 3.0; ...
来源: Laya3.0_文档 发布时间: 20251010
...Sprite时,不能将3D节点作为其属性值。当设置为3D节点Laya.Sprite3D时,不能将2D节点作为其属性值。 4.1.1 2D节点的使用 首先,如动图4-1所示,将场景中已经添加好的2D节点Sprite拖入到@property暴露的属性入口中,这样就获取到了此节...
来源: Laya3.0_文档 发布时间: 20251010
...egClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { //...
来源: Laya3.0_文档 发布时间: 20251010
...default class CameraControll extends Laya.Script { @property( { type: Laya.Sprite3D } ) public target: Laya.Sprite3D; private camera: Laya.Camera; public distanceUp: number = 0.5;//相机与目标的竖直高度参数 public distanceAway: number = 10;//相机与目标的水平距离参数 public smo...
来源: Laya3.0_文档 发布时间: 20251010
...列表对象的基类。2D 的基础精灵 Sprite 和 3D 的基础精灵 Sprite3D 都继承自 Node。不仅如此,所有继承自 Node 的子类或孙类对象,统称为“节点”,如:Sprite 节点、Image 节点等。 只有继承自 Node 的对象,才具备添加子节点的能力。 ...
来源: Laya3.0_文档 发布时间: 20251010
...egClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { //...
来源: Laya3.0_文档 发布时间: 20251010
...lass() export class Animation extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { super(); } //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次...
来源: Laya3.0_文档 发布时间: 20251010
...der.load("sub1/Cube.lh").then((res: Laya.PrefabImpl) => { let sp3: Laya.Sprite3D = res.create() as Laya.Sprite3D; this.scene3d.addChild(sp3); }); }) Laya.loader.loadPackage("sub2", this.printProgress).then(() => { Laya.loader.load("sub2/Sphere.lh").then((res: any) => { let sp3 = res.create(...
来源: Laya3.0_文档 发布时间: 20251010