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

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

1. 缓动-缓动函数演示 [ 100%]

...= "#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 Stage = Laya.Stage; var Text = Laya.Text; var Event = Laya.Event; var List = Lay...

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

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

.../复杂复制,可以通知某个属性,比如: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 arr = []; for ...

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

3. 输入设备-指南针 [ 92%]

...效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Text = Laya.Text; var Gyroscope = Laya.Gyroscope; var RotationInfo = Laya.RotationInfo; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var Event = Laya.Event; var compassImgPath = "../../res/in...

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

4. UI-Label [ 90%]

..._WIDTH = 4; var label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor; } Laya.stage.addChild(label); return label; } })();module laya { import Stage = ...

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

5. 屏幕适配-屏幕适配 [ 87%]

...效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Text = Laya.Text; var Event = Laya.Event; var Image = Laya.Image; var WebGL = Laya.WebGL; //所有适配模式 var modes = ["noscale", "exactfit", "showall", "noborder", "full", "fixedwidth", "fixedheight"]; //当前适配模...

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

6. UI-Tree [ 76%]

...p_tree_folder.png", "clipY": "3"}}, {"type": "Label", "props": {"y": "1", "text": "treeItem", "width": "150", "left": "33", "height": "22", "name": "label", "color": "#ffff00", "right": "0", "x": "33"}}, {"type": "Clip", "props": {"x": "0", "name": "arrow", "y": "5", "skin": "ui/clip_tree_arrow.png"...

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

7. 射线检测-放置物体 [ 55%]

... 6, 10, 10))); var planeMat = new Laya.StandardMaterial(); planeMat.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/texture/layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, 0.9, 1); plane.meshRender.material = planeMat; var meshCollider = plane.addComponent(Laya.MeshCollider); ...

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

8. 射线检测-点击行走 [ 52%]

... 6, 10, 10))); var planeMat = new Laya.StandardMaterial(); planeMat.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/texture/layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, 0.9, 1); plane.meshRender.material = planeMat; var meshCollider = plane.addComponent(Laya.MeshCollider); ...

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