大约有 210 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0033 秒)
Laya3.0_api(61) Laya2.0_api(57) laya_api(53) Laya_社区(29) Laya3.0_文档(5) Laya_示例(3) Laya2.0_示例(1) Laya2.0_文档(1)
...内存6.4mbvar WebGL = laya.webgl.WebGL; Laya.init(600, 400, WebGL); let container = new Laya.Box() for(let i =0;i<1000;i++){ let t = new Laya.Text() t.text = 'test' t.color = '#ffffff' container.addChild(t) } Laya.stage.addChild(container)新建一个精灵 向其中插入1000个文字 内存快...
来源: Laya_社区 发布时间: 20180728
...ript三种开发语言、LayaAirIDE让项目开发更高效。class Sprite_Container { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stag...
来源: Laya2.0_示例 发布时间: 20251130
...ort Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Sprite_Container { // 该容器用于装载4张猩猩图片 private apesCtn: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.AL...
来源: Laya_示例 发布时间: 20251130
...n{ constructor() { Laya.init(1920,950,Laya.WebGL); Laya.Stat.show(); const container = new Laya.Sprite(); Laya.stage.addChild(container); const mask = new Laya.Sprite(); mask.graphics.drawPoly(0, 0, [0, 0, 484, 0, 1483, 950, 0, 950], '#ff0000'); // container.addChild(mask); container.mask = mask; co...
来源: Laya_社区 发布时间: 20170915
...ell); cell.addChild(_items[index]); } protected function removeAllChildren(container:Sprite):void { while(container.numChildren > 0) { container.removeChildAt(0); } } protected function createLoading():Sprite { _loadingBg = new Sprite(); _loadingBg.graphics.drawRect(0, 0, _list.width, _list.heigh...
来源: Laya_社区 发布时间: 20170323
....once(2000, this, ShowHide); } 【native2.0中】stage上加几个平级container,然后再同一container上加两个ui,移除舞台后再加上必然无法显示 网页中是正常的 注意:直接加到舞台stage上能正常显示,加到几个平级container中的其中一个就必...
来源: Laya_社区 发布时间: 20181025
...备像素比三、调用原生对象3.1 document Dom3.2 window 窗口3.3 container 画布四、判断运行环境浏览器接口 一、概述 在项目开发中,往往我们需要跟外部运行环境打交道,比如在浏览器运行或者在一些小游戏平台中运行,都需要获取设...
来源: Laya3.0_文档 发布时间: 20251010
...被删除了以后.无法重新初始化 可以把已经存在ls.Browser.container 拿去替换掉当前的容器元素,清屏就可以继续使用 if (ls.Browser.container) { const container = document.getElementById('b-layabox') container.parentNode.replaceChild(ls.Browser.container, container) ...
来源: Laya_社区 发布时间: 20190520
hitArea怎么用 var container = new Sprite(); container.graphics.drawRect(0,0,640,1136,'#ff0000'); container.size(640,1136) Laya.stage.addChild(container); var bg2Sprite = new Sprite(); bg2Sprite.graphics.drawRect(...
来源: Laya_社区 发布时间: 20170223
...tter.Engine.run(engine); var render = LayaRender.create( { engine: engine, container: gameWorld, width: stageWidth, height: stageHeight, options: { wireframes: false } }); LayaRender.run(render); mouseConstraint = Matter.MouseConstraint.create(engine, { element: Render.canvas }); Matter.World.add(en...
来源: Laya_示例 发布时间: 20251130