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

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

71. 文本-多行输入 [ 83%]

...ya.Stat; // 不支持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"; this.createInput(); } createInpu...

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

72. 缓动-缓动函数演示 [ 82%]

...); } function createDurationCrontroller() { var durationInput = createInputWidthLabel("Duration:", '2000', 400, 10); durationInput.on(Event.INPUT, this, function() { duration = parseInt(durationInput.text); }); } function createInputWidthLabel(label, prompt, x, y) { var text = new Text(); text.text ...

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

73. 弹窗视图组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 82%]

...场景类继承而来。 拖动区域 dragArea 拖动区域(格式:x,y,width,height),默认值为"0,0,0,0" 模式窗口 isModal 是否是模式窗口,默认为false。为模式窗口时,点击弹窗空白处,可自动关闭该弹窗 显示弹窗效果 isShowEffect 是否显示弹出效...

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

74. 微信小游戏想使用截图功能是使用canvasToTempFilePath()吗 [ 82%]

...window */ export class ImageData { public data: Uint8ClampedArray; public width: number; public height: number; public constructor(width: number, height: number) { this.width = width; this.height = height; this.data = new Uint8ClampedArray(width * height * 4); } } window.ImageData = ImageData; // ...

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

75. ProgressBar属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 82%]

....progressBar = new ProgressBar("res/ui/progressBar.png"); this.progressBar.width = 400; this.progressBar.x = (Laya.stage.width - this.progressBar.width) / 2; this.progressBar.y = Laya.stage.height / 2; this.progressBar.sizeGrid = "5,5,5,5"; this.progressBar.changeHandler = new Handler(this, this.onC...

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

76. 圆不跟谁 sprite 一起缩放? [ 82%]

...Point;  // 程序入口 class GameMain{ constructor() { Laya.init(Browser.width, Browser.height, WebGL); this.CreateCircle(); // this.CreateRectangle(); } private firstSp: Laya.Sprite; private _adaptSp: Laya.Sprite; private _pointList : Point[]; private _rootSp : Laya.Sprite;  public CreateCircle(...

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

77. 2.3微信截图分享问题 [ 81%]

...做分享。 var tempFilePath = canvas.toTempFilePathSync( { x: 0, y: 0, width: 100, height: 100, destWidth: 100, destHeight: 100, fileType: 'jpg', quality: 1.0 });   var canvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0).getCanvas();   这是第二种写法。翻了几次...

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

78. 动画-新版骨骼动画 [ 81%]

...er.pixelRatio, Laya.Browser.pixelRatio); changeActionButton.pos(Laya.stage.width / 2 - changeActionButton.width * Laya.Browser.pixelRatio / 2, Laya.stage.height - 100 * Laya.Browser.pixelRatio); changeActionButton.on(Laya.Event.CLICK, this, function () { //根据名称播放动画 zombieAnimator.pla...

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

79. 鼠标事件能否在有图形的区域感应,特别是子项坐标为负数时(已经找到问题) [ 81%]

...(0,0,90,100,"#faaff0"); testPan.on(Event.CLICK,this,onMouseClick); testPan.width = 90; testPan.height = 100; var mcSp:Sprite = new Sprite(); mcSp.graphics.drawRect(0,0,90,100,"#fff000"); testPan.addChild( mcSp); mcSp.pos( -25,-90 ); } private function onMouseClick(e:Event):void { trace( e.target ); ...

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

80. 文本-自动调整文本尺寸 [ 81%]

...ow = Text.VISIBLE; autoSizeText.y = 50; // 该文本被限制了宽度 var widthLimitText = this.createSampleText(); widthLimitText.width = 100; widthLimitText.y = 180; //该文本被限制了高度 var heightLimitText = this.createSampleText(); heightLimitText.height = 20; heightLimitText.y = 320; ...

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