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

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

261. 屏幕适配的缩放模式详解(JavaScript-2D基础篇(JS)-屏幕适配) [ 71%]

...            //设置舞台背景色         Laya.stage.bgColor  = "#ffff99";             //实例一个背景         var bg = new Image();         bg.skin = "res/img/loadingBg.jpg";         Laya.stage.addChild(bg);              ...

来源: Laya2.0_文档 发布时间: 20200307

262. laya.d3.core.light.DirectionLightCom_API3.0 [ 71%]

...ectionLightCom Index Constructors constructor Properties _extra _singleton color owner runInEditor scriptPath Accessors awaked destroyed enabled hideFlags id intensity lightWorldMatrix lightmapBakedType shadowCascadesMode shadowDepthBias shadowDistance shadowFourCascadeSplits shadowMode shadowNearPl...

来源: Laya3.0_api 发布时间: 20231115

263. 文本-自动调整文本尺寸 [ 71%]

...lignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { // 该文本自动适应尺寸 var autoSizeText = createSampleText(); autoSizeText.overflow = Text.VISIBLE; autoSizeText.y = 50; // 该文本被限制了宽度 var widthLim...

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

264. laya.d3.core.pixelline.PixelLineRenderer_API3.0 [ 71%]

...ns void addLine addLine(startPosition: Vector3, endPosition: Vector3, startColor: Color, endColor: Color): void Defined in laya/d3/core/pixelLine/PixelLineRenderer.ts:167 增加一条线。 Parameters startPosition: Vector3 初始点位置 endPosition: Vector3 结束点位置 startColor: Color 初...

来源: Laya3.0_api 发布时间: 20231115

265. 渲染性能实例问题 [ 71%]

...i<10000;i++){txt=new Text();txt.text=(Math.random()*100).toFixed(0);txt.color="#CCCCCC";txt.x=Math.random()*550;txt.y=Math.random()*400;textBox.addChild(txt);}Laya.stage.addChild(textBox); 附件 : --> 2019-05-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

来源: Laya_社区 发布时间: 20190531

266. laya.ui.UIUtils_API3.0 [ 71%]

...ils 是文本工具集。 Hierarchy UIUtils Index Methods fillArray gray toColor Methods Static fillArray fillArray(arr: any[], str: string, type?: typeof Number | typeof String): any[] Defined in laya/ui/UIUtils.ts:19 用字符串填充数组,并返回数组副本。 Parameters arr: any[] 源数...

来源: Laya3.0_api 发布时间: 20231115

267. 计时器-间隔循环 [ 71%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { var vGap = 200; rotateTimeBasedText = createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height - vGap) / 2); rotateFrameRateBasedText = createText("基于...

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

268. 缓动动画(JavaScript-LayaAir基础篇(JS)-动画基础) [ 71%]

...始化舞台 Laya.init(1334,750,Laya.WebGL); //背景颜色 Laya.stage.bgColor = "#1b2436"; //创建缓动文本 createTween(); function createTween(){ //"LayaBox"字符串总宽度 var w = 800; //文本创建的起始x位置(>>在此使用右移运算符,相当于/2 用>>效率更高) var offsetX...

来源: Laya2.0_文档 发布时间: 20210715

269. 文本-自动调整文本尺寸 [ 71%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { const Text = Laya.Text; // 该文本自动适应尺寸 var autoSizeText = this.createSampleText(); autoSizeText.overflow = Text.VISIBLE; autoSizeText.y = 50; // 该文本被限制...

来源: Laya2.0_示例 发布时间: 20251130

270. UI-Tree [ 71%]

...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", "clipY": "2"}}], "type": "Box", "props": {"name": "render", "right": "0", "left":...

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