大约有 110 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0034 秒)
... //初始化引擎 Laya.init(1136, 640,WebGL); var image:Image = new Image(); image.skin = "res/atlas/clanwar_bg.jpg?" + Math.random(); Laya.stage.addChild(image); ...
来源: Laya_社区 发布时间: 20190110
...,此时显示对象应该是看不见的,但是没有生效 Laya.init(640, 1136); let testSp = new Laya.Sprite(); testSp.width = 200; testSp.height = 50; testSp.graphics.clear(); testSp.graphics.drawRect(0, 0, testSp.width, testSp.height,'#FF0000'); let tmpMask = new Laya.Sprite(); tmpMask.width = t...
来源: Laya_社区 发布时间: 20200421
...回收至对象池内。 ##### ```typescript //初始化引擎 Laya.init(1136, 640, Laya.WebGL); //等比缩放 Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1, this, onFrame); this.createTime = 0; function onFrame() ...
来源: Laya2.0_文档 发布时间: 20210715
...rivate createTime: number = 0; constructor() { //初始化引擎 Laya.init(1136, 640, Laya.WebGL); //等比缩放 Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1, this, this.onFrame); } onFrame(): void { //如果创...
来源: Laya2.0_文档 发布时间: 20210715
... // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; ...
来源: Laya_社区 发布时间: 20170828
...createTime:int=0; public function PoolTest() { //初始化引擎 Laya.init(1136, 640,WebGL); //等比缩放 Laya.stage.scaleMode = Stage.SCALE_SHOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1,this,onFrame); } private function onFrame():void { //如果创建...
来源: Laya2.0_文档 发布时间: 20210715
...里的事例: public function LayaSample() { //初始化引擎 Laya.init(1136, 640); var sp:Sprite = new Sprite(); var xhr:HttpRequest = new HttpRequest(); xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.send("res/monkey2.png","","get","arraybuffer"); } ...
来源: Laya_社区 发布时间: 20171011
...@class */ (function () { function GameMain() { //初始化引擎 Laya.init(1136, 640); for (var i = 0; i < 4; i++) { var sp = new Laya.Sprite(); var xhr = new Laya.HttpRequest(); var url = "http://thirdqq.qlogo.cn/g%3Fb% ... 3B%3B xhr.once(Laya.Event.COMPLETE, this, this.completeHandler, [url, 1]...
来源: Laya_社区 发布时间: 20180629
...rt default class GameConfig{ static width:number=640; static height:number=1136; static scaleMode:string="fixedwidth"; static screenMode:string="none"; static alignV:string="top"; static alignH:string="left"; static startScene:any="LoginScene.scene"; static sceneRoot:string=""; static debug:boolean=...
来源: Laya_社区 发布时间: 20190402
...ss LayaSample { public function LayaSample() { //初始化引擎 Laya.init(1136, 640); Laya.stage.bgColor = "#ffffff"; var sp : Label = new Label("hello world"); //sp.fontSize = 55; sp.pos(100, 100) ; //sp.color = "#000000"; Laya.stage.addChild(sp); } } } chrome 下查看源代码 <html> <h...
来源: Laya_社区 发布时间: 20170711