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

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

21. 滤镜-发光滤镜 [ 86%]

...ateApe(); applayFilter(); } function createApe() { ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.x = (Laya.stage.width - texture.width) / 2; ape.y = (Laya.stage.height - texture.height) / 2; Laya.stage.addChild(ape); } function applayFilter() { //创建...

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

22. 鼠标交互-拖动 [ 86%]

...eApe(); showDragRegion(); } function createApe() { ape = new Sprite(); ape.loadImage(ApePath); Laya.stage.addChild(ape); var texture = Laya.loader.getRes(ApePath); ape.pivot(texture.width / 2, texture.height / 2); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; ape.on(Event.MOUSE_DOWN, ...

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

23. 输入设备-摇一摇 [ 85%]

...ePic() { const Sprite = Laya.Sprite; let shakePic = new Sprite(); shakePic.loadImage("res/inputDevice/shake.png"); Laya.stage.addChild(shakePic); } showConsoleText() { const Text = Laya.Text; console = new Text(); Laya.stage.addChild(console); console.y = picH + 10; console.width = Laya.stage.width;...

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

24. 鼠标交互-拖动 [ 85%]

...prite = Laya.Sprite, Event = Laya.Event; this.ape = new Sprite(); this.ape.loadImage(ApePath); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(ApePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; this....

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

25. Image加载完成后的图片大小重设问题 [ 84%]

...init();     }     public init ():void     {         this.bg_img.loadImage("ui/bg.jpg",0,0,Laya.stage.width,Laya.stage.height,Laya.Handler.create(this,this.onComplete));         Laya.stage.on(Laya.Event.RESIZE,this,this.onResize);     }     onComplete():void     {         this...

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

26. 没有预加载的图片怎么获取width和height ? [ 84%]

...交 2 个回复 浪货界扛把子 赞同来自: cuixueying 给精灵设置loadimage后不能直接获取它的大小;   问题:是不是只有加载完图片在能真正获取他的width和height?   本人当前解决方法:提前加载资源,在回调中进行操作设置 text_load_wid...

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

27. Sprite-旋转缩放 [ 84%]

...() { this.ape = new Laya.Sprite(); Laya.stage.addChild(this.ape); this.ape.loadImage("res/apes/monkey2.png"); this.ape.pivot(55, 72); // this.ape.pos( Laya.stage.width / 2, Laya.stage.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; this.scaleDelta = 0; Laya.timer....

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

28. iPhone6 webgl渲染下sprite.loadimage加载不出canvas.toDateUrl [ 83%]

iPhone6 webgl渲染下sprite.loadimage加载不出canvas.toDateUrl $("#ewm").qrcode({render:"canvas",width:parseInt(1136*0.3),height:parseInt(1136*0.3),correctLevel:0,text:textDz});//生成二维码图案 var t = new Texture(); t.load($("#ewm canvas")[0].toDataURL()); ewmSprit.graphics.drawTexture(...

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

29. 设置滤镜(JavaScript-LayaAir基础篇(JS)-位图) [ 83%]

...pe.y = secondChild.y; } function createApe() { var ape = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); return ape; } })(); ``` 在上面的代码中,我们创建了一个原始位图、一个红色滤镜效果位图、一个灰色滤镜效果位图。运行...

来源: Laya2.0_文档 发布时间: 20210714

30. 滤镜-颜色滤镜 [ 82%]

...pe.y = secondChild.y; } function createApe() { var ape = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); return ape; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import ColorFilter = Laya.ColorFilter; import Texture = Laya.Texture;...

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