大约有 436 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0037 秒)
Laya_社区(282) Laya2.0_文档(49) Laya2.0_示例(41) Laya_示例(34) Laya3.0_api(17) Laya3.0_文档(12) Laya2.0_api(1)
...存 用IDE新建一个项目var WebGL = laya.webgl.WebGL; Laya.init(600, 400, WebGL); 此时用chrome工具看到 占用内存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 = '...
来源: Laya_社区 发布时间: 20180728
...本区背景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.align = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); } } } ```  在实际编码中如果需要其他的对齐模式...
来源: Laya2.0_文档 发布时间: 20210715
...ew Sprite(); Laya.stage.addChild(Wall_TL); Wall_TL.graphics.drawRect(0, 0, 400, 32, "#ffff00"); Wall_TL.pivot(200, 16); var Collision_Wall_TL:any = Matter.Bodies.rectangle(200, 400, 400, 32, { layaSprite:Wall_TL,isStatic: true }) Matter.World.add(this.engine.world, [ Collision_Wall_TL, // Colli...
来源: Laya_社区 发布时间: 20180529
...addChild 应该怎么做的呢?Sprite 不可以addChild. Laya.init(550,400,Laya.WebGL);Laya.Stat.show();var textBox = new Laya.Sprite();for(var i=0;i<10000;i++){txt=new Text();txt.text=(Math.random()*100).toFixed(0);txt.color="#CCCCCC";txt.x=Math.random()*550;txt.y=Math.random()*400;textBox.add...
来源: Laya_社区 发布时间: 20190531
...本区背景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.align = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); } } } new laya.HelloLayabox(); ```  在实际编码中如果需...
来源: Laya2.0_文档 发布时间: 20210714
... + 2 + d * 4] } } Laya.Browser.context.putImageData(imageData, 0, 0, 0, 0, 400, 400) } function showApe() { // 方法1:使用loadImage var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("../../res/apes/monk...
来源: Laya_社区 发布时间: 20171130
...class FormDemo { public function FormDemo() { // 初始化舞台 Laya.init(400,400); // 图标数据 var data:Object = { labels: [ //最上方矩形的标签提示和颜色设置 "Red", "Blue", "Yellow" ], datasets: [ { data: [300, 50, 100],//所占整个扇形的比率,以及分割份数 backgrou...
来源: Laya_社区 发布时间: 20170109
...aya.Sprite; var Stage = Laya.Stage; var rect; (function() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; createCantralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage...
来源: Laya_示例 发布时间: 20251130
...aya.Sprite; var Stage = Laya.Stage; var rect; (function() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOBORDER; Laya.stage.bgColor = "#232628"; createCantralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stag...
来源: Laya_示例 发布时间: 20251130
...aya.Sprite; var Stage = Laya.Stage; var rect; (function() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createCantralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage...
来源: Laya_示例 发布时间: 20251130