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

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

1. 其他引擎的Demo-Example_21 [ 100%]

...ite = Laya.Sprite; var Browser = Laya.Browser; var WebGL = Laya.WebGL; var colors = ["#5D0776", "#EC8A49", "#AF3666", "#F6C84C", "#4C779A"]; var colorCount = 0; var isDown = false; var path = []; var color = colors[0]; var liveGraphics; var canvasGraphics; (function() { Laya.init(Browser.width, Brow...

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

2. 区块地图-等角地图 [ 96%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createMap(); Laya.stage.on("click", this, onStageClick); })(); function createMap() { tiledMap = new TiledMap(); tiledMap.createMap("../../res/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, L...

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

3. 射线检测-射线检测 [ 95%]

... 100)); camera.transform.translate(new Laya.Vector3(0, 1, 3)); camera.clearColor = null; Laya.loader.create(["../../res/threeDimen/skinModel/NvWu/NvWu-shenminvwu.lm", "../../res/threeDimen/skinModel/CunMinNan/CunMinNan-cunminnan.lm", "../../res/threeDimen/skinModel/XiaoFeiLong/XiaoFeiLong-xiaofeilon...

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

4. 自定义shader-地形shader [ 95%]

...fuseScale4(new Laya.Vector2(13.96364, 13.96364)); customMaterial.setAmbientColor(new Laya.Vector3(1, 1, 1)); customMaterial.setDiffuseColor(new Laya.Vector3(1, 1, 1)); customMaterial.setSpecularColor(new Laya.Vector4(1, 1, 1, 8)); customMaterial.setLightMapScaleOffset(new Laya.Vector4(0.8056641, 0.8...

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

5. UI-Label [ 93%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { createLabel("#FFFFFF", null).pos(30, 50); createLabel("#00FFFF", null).pos(290, 50); createLabel("#FFFF00", "#FFFFFF").pos(30, 100); createLabel("#000000", "#FFFFFF").pos(2...

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

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

...的value为2 //复杂复制,可以通知某个属性,比如:label:{color:"#ff0000",text:"Hello LayaAir"} this.box.dataSource = {slider: 50, scroll: 80, progress: 0.2, input: "This is a input", label: {color: "#ff0000", text: "Hello LayaAir"}}; //list赋值,先获得一个数据源数组 var ...

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

7. 混合模式-Lighter [ 88%]

...辨率是550 * 400 var phoenixWidth = 550; var phoenixHeight = 400; var bgColorTweener = new Tween(); var gradientInterval = 2000; var bgColorChannels = { r: 99, g: 0, b: 0xFF }; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(phoenixWidth * 2, phoenixHeight, WebGL); Laya.stage.ali...

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

8. 文本-字符限制 [ 86%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createTexts(); })(); function createTexts() { createLabel("只允许输入数字:").pos(50, 20); var input = createInput(); input.pos(50, 50); input.restrict = "0-9"; createLabel("只允许输入字母:...

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

9. 缓动-缓动函数演示 [ 84%]

...this); this.size(100, 20); label = new Label(); label.fontSize = 12; label.color = "#FFFFFF"; this.addChild(label); this.setLabel = function(value) { label.text = value; } } Laya.class(ListItemRender, "ListItemRender", Box); // 主要逻辑代码 var Input = Laya.Input; var Sprite = Laya.Sprite; var...

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

10. 屏幕适配-自动横屏 [ 79%]

...= "showall"; Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; showText(); })(); function showText() { var text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1...

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