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

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

1. 射线检测-碰撞器混合 [ 100%]

...yaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); this._tempUnitX1 = new Laya.Vector3(0, 0, -0.1); this._tempUnitX2 = new Laya.Vector3(0, 0, 0.1); this._tempUnitX3 = new Laya.Vector3(-0.1, 0, 0); this._tempUnitX4 = new Laya.Vector3(0.1, 0, 0); this.debug = true; Laya.stage.scaleMode = Laya...

来源: Laya_示例 发布时间: 20240930

2. IDE-显示IDE创建的界面 [ 86%]

...ction onBtnClick() { //手动控制组件属性 this.radio.selectedIndex = 1; this.clip.index = 8; this.tab.selectedIndex = 2; this.combobox.selectedIndex = 0; this.check.selected = true; } function onBtn2Click() { //通过赋值可以简单快速修改组件属性 //赋值有两种方式: //简...

来源: Laya_示例 发布时间: 20240930

3. 音频-播放演示 [ 84%]

...aya.stage.bgColor = "#232628"; setup(); })(); function setup() { var gap = 10; //创建一个Sprite充当音效播放按钮 var soundButton = createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + gap) / 2; soundButton.y = (Laya.stage.height - soundButton.height) /...

来源: Laya_示例 发布时间: 20240930

4. 物理引擎-布 [ 83%]

...oup = Matter.Body.nextGroup(true); var particleOptions = { friction: 0.00001, collisionFilter: { group: group }, render: { visible: false } }; var cloth = Matter.Composites.softBody(200, 200, 20, 12, 5, 5, false, 8, particleOptions); for (var i = 0; i < 20; i++) { cloth.bodies[i].isStatic = true; } ...

来源: Laya_示例 发布时间: 20240930

5. 混合模式-Lighter [ 79%]

...eatePhoenixes(); // 动态背景渲染 evalBgColor(); Laya.timer.frameLoop(1, this, renderBg); } function createPhoenixes() { var scaleFactor = Math.min( Laya.stage.width / (phoenixWidth * 2), Laya.stage.height / phoenixHeight); // 加了混合模式的凤凰 var blendedPhoenix = createAnimation(); ...

来源: Laya_示例 发布时间: 20240930

6. 物理引擎-Slingshot [ 61%]

... Matter.MouseConstraint.create(engine, { constraint: { angularStiffness: 0.1, stiffness: 2 }, element: Render.canvas }); Matter.World.add(engine.world, mouseConstraint); render.mouse = mouseConstraint.mouse; } function initWorld() { var ground = Matter.Bodies.rectangle(395, 600, 815, 50, { isStatic:...

来源: Laya_示例 发布时间: 20240930

7. 自定义shader-地形shader [ 41%]

...ne/terrain/terrain.ls")); var camera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); camera.transform.rotate(new Laya.Vector3(-38, 180, 0), false, false); camera.transform.translate(new Laya.Vector3(-5, 20, -30), false); camera.addComponent(CameraMoveScript); scene.once(Laya.Event.HIERARCHY_LOADED,...

来源: Laya_示例 发布时间: 20240930