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

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

1. 自定义shader-边缘光照shader [ 100%]

...dChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); camera.transform.translate(new Laya.Vector3(0, 0.85, 1.7)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); camera.addComponent(CameraMoveScript); var directionLight = scene.addChild(new Laya.Dir...

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

2. 自定义shader-简单shader [ 94%]

...dChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 0.5, 1.5)); camera.addComponent(CameraMoveScript); var layaMonkey = scene.addChild(new Laya.MeshSprite3D(Laya.Mesh.load("../../res/threeDimen/skinModel/LayaMonkey/Asset...

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

3. 自定义shader-地形shader [ 92%]

...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_示例 发布时间: 20251130

4. 文本-位图字体 [ 76%]

...mapFont])); } function onFontLoaded(bitmapFont) { bitmapFont.setSpaceWidth(10); Text.registerBitmapFont(fontName, bitmapFont); createText(fontName); } function createText(font) { var txt = new Text(); txt.width = 250; txt.wordWrap = true; txt.text = "Do one thing at a time, and do well."; txt.font =...

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

5. 其他引擎的Demo-Example_21 [ 72%]

...L); Laya.stage.bgColor = "#3da8bb"; createCanvases(); Laya.timer.frameLoop(1, this, animate); Laya.stage.on('mousedown', this, onMouseDown); Laya.stage.on('mousemove', this, onMouseMove); Laya.stage.on('mouseup', this, onMouseUp); })(); function createCanvases() { var graphicsCanvas = new Sprite(); ...

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

6. IDE-显示IDE创建的界面 [ 71%]

...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_示例 发布时间: 20251130

7. 物理引擎-牛顿摆 [ 70%]

...} function initWorld() { var cradle = Matter.Composites.newtonsCradle(280, 100, 5, 30, 200); Matter.World.add(engine.world, cradle); Matter.Body.translate(cradle.bodies[0], { x: -180, y: -100 }); cradle = Matter.Composites.newtonsCradle(280, 380, 7, 20, 140); Matter.World.add(engine.world, cradle); ...

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

8. 物理引擎-布 [ 68%]

...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_示例 发布时间: 20251130

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

...项目(排列成 4 x 5 矩阵)组成的数组,红色 var redMat = [ 1, 0, 0, 0, 0, //R 0, 0, 0, 0, 0, //G 0, 0, 0, 0, 0, //B 0, 0, 0, 1, 0, //A ]; //创建一个颜色滤镜对象,红色 var redFilter = new ColorFilter(redMat); // 赤化猩猩 var redApe = createApe(); redApe.filters = [redFil...

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

10. 其他引擎的Demo-Example_23 [ 61%]

...e Laya.stage.loadImage("../../res/pixi/laserBG.jpg"); Laya.stage.frameLoop(1, this, animate); })(); function animate() { if (tick > frequency) { tick = 0; // iterate through the dudes and update the positions var laser = new Sprite(); laser.loadImage("../../res/pixi/laser0" + ((type % 5) + 1) + ".pn...

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