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

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

71. 如何将原生iframe嵌入某个节点,像addChild那样嵌入 [ 81%]

...on(){ this.frame=Laya.Browser.document.createElement("iframe"); this.frame.width=this.con.width; this.frame.height=850; this.frame.style.margin="0"; this.frame.style.padding="0"; this.frame.style.left="0"; this.frame.style.top="50px"; this.frame.id="OneGou"; this.frame.style.position="absolute"; thi...

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

72. Animation 使用疑问 [ 81%]

...Rectangle = this.aniBody.getBounds();         this.aniBody.pivot(bound.width / 2, bound.height / 2);         if (direction < 0) {             this.aniBody.scaleX = -1;         } else {             this.aniBody.scaleX = 1;         }     } 每改变一个方向CurMern...

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

73. Image.loadImage 方法加载问题 [ 81%]

...publicSpaceList.x = 22; this.publicSpaceList.y = 100; this.publicSpaceList.width = 1553; this.publicSpaceList.height = 810;// this.publicSpaceList.vScrollBarSkin = ""; this.publicSpaceList.selectHandler = new Laya.Handler(this, this.onListSelect); this.publicSpaceList.renderHandler = new Laya.Handle...

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

74. Label属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 80%]

...vate createLabel(color: string, strokeColor: string): Label { const STROKE_WIDTH: number = 4; var label: 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 = stro...

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

75. 官方文档里的位图字体的制作与使用JS 跑不通 以及 文档的几个问题 [ 80%]

...,没放空格,最好设置一个空格宽度this.mBitmapFont.setSpaceWidth(10);Laya.Text.registerBitmapFont(this.mFontName,this.mBitmapFont);var txt = new Laya.Text();txt.text = "这是测试";//设置宽度,高度自动匹配txt.width = 250;//自动换行txt.wordWrap = true;txt.align = "cente...

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

76. image在相应loaded的时候,无法正确获取高度 [ 80%]

...is.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matter.Bodies.rectangle(this.x, this.y, this.width, this.height, createOption); Matter.World.add(GameMain.instance...

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

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

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

78. 缓动-逐字缓动 [ 80%]

... Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() {...

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

79. 使用laya官方示例代码制作微信小游戏无法显示 [ 80%]

...vate createLabel(color: string, strokeColor: string): Label { const STROKE_WIDTH: number = 4; var label: 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 = stro...

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

80. 设置滤镜(JavaScript-LayaAir基础篇(JS)-位图) [ 79%]

...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 = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(t...

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