大约有 16 项符合查询结果, 库内数据总量为 30,935 项。 (搜索耗时: 0.0040 秒)
...l(); boxRender.sharedMaterial = boxMaterial; // 添加到场景 this.scene.addChild(box); // 设置位置 box.transform.position = new Laya.Vector3(2.0, 0.25, 0.6); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); /* 球体 */ let sphere = new Laya.Sprite3D; let sphereMesh = sphere.ad...
来源: Laya3.0_文档 发布时间: 20250103
...Laya.stage.height - tree.height) / 2; tree.bgColor = "#d25454"; this.owner.addChild(tree); } } class Item extends Laya.Box { constructor() { super(); this.right = 0; this.left = 0; var selectBox: Laya.Clip = new Laya.Clip("resources/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox";//设...
来源: Laya3.0_文档 发布时间: 20240910
... list.renderHandler = new Laya.Handler(this, this.updateItem); this.owner.addChild(list); // 设置数据源为对应图片的路径 var data: any[] = []; for (var i: number = 0; i < 10; ++i) { data.push("resources/res/ui/listskins/1.jpg"); data.push("resources/res/ui/listskins/2.jpg"); data.push...
来源: Laya3.0_文档 发布时间: 20240910
...> { this.createBtn(); this.createvbox(); // 添加VBox组件 this.owner.addChild(this.vbox); }); } // 创建Button组件 private createBtn(): void { this.btn1 = new Laya.Button(this.skins); this.btn2 = new Laya.Button(this.skins); this.btn3 = new Laya.Button(this.skins); } // 创建VBox组件 pri...
来源: Laya3.0_文档 发布时间: 20240910
...> { this.createBtn(); this.createHbox(); // 添加HBox组件 this.owner.addChild(this.hbox); }); } // 创建Button组件 private createBtn(): void { this.btn1 = new Laya.Button(this.skins); this.btn2 = new Laya.Button(this.skins); this.btn3 = new Laya.Button(this.skins); } // 创建HBox组件 pri...
来源: Laya3.0_文档 发布时间: 20240910
...Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-6) 3.2 3D预制体 3D预制体的使用过程同2D预制体一样,在这里我们就不介绍如何制作预制体了,通过下面的示例来看看3D预...
来源: Laya3.0_文档 发布时间: 20241014
...Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-6) 3.2 3D预制体 3D预制体的使用过程同2D预制体一样,在这里我们就不介绍如何制作预制体了,通过下面的示例来看看3D预...
来源: Laya3.0_文档 发布时间: 20250310
...入字体"; label.fontSize = 30; label.color = '#FFFFFF'; this.Main.box2D.addChild(label); label.pos(30, 50) }); Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine更新时间: 2025-01-03 16:42:22 img{cursor:pointer}
来源: Laya3.0_文档 发布时间: 20250103
...aterial; //把圆锥形3D节点对象添加到3D场景节点下 this.scene.addChild(cone); //设置随机位置 this.tmpVector.setValue(Math.random() * 6 - 2, 6, Math.random() * 6 - 2); cone.transform.position = this.tmpVector; //为圆锥形3D节点对象创建刚体碰撞器 let _rigidBody = <L...
来源: Laya3.0_文档 发布时间: 20250310
...(); 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; pointLight.transform.position = new Laya.Vector3(0.0, 1, 0.0); 三、DirectionLigh...
来源: Laya3.0_文档 发布时间: 20250103