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

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

1. UI-Dialog [ 100%]

...Laya.Image; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var DIALOG_WIDTH = 220; var DIALOG_HEIGHT = 275; var CLOSE_BTN_WIDTH = 43; var CLOSE_BTN_PADDING = 5; var assets; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE...

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

2. UI-Dialog [ 99%]

...Script三种开发语言、LayaAirIDE让项目开发更高效。let DIALOG_WIDTH = 220, DIALOG_HEIGHT = 275, CLOSE_BTN_WIDTH = 43, CLOSE_BTN_PADDING = 5, assets = ["res/ui/dialog (1).png", "res/ui/close.png"]; class UI_Dialog { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage ...

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

3. Sprite中的width,height和size(width,height)感觉没作用啊 [ 99%]

Sprite中的width,height和size(width,height)感觉没作用啊 我的图片是800*600,懒得修改图片,想在程序中直接修改图片显示大小,可是貌似显示的还是800*600。width,height,size(width,height)是我理解问题,还是我写错了呢。。。。 ...

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

4. 没有预加载的图片怎么获取width和height ? [ 99%]

没有预加载的图片怎么获取width和height ? new了一个Image,使用的没有预加载的图片,getGraphicBounds得到的width 和 height 都是 0,,怎么知道width和height? 2017-01-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...

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

5. 新手引导 挖洞 不用 cacheAs="bitmap" 希望能帮助那些和我一样有需求的码农!你好我好大家好才是真的好!请各位大佬批评指教! [ 98%]

...///////////////////////////////////////////////         var browserWidth = Laya.Browser.width;         var browserHeight = Laya.Browser.height;         var pixelRatio = Laya.Browser.pixelRatio;         console.log(browserWidth + " " + browserHeight + " " + pixelRatio)...

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

6. UI-Clip [ 97%]

...howBg() { var bg = new Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } function createTimerAnimation() { counter = new Clip(clipSkin, 10, 1); counter.autoPlay = true; counter.interval = 1000; counter.x = (Laya...

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

7. UI-Clip [ 97%]

...ya.Image; let bg = new Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } createTimerAnimation() { const Clip = Laya.Clip; this.counter = new Clip(clipSkin, 10, 1); Laya.stage.addChild(this.counter); this.counter...

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

8. Image加载完成后的图片大小重设问题 [ 96%]

...:void     {         this.bg_img.loadImage("ui/bg.jpg",0,0,Laya.stage.width,Laya.stage.height,Laya.Handler.create(this,this.onComplete));         Laya.stage.on(Laya.Event.RESIZE,this,this.onResize);     }     onComplete():void     {         this.onResize();     }     onResize(...

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

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

...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

10. 获取Image宽度的问题 [ 95%]

...创建图片(img_bg.png)添加到场景中时,在代码中获取图片的width就等于0当我提前在场景中放置好一个相同的图片资源(img_bg.png),然后再在代码中创建一个图片(img_bg.png)时,就可以获取到img_bg的width(提前放置好的和代码创建的两个...

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