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

大约有 1,232 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0048 秒)

421. 绘制三角形、多边形及根据数据绘制图案(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 77%]

...        public class Sprite_DrawShapes     {         private var sp:Sprite;                    public function Sprite_DrawShapes()         {             Laya.init(500, 300, WebGL);             drawSomething();       ...

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

422. 灯光-点光 [ 77%]

...ion); pointLight.transform.position = _position; });class PointLightDemo { private scene: Laya.Scene; private _position: Laya.Vector3; private _quaternion: Laya.Quaternion; constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREE...

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

423. Laya.Sprite loadImage 参数问题 [ 77%]

...eRedFilter(); //灰色滤镜 this.createGrayFilter(); } /**创建位图**/ private createImg(w:number,h:number):Laya.Sprite{ var Img:Laya.Sprite = new Laya.Sprite(); //添加到舞台 Laya.stage.addChild(Img); //加载显示图片 Img.loadImage("res/img/monkey1.png", w, h);//报错 return Img; } /**...

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

424. Laya3.0正式版spine3.8的动画资源不能正常显示 [ 77%]

...ss, property } = Laya; @regClass() export class Main extends Laya.Script { private skeleton: SpineSkeleton; private index: number = -1; public pageWidth: number; public pageHeight: number; onStart() { console.log("Game start"); Laya.loader.load("resources/res/spineboy-pma.skel", Loader.SPINE).then((...

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

425. Sprite-绘制各种形状 [ 77%]

... = Laya.Stage; import WebGL = Laya.WebGL; export class Sprite_DrawShapes { private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(740, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya....

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

426. 怎么在不同时间显示MovieClip的多个实例 [ 77%]

怎么在不同时间显示MovieClip的多个实例 private var i:int; private var ani_planet:MovieClip; private function onBtnClick(e:Event):void { ani_planet = new MovieClip(); ani_planet.pivotY = ani_planet.pivotX = 350; ani_planet.x = Laya.stage.width/2; ani_planet.load("1.swf",true); ani_plane...

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

427. Animation创建和销毁的问题 [ 77%]

...就不显示了,以下是代码部分 环境:1.7.17_Beta 语言:as3 private var testAnim1:Animation; private var testAnim2:Animation; public function LayaSample() { //初始化引擎 Laya.init(1136, 640,WebGL); trace("ok..."); Laya.stage.on(Event.KEY_DOWN, this, this.onKeydown); } private func...

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

428. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 77%]

...你所有看到的东西全部截取下载,测试小游戏正常可用 private static _sp: Laya.Sprite = null; private static tempTexture2D: Laya.Texture2D; private static tempTexture: Laya.Texture; /**截图 */ public static drawScreenshot(width, height, x, y) { if (!SwitchHelper.screenDraw) { re...

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

429. Skeleton骨骼动画内存泄漏 [ 77%]

...复,FPS内存会一直往上升,降不下来。 核心代码如下: private te:Laya.Templet; private sk:Laya.Skeleton; private onKeyDown(e):void{ if(e.keyCode == 49 || e.keyCode == 97){ if(this.te == null){ this.te = new Laya.Templet(); this.te.on(Laya.Event.COMPLETE, this, this.teComplete); t...

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

430. Sprite-绘制各种形状 [ 77%]

... = Laya.Stage; import WebGL = Laya.WebGL; export class Sprite_DrawShapes { private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(740, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya....

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