大约有 520 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0037 秒)
...rotateTimeBasedText.x, rotateTimeBasedText.y + vGap); Laya.timer.loop(200, this, animateTimeBased); Laya.timer.frameLoop(2, this, animateFrameRateBased); } function createText(text, x, y) { var t = new Text(); t.text = text; t.fontSize = 30; t.color = "white"; t.bold = true; t.pivot(t.width / 2, t.h...
来源: Laya_示例 发布时间: 20251130
...ng", "res/ui/radioButton (3).png"]; Laya.loader.load(skins, Handler.create(this, this.initRadioGroups)); } initRadioGroups() { for (let i = 0; i ; constructor(){ // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.AL...
来源: Laya2.0_示例 发布时间: 20251130
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.listenKeyboard(); this.createLogger(); Laya.timer.frameLoop(1, this, this.keyboardInspector); } listenKeyboard() { const Event = Laya.Event; // 用Set实现更好一些 keyDownList = []; // 添...
来源: Laya2.0_示例 发布时间: 20251130
...nect to runtime process, timeout after 10000 ms - (reason: Can't attach to this target that may have Chrome DevTools attached - file:///D:/work/SlotProject2/bin/index.html). 2017-04-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 ...
来源: Laya_社区 发布时间: 20170428
...载角色动画资源 Laya.loader.create("monkey/monkey.ls",Handler.create(this,onSceneOK)); } private function onSceneOK():void { //添加3D场景 var scene:Scene3D = Laya.loader.getRes("monkey/monkey.ls"); Laya.stage.addChild(scene); //从场景中获取摄像机 var camera:Camera = scene.getChild...
来源: Laya2.0_文档 发布时间: 20210715
....bgColor = "#232628"; Laya.loader.load("../../res/bg2.png", Handler.create(this, setup)); })(); function setup() { var bg = new Sprite(); bg.loadImage("../../res/bg2.png"); Laya.stage.addChild(bg); bg2 = new Sprite(); bg2.loadImage("../../res/bg2.png"); Laya.stage.addChild(bg2); bg2.scale(3, 3); //...
来源: Laya_示例 发布时间: 20251130
... Laya.stage.bgColor = "#3da8bb"; createCanvases(); Laya.timer.frameLoop(1, this, animate); Laya.stage.on('mousedown', this, onMouseDown); Laya.stage.on('mousemove', this, onMouseMove); Laya.stage.on('mouseup', this, onMouseUp); })(); function createCanvases() { var graphicsCanvas = new Sprite(); Lay...
来源: Laya_示例 发布时间: 20251130
... if (touches && touches.length == 2) { this.preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX); Laya.stage.on(Event.MOUSE_MOVE, th...
来源: Laya_社区 发布时间: 20171201
...../../"; Laya.loader.load("res/particles/GravityMode.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON); })(); function onAssetsLoaded(settings) { sp = new Particle2D(settings); sp.emitter.start(); sp.play(); Laya.stage.addChild(sp); sp.x = Laya.stage.width / 2; sp.y = Laya.stage.height...
来源: Laya_示例 发布时间: 20251130
...赋值。 > 动态修改摄影机视口 ```typescript Laya.timer.once(3000,this,function ():void { //获取第一个摄影的视口 var viewport1:Viewport = camera1.normalizedViewport; //修改参数 viewport1.width = 0.2; //重新赋值是视口 camera1.normalizedViewport = viewport1; var viewport2...
来源: Laya2.0_文档 发布时间: 20210715