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

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

51. Sprite-切换纹理 [ 81%]

...1.png", monkey2Str = "res/apes/monkey2.png", monkey1Res, monkey2Res; class Sprite_SwitchTexture { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.al...

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

52. Laya2.0绘制扇形遮罩,显示到部分角度时显示会有部分缺失(demo已上传) [ 81%]

...mage('c1.png'); node.pos(300, 300) Laya.stage.addChild(node); var sp: Laya.Sprite = new Laya.Sprite(); node.mask = sp; sp.pos(50, 50); var sp2: Laya.Sprite = new Laya.Sprite(); sp2.pos(300, 500); Laya.stage.addChild(sp2); let r: number = 0 Laya.timer.loop(100, this, () => { if (r >= 360) r = 0...

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

53. DOM元素-视频 [ 81%]

...ine", true); // 设置画布上的对齐参照物 var reference = new Laya.Sprite(); Laya.stage.addChild(reference); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils....

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

54. 关于Laya.loader.load和getRes的问题 [ 81%]

...:Texture = Laya.loader.getRes("../../../../res/apes/monkey2.png"); var ape:Sprite = new Sprite(); ape.graphics.drawTexture(t,0,0); Laya.stage.addChild(ape); ape.pos(200, 0); })); 这可以正常运行,但是我把外面的 load 函数去掉,将第二个参数中的函数内容独立后却不能...

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

55. 关于使用Idea以及Linux下使用AS语言开发的一点经验 [ 80%]

...tyPlugin 使用须知-版本更新-问题解答(最新版本:1.7.16) sprite3d怎样使用Laya.Tween.to来做缓动呢?比如position或者scale TS项目使用matter.js库无智能提示 使用3D时候,Property 'getComponentByType' does not exist on type 'Node'. LayaAirIDE下如何使用mas...

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

56. 性能测试-虫子(慎入) [ 80%]

... y); } tick += 0.1; } } new PerformanceTest_Maggots();module laya { import Sprite = Laya.Sprite; import Browser = Laya.Browser; import Handler = Laya.Handler; import Stat = Laya.Stat; import Rectangle = Laya.Rectangle; import WebGL = Laya.WebGL; export class PerformanceTest_Maggots { private texture...

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

57. sprite添加click监听事件反应迟钝 [ 80%]

sprite添加click监听事件反应迟钝 代码如下,如果用drawyuan.graphics.drawCircle(0,0,50,"#232628");则会点击反应非常迟钝,如果用loadimg的话,反应很快; function drawCirle() { var drawyuan = new Laya.Sprite(); // drawyuan.graphics.drawCircle(0,0,50,"#232628");//反...

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

58. 绘制图形的BUG [ 80%]

绘制图形的BUG BUG1:package ui.test { import laya.display.Sprite; import laya.utils.Tween; public class MyBox extends Sprite { private var _shape:Sprite; public function MyBox() { super(); graphics.drawRect(0,0,200,200,"#00ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"...

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

59. laya.map.TileAniSprite [ 80%]

...entationAll Packages | All Classes | Index | Frames No Frames TileAniSpriteProperties | Methods | Events Packagelaya.mapClasspublic class TileAniSpriteInheritanceTileAniSprite Sprite Node EventDispatcher Object TildMap的动画显示对象(一个动画(TileTexSet),可以绑定多个...

来源: laya_api 发布时间: 20170929

60. 区块地图-等角地图 [ 80%]

...种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var MapLayer = Laya.MapLayer; var TiledMap = Laya.TiledMap; var Point = Laya.Point; var Rectangle = Laya.Rectangle; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var tiledMap;...

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