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

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

1. 2D物理-仿生机器人 [ 100%]

...oint3.otherAnchor = anchor; // 因为有旋转,localAnchor很难计算,使用绝对位置换算 distanceJoint3.frequency = frequencyHz; distanceJoint3.damping = dampingRatio; leg1.addComponentIntance(distanceJoint3); distanceJoint3.maxLength = distanceJoint3.minLength = distanceJoint3.length || ...

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

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

... private function mouseDown(e) { this.curTarget = e.target; // 方案一,使用 MouseJoint var mouseJoint: MouseJoint = this.curTarget.addComponent(MouseJoint); Laya.timer.callLater(mouseJoint, mouseJoint.onMouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.destoryJoint); Laya.stage.on(Event.MOU...

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

3. UI-List [ 96%]

...idth - WID) / 2; list.y = (Laya.stage.height - HEI * list.repeatY) / 2; // 使用但隐藏滚动条 list.vScrollBarSkin = ""; list.selectEnable = true; list.selectHandler = new Handler(this, this.onSelect); list.renderHandler = new Handler(this, this.updateItem); // 设置数据项为对应图片的...

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

4. 输入设备-指南针 [ 93%]

... firstTime = false; alert("在当前设备中无法获取地球坐标系,使用设备坐标系,你可以继续观赏,但是提供的方位并非正确方位。"); } // 更新角度显示 degreesText.text = 360 - Math.floor(info.alpha) + "°"; compassImg.rotation = info.alpha; // 更新方位...

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

5. 骨骼动画-藤蔓 [ 90%]

...ror"); } parseComplete() { const Event = Laya.Event; // 创建模式为1,使用动画自己的缓冲区,可以启用换装(相当耗费内存) mArmature = mFactory.buildArmature(1); Laya.stage.addChild(mArmature); mArmature.pos(mStartX, mStartY); mArmature.scale(0.5, 0.5); mArmature.on(Event.STO...

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

6. 骨骼动画-橡胶人 [ 90%]

...ror"); } parseComplete() { const Event = Laya.Event; // 创建模式为1,使用动画自己的缓冲区,可以启用换装(相当耗费内存) mArmature = mFactory.buildArmature(1); Laya.stage.addChild(mArmature); mArmature.pos(mStartX, mStartY); // mArmature.scale(0.5, 0.5); mArmature.on(Event....

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

7. 骨骼动画-Spine事件 [ 90%]

...ror"); } parseComplete() { const Event = Laya.Event; // 创建模式为1,使用动画自己的缓冲区,可以启用换装(相当耗费内存) mArmature = mFactory.buildArmature(1); Laya.stage.addChild(mArmature); mArmature.pos(mStartX, mStartY); mArmature.scale(0.5, 0.5); mArmature.on(Event.LAB...

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

8. 文本-HTML文本 [ 90%]

...up() { this.createParagraph(); // 代码创建 this.showExternalHTML(); // 使用外部定义的html } createParagraph() { const HTMLDivElement = Laya.HTMLDivElement; let p = new HTMLDivElement(); Laya.stage.addChild(p); p.style.font = "Impact"; p.style.fontSize = 30; let html = "使用"; html += "H...

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

9. 滤镜-颜色滤镜 [ 89%]

...镜对象,灰图 let grayscaleFilter = new ColorFilter(grayscaleMat); // 使用 gray 方法实现灰色滤镜 // let grayscaleFilter = new ColorFilter(); // grayscaleFilter.gray(); // 灰度猩猩 let grayApe = this.createApe(); grayApe.filters = [grayscaleFilter]; let secondChild = Laya.stage.get...

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

10. 骨骼动画-换装 [ 88%]

...ror"); } parseComplete() { const Event = Laya.Event; // 创建模式为1,使用动画自己的缓冲区,可以启用换装(相当耗费内存) mArmature = mFactory.buildArmature(1); Laya.stage.addChild(mArmature); mArmature.pos(mStartX, mStartY); // mArmature.scale(0.5, 0.5); mArmature.on(Event....

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