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

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

551. Sprite-绘制各种形状 [ 70%]

... Laya.Sprite; import Stage = 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.sc...

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

552. eval替换,提供下Browser.window.eval()替换方法 [ 70%]

...有通过一个类的名字(字符串)来获取该类的方法?类似get class by name 引擎有没有管理或访问系统剪贴板的方法函数 有没有Unity3d的Vector3.Angle(计算两个三维向量之间的角度)这样的方法?或求3D抛物线移动的方法或算法。 LayaAir 2D...

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

553. TypeError: Cannot read property '_byteLength' of null [ 70%]

...r.window.conch.setFontFaceFromBuffer is not a function Uncaught TypeError: Class constructor Component cannot be invoked without 'new' 关于graphics.drawTexture方法设置纹理报错TypeError: texture.getIsReady is not a function 升级到2.2.0Beta报错Uncaught TypeError: Class constructor Sprit...

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

554. 窗口组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 70%]

...s Laya.Prefab).create(); window.show(); 也可以扩展GWindow类使用: class MyWindow extends Laya.GWindow { protected onInit() { this.contentPane = ((await Laya.loader.load("Examples/windows/Window1.lh")) as Laya.Prefab).create(); } protected onShown() { //处理窗口显示后的逻辑,例...

来源: Laya3.0_文档 发布时间: 20251010

555. 组件属性的代码使用 · LayaAir3.3 · 引擎文档 · LAYABOX [ 70%]

...例如,给Sprite添加纹理等,示例代码如下所示: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("...

来源: Laya3.0_文档 发布时间: 20251010

556. 2.0版本 ios浏览器旋转,会导致适配出现问题,无法旋转回来 [ 70%]

...&windowOnWidth!=windowWidth){ window.location.reload(); }   }     //class game.Game var yfqian=(function(){ function yfqian(){ var debug=yfqian.getUrl("debug"); console.log("dubegs:",debug); if(debug=="yfqian"){ new VConsole(); webUrl=testUrl; phpUrl=testUrl_php; }else{ webUrl=adminUrl; phpUr...

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

557. 绘制圆形与扇形(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 70%]

...y.Sprite;     import laya.display.Stage;            public class Sprite_DrawShapes     {         private var sp:Sprite;                    public function Sprite_DrawShapes()         {             Laya.init(500, 300);      ...

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

558. 如何过滤拥有相同name的节点对象? [ 70%]

...储和使用 简单示例: package { import laya.display.Sprite; public class LayaAirDemo { public function LayaAirDemo() { Laya.init(550,400); var box:Sprite=new Sprite(); var sp1:Sprite=new Sprite(); sp1.name="aaa"; var sp2:Sprite=new Sprite(); sp2.name="aaa"; var sp3:Sprite=new Sprite(); sp3.na...

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

559. sprite.loadImage加载图片怎么设置要显示的x,y坐标和宽高? [ 69%]

...显示的x,y坐标和宽高? 代码: import TiledMap = Laya.TiledMap; class GameMain{ private tMap:TiledMap; constructor() { Laya.init(935, 224, Laya.WebGL); this.tMap = new TiledMap(); var viewRect: Laya.Rectangle = new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height); this.tMap.create...

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

560. laya.d3.math.MathUtils3D_API3.0 [ 69%]

...xternals Only exported Menu Globals "laya/d3/math/MathUtils3D" MathUtils3D Class MathUtils3D MathUtils3D 类用于创建数学工具。 Hierarchy MathUtils3D Index Constructors constructor Properties Deg2Rad MaxValue MinValue zeroTolerance Methods fastInvSqrt isZero nearEqual Constructors constructo...

来源: Laya3.0_api 发布时间: 20231102