大约有 3,990 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0085 秒)
Laya_社区(2836) Laya2.0_文档(369) Laya2.0_api(225) laya_api(169) Laya_示例(157) Laya2.0_示例(117) Laya3.0_api(62) Laya3.0_文档(55)
Matter和Sprite绑定后图片移位问题 代码: var ball_skin = new Laya.Sprite().loadImage("img/hero.png"); ball_skin.scale(50/120, 80/178); ball_skin.pivot(ball_skin.width / 2, ball_skin.height / 2); var ball = Matter.Bodies.rectangle(330, ...
来源: Laya_社区 发布时间: 20170721
...10000): ```javascript Laya.init(550,400,Laya.WebGL); Laya.Stat.show(); var textBox = new Laya.Sprite(); for(var i=0;i (图1) 当我们对文字所在的容器设置为cacheAs之后,如下面的例子所示,性能获得较大的提升,FPS达到到了60帧。 ```javascript //...省略其...
来源: Laya2.0_文档 发布时间: 20210714
...All(target: any = null) { if (!target) { this.timers.length = 0; return; } var length = this.timers.length; for (var i = 0; i < length; i++) { var t: TimerLite = this.timers[i]; if (t.target == target) { t.destory(); } } } 2023-11-15 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复...
来源: Laya_社区 发布时间: 20231025
...oGlobal坐标转换 我是如下写的,感觉转换后还是局部坐标 var globalPos:Point = this._toolbar.btn_mian_recruit.localToGlobal(new Point(this._toolbar.btn_mian_recruit.x, this._toolbar.btn_mian_recruit.y)); 2016-08-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...
来源: Laya_社区 发布时间: 20160801
...你对js更好的理解 你的项目修改如下即可正常运行 Game.js var Game = (function(){ function Game(){ // 初始化引擎,设置了游戏的宽高 Laya.init(480,852); Laya.stage.bgColor="#EEFFCC"; var bg = new BackGround(); Laya.stage.addChild(bg); } return Game; }()); var gameInstanc...
来源: Laya_社区 发布时间: 20170222
... CANVAS 状况可以利用一下JS代码 来到达 背景 双色 的目的var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); var my_gradient = ctx.createLinearGradient(0, 0, 0, 170); my_gradient.addColorStop(1, "#0066ff"); my_gradient.addColorStop(0, "#ccffff"); ctx.fillStyle...
来源: Laya_社区 发布时间: 20180713
... this.compassImg.pos(Laya.stage.width / 2, 400); } private drawUI():void { var canvas:Sprite = new Sprite(); Laya.stage.addChild(canvas); canvas.graphics.drawLine(this.compassImg.x, 50, this.compassImg.x, 182, "#FFFFFF", 3); canvas.graphics.drawLine(-140 + this.compassImg.x, this.compassImg.y, 140 +...
来源: Laya2.0_示例 发布时间: 20251219
...ndBox:BoundBox):void[override] CircleShapeProperty Detailarcpropertypublic var arc:Number环形弧度。emitFromEdgeproperty public var emitFromEdge:Boolean从边缘发射。radiusproperty public var radius:Number发射器半径。Constructor DetailCircleShape()Constructorpublic function CircleSha...
来源: laya_api 发布时间: 20170929
...: 测试没有问题,可以提供个例子我们看下 测试代码: var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); Laya.stage.addChild(sp); Tween.to(sp,{x:300,y:300,alpha:0.5},1000,null,Handler.create(this,function():void { sp.destroy(); })); Complete事件你没写错...
来源: Laya_社区 发布时间: 20170608
...ndBox:BoundBox):void[override] CircleShapeProperty Detailarcpropertypublic var arc:Number环形弧度。emitFromEdgeproperty public var emitFromEdge:Boolean从边缘发射。radiusproperty public var radius:Number发射器半径。Constructor DetailCircleShape()Constructorpublic function CircleSha...
来源: Laya2.0_api 发布时间: 20190513