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

大约有 59 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0034 秒)

21. 缓动-简单的Tween [ 77%]

...gColor = "#232628"; this.setup(); } private setup(): void { var terminalX: number = 200; var characterA: Sprite = this.createCharacter("../../res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; var characterB: Sprite = this.createCharacter("../../res/cartoonCharacters/2.pn...

来源: Laya_示例 发布时间: 20240930

22. 缓动-简单的Tween [ 76%]

...gColor = "#232628"; this.setup(); } private setup(): void { var terminalX: number = 200; var characterA: Sprite = this.createCharacter("res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; var characterB: Sprite = this.createCharacter("res/cartoonCharacters/2.png"); charact...

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

23. 在一个页面多放几个iframe,里面使用引擎,一般3-4个就报错了 [ 74%]

...报错了 Uncaught DOMException: Failed to construct 'AudioContext': The number of hardware contexts provided (6) is greater than or equal to the maximum bound (6). at Function.<anonymous> (<anonymous>:10787:310) at Function.get (<anonymous>:168:66) at Function.WebAudioSound.initWe...

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

24. laya.d3.webxr.core.WebXRSessionManager_API3.0 [ 72%]

...SessionManager.ts:26 Current XR XRFrame currentTimestamp currentTimestamp: number = -1 Defined in laya/d3/WebXR/core/WebXRSessionManager.ts:28 WebXR timestamp updated every frame defaultHeightCompensation defaultHeightCompensation: number = 1.7 Defined in laya/d3/WebXR/core/WebXRSessionManager.ts:30...

来源: Laya3.0_api 发布时间: 20231115

25. 如何用Tween 给graphics.drawLine 设置缓动 [ 72%]

...Sprite; public class LayaAirDemo { private var sp:Sprite; private var endX:Number; private var endY:Number; public function LayaAirDemo() { Laya.init(600,600); sp=new Sprite(); Laya.stage.addChild(sp); endX=0; endY=0; sp.graphics.drawLine(10,10,endX,endY,'#FF0000'); Laya.timer.frameLoop(1,this,onFra...

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

26. animate 动画播放 怎么把攻击 开火 合起来播放 [ 72%]

...画最后一帧的索引值, */ private aniUrls(aniName: string, length: number): any { var urls: any = []; for (var i: number = 1; i < length; i++) { //动画资源路径要和动画图集打包前的资源命名对应起来 urls.push("imgs/role/wp116/" + aniName + i + ".png"); } return urls; ...

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

27. 和原生Dom交互 · LayaAir3.0文档 · LAYABOX [ 72%]

...ntext || Laya.Browser.window.webkitAudioContext)(); //Stereo var channels: number = 2; // Create an empty two-second stereo buffer at the // sample rate of the AudioContext var frameCount: number = audioCtx.sampleRate * 2.0; var myArrayBuffer: any = audioCtx.createBuffer(2, frameCount, audioCtx.samp...

来源: Laya3.0_文档 发布时间: 20230629

28. 编译太慢了,我想到一种优化编译时间的方式,请官方给出评价 [ 71%]

...加这样一个类即可:class Laya { public static function init(width:Number, height:Number, ... plugins):* { return null } } 这有点类似使用laya 原生js开发中的.d.ts文件,只是我们应该让这个laya类定义库尽量的小,满足编译的要求即可。这样能够极大提...

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

29. 缓动-时间线 [ 70%]

...ya.Event; this.timeLine = new TimeLine(); // addLabel(label:String, offset:Number) offset: 标签事件相对于上个动画的偏移时间(单位:毫秒) this.timeLine.addLabel("turnRight", 0).to(this.target, {x:450, y:100, scaleX:0.5, scaleY:0.5}, 2000, null, 0) .addLabel("turnDown", 0).to(this....

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

30. 使用createFrames创建的图集动画。如何单独修改这个缓存动画播放速度 [ 70%]

...了!/** * 角色创建 */ public function init(interval,type:String,hp:Number,speed:Number,hitRadius:Number,camp:Number,heroType:Number = 0):void { //初始化属性 this.type = type; this.hp = hp; this.speed = speed; this.hitRadius = hitRadius; this.camp = camp; this.heroType = heroType; if(!Role...

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