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

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

91. 请问graphics.drawTexture(texture)中如何增加一个matrix,只显示图中的一个圆形区域 [ 70%]

...ild(miniMap1); } } miniMap.src=url;     function circle_image(img, oldImgWidth, oldImgHeight) { var width, height, canvas, contex, circle; if (img.width > img.height) { width = img.height; height = img.height; } else { width = img.width; height = img.width; } canvas = document.createElement('ca...

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

92. 一个动画我想设置它的大小该怎么取设置啊 [ 70%]

...ounds(rec)     var bounds = ani.getGraphicBounds(); ani.scale(100/bounds.width,100/bounds.height)   我想把动画宽高都设置成100 100 可是这2种方法都不能实现   该怎么去实现 2017-06-29 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请...

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

93. UI-Tree [ 70%]

..."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", "clipY": "2"}}], "...

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

94. UI-Tree [ 70%]

...emRender = Item; tree.xml = xml; tree.size(300, 300); tree.x = (Laya.stage.width - tree.width) / 2; tree.y = (Laya.stage.height - tree.height) / 2; Laya.stage.addChild(tree); } } const Box = Laya.Box, Clip = Laya.Clip, Label = Laya.Label; // 此类对应的json对象: // {"child": [{"type": "Clip"...

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

95. 建议:Laya.init(width, height)设定后可以动态调整 [ 70%]

建议:Laya.init(width, height)设定后可以动态调整 如果我想发布成pc版本的h5,我想实现浏览器改变大小时,ui自动缩放,我们技术框架上已经支持了,但是好像laya只会显示初始化时的大小,拉大后的区域没有渲染出来,我猜想是ini...

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

96. 文本-滚动文本 [ 70%]

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createText(); })(); function cre...

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

97. native打包的安卓包,韩文字体显示异常,IOS上是正常的(已解决) [ 70%]

...的问题,在安卓、韩文字体的情况下,这个方法返回的t.width的值一直为0,导致在计算韩文的文本渲染宽度时,韩文字符的宽度一直为0,因此所有的韩文就都叠在一起了,解决方法是在laya.webgl.js文件中的WebGLCharImage的构造函数中...

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

98. laya.resource.HTMLCanvas_API3.0 [ 70%]

...ext cpuMemory destroyed gpuMemory height id obsolute referenceCount source width cpuMemory gpuMemory Methods _addReference _clearReference _removeReference _setCPUMemory _setCreateURL _setGPUMemory clear destroy event getContext getMemSize getTexture hasListener isCreateFromURL off offAll offAllCall...

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

99. HTML文本 · LayaAir3.0文档 · LAYABOX [ 70%]

...中设置字体、颜色不同3.3 获取html文本的实际宽高(contextWidth、contextHeight)3.4 设置文本的水平居中对齐(align需要和width配合使用)3.5 实现超链接3.6 实现html页面跳转3.7 为HtmlDivElement设置行间距,leading属性,注意,必须设置valign=’...

来源: Laya3.0_文档 发布时间: 20230303

100. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 70%]

...0, 0, 0, 0, Handler.create(this, function() {     console.log(sp.width, sp.height); })); Laya.stage.addChild(sp); ``` ​ loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 3. **直接调用size设置:** ```javascript Laya.loader.load("res/apes/monkey2.png"...

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