大约有 1,608 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0060 秒)
Laya_社区(977) Laya2.0_文档(192) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(61) Laya2.0_api(57) laya_api(53) Laya3.0_文档(29)
...用loadImage var ape: Sprite = new Sprite(); ape.pos(100,50); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); } } } new laya.Sprite_DisplayImage(); ``` 在示例代码里,“`100,50`”是图片的显示坐标信息。示例代码运行效果如图2-1所示: ![图2-1](img/...
来源: Laya2.0_文档 发布时间: 20210715
....Stage.SCREEN_NONE; Laya.Stat.show(); var scene: Laya.Scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene; this._outHitAllInfo = new Array<Laya.RaycastHit>(); //初始化照相机 this.camera = scene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera; this.camera.transform.tra...
来源: Laya_社区 发布时间: 20180820
...LL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; var scene = Laya.stage.addChild(Laya.Scene.load("../../res/threeDimen/scene/TerrainScene/XunLongShi.ls")); scene.once(Laya.Event.HIERARCHY_LOADED, this, function () { var camera = scene.getChildByName("Scenes").getChildByName("Main Camera"); camera...
来源: Laya_示例 发布时间: 20241117
...Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); var rect1 = new Sprite(); rect1.graphics.drawRect(Laya.stage.width / 3 * 2 , Laya.stage.height / 3 * 2 - 65, 100, 100, "blue"); // rect1.graphics.drawRect(Laya.stage.width / 2 , Laya.stage.height / 2, 100, 100...
来源: Laya_社区 发布时间: 20170206
...omething(); })(); function drawSomething() { sp = new Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5); //画曲线 sp.graphics.drawCurves(352, 58, ...
来源: Laya_示例 发布时间: 20241117
...rawSomething(); } drawSomething() { let sp = new Laya.Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5); //画曲线 sp.graphics.drawCurves(352, 58, ...
来源: Laya2.0_示例 发布时间: 20241117
...ction 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, this, onStartDrag); } function ...
来源: Laya_示例 发布时间: 20241117
...nel.y = 30; panel.hScrollBarSkin = null; var sp = new Laya.Sprite(); panel.addChild(sp); sp.x = 0; sp.y = 0; // 用下面这组数据是可显示的 // sp.y = 1; // sp.x = 1; sp.graphics.drawRect(0, 0, 200, 200, "#00FF00"); Laya.stage.addChild(panel); 这个是我的代码,sp是一个精灵,放...
来源: Laya_社区 发布时间: 20170217
...Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.img.graphics.drawRect(0, 0, WID, HEI - 2, "#eeeeee"); this.label = new Label(); this.addChild(this.label); this.input = new TextInput(); this.addChild(this.input); this.input.x = 50; this.input.text =...
来源: Laya_社区 发布时间: 20180312
...ya.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.ape.on(Event.MOUSE_DOWN, this, ...
来源: Laya2.0_示例 发布时间: 20241117