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

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

1. 材质-物理基础渲染材质 [ 100%]

...nvinfoobj = Laya.loader.getRes(envinfo); var camera = new Laya.Camera(0, 0.1, 1000); if (envinfoobj.ev != undefined) camera._shaderValues.setValue(Laya.BaseCamera.HDREXPOSURE, Math.pow(2, envinfoobj.ev)); else camera._shaderValues.setValue(Laya.BaseCamera.HDREXPOSURE, Math.pow(2, 0.0)); scene.addChi...

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

2. 输入设备-指南针 [ 98%]

...var directionIndicator; var firstTime = true; (function() { Laya.init(700, 1024, WebGL); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.loader.load(compassImgPath, Handler.create(this, init)); })(); function init() { /...

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

3. 输入设备-贪吃蛇(重力感应) [ 97%]

...otype.getPinPosition = function() { var radian = this.rotation * Math.PI / 180; var tx = this.x + Math.cos(radian) * this.width; var ty = this.y + Math.sin(radian) * this.width; return new Point(tx, ty); } this.size(width, height); this.init(); } Laya.class(Segment, "Segment", Sprite); var seg; var ...

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

4. 滤镜-颜色滤镜 [ 97%]

...项目(排列成 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_示例 发布时间: 20241117

5. UI-Tree [ 96%]

...类对应的json对象: // {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12", "height": "24", "name": "selectBox", "skin": "ui/clip_selectBox.png", "right": "0", "clipY": "2"}}, {"type": "Clip", "props": {"y": "4", "x": "14", "name": "folder", "clipX": "1", "skin": "ui/clip_t...

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

6. 其他引擎的Demo-Example_04 [ 95%]

...ser = Laya.Browser; var WebGL = Laya.WebGL; var starCount = 2500; var sx = 1.0 + (Math.random() / 20); var sy = 1.0 + (Math.random() / 20); var stars = []; var w = Browser.width; var h = Browser.height; var slideX = w / 2; var slideY = h / 2; var speedInfo; (function() { Laya.init(w, h, WebGL); crea...

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

7. 缓动-简单的Tween [ 92%]

...inalX = 200; var characterA = createCharacter("../../res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; var characterB = createCharacter("../../res/cartoonCharacters/2.png"); characterB.pivot(34, 50); characterB.y = 250; Laya.stage.graphics.drawLine(terminalX, 0, terminal...

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

8. 缓动-时间线 [ 92%]

...nkey2.png"); Laya.stage.addChild(target); target.pivot(55, 72); target.pos(100,100); } function createTimerLine() { timeLine.addLabel("turnRight",0).to(target,{x:450, y:100, scaleX:0.5, scaleY:0.5},2000,null,0) .addLabel("turnDown",0).to(target,{x:450, y:300, scaleX:0.2, scaleY:1, alpha:1},2000,null...

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

9. 性能测试-虫子(慎入) [ 92%]

... = Laya.WebGL; var texturePath = "../../res/tinyMaggot.png"; var padding = 100; var maggotAmount = 5000; var tick = 0; var maggots = []; var wrapBounds; var maggotTexture; (function() { Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.bgColor = "#000000"; Stat.show(); wrapBounds = new Rec...

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

10. 计时器-间隔循环 [ 92%]

... return t; } function animateTimeBased() { rotateTimeBasedText.rotation += 1; } function animateFrameRateBased() { rotateFrameRateBasedText.rotation += 1; } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class T...

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