• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 7 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0024 秒)

1. 2D物理-桥 [ 100%]

...ddChild(ground); let groundBody = new Laya.RigidBody(); groundBody.type = "static"; ground.addComponentIntance(groundBody); let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider.points = "50,600,1050,600"; let point1 = new Laya.Sprite(); Laya.Laya.stage.addChild(point1); point1....

来源: Laya2.0_示例 发布时间: 20241119

2. 2D物理-碰撞过滤器 [ 95%]

...laya.webgl.WebGL; public class Physics_Physics_CollisionFiltering { public static const k_smallGroup = 1; public static const k_middleGroup = 0; public static const k_largeGroup = -1; public static const k_triangleCategory = 0x2; public static const k_boxCategory = 0x4; public static const k_circleC...

来源: Laya2.0_示例 发布时间: 20241119

3. UI-List [ 92%]

...Box = Laya.Box; import Image = Laya.Image; class Item extends Box { public static WID: number = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Image(); this.addChild(this.img); } public setImg(src: string): void { this.i...

来源: Laya2.0_示例 发布时间: 20241119

4. 2D物理-仿生机器人 [ 86%]

....addChild(ground); let rigidbody = new Laya.RigidBody(); rigidbody.type = "static"; ground.addComponentIntance(rigidbody); let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider.points = "50,200,50,570,1050,570,1050,200"; for (let i = 1; i 0) { legCollider1.points = p1.concat(p2)...

来源: Laya2.0_示例 发布时间: 20241119

5. 鼠标交互-自定义事件 [ 77%]

...; import WebGL = Laya.WebGL; export class Interaction_CustomEvent { public static ROTATE: string = "rotate"; private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.a...

来源: Laya2.0_示例 发布时间: 20241119

6. 2D物理-碰撞事件与传感器 [ 76%]

...ddChild(ground); let groundBody = new Laya.RigidBody(); groundBody.type = "static"; ground.addComponentIntance(groundBody); let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider.points = "50,400,50,600,1050,600,1050,400"; let sensorCollider = this.sensorCollider = ground.addComp...

来源: Laya2.0_示例 发布时间: 20241119

7. 性能测试-卡通人物2 [ 69%]

....text = Stat.FPS.toString(); } } } class Character extends Sprite { public static WIDTH: number = 110; public static HEIGHT: number = 110; private speed: number = 5; private bloodBar: Sprite; private animation: Animation; private nameLabel: Text; constructor(images: Array) { super(); this.createAnim...

来源: Laya2.0_示例 发布时间: 20241119