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

大约有 2,033 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0059 秒)

21. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 97%]

...ngel.level; // 构造 function IsLand() { // 初始化 IsLand.__super.call(this); // 名字 this.name = "gemini"; this.init(); } // 注册类 IsLand Laya.class(IsLand,"IsLand",laya.display.Sprite); // 原型 var _proto = IsLand.prototype; // 初始化 _proto.init = function(){ // 球体 this.ball = ...

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

22. 高级应用-寻路导航 [ 97%]

...发语言、LayaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); this._position = new Laya.Vector3(0, 0, 0); this._upVector3 = new Laya.Vector3(0, 1, 0); this._tarPosition = new Laya.Vector3(0, 0, 0); this._finalPosition = new Laya.Vector3(0, 0, 0); this._quaternion = new Laya.Quaternion();...

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

23. 性能测试-虫子(慎入) [ 97%]

....stage.height + padding * 2); Laya.loader.load(texturePath, Handler.create(this, onTextureLoaded)); })(); function onTextureLoaded() { maggotTexture = Laya.loader.getRes(texturePath); initMaggots(); Laya.timer.frameLoop(1, this, animate); } function initMaggots() { var maggotContainer; for (var i = ...

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

24. 其他引擎的Demo-Example_05 [ 97%]

....SCALE_FULL; setup(); })(); function setup() { Laya.stage.on(Event.RESIZE, this, onResize); makeObject(0); for (var i = 0; i objs) { current = 0; } makeObject(current); } function makeObject(t) { var xd; var i; switch (t) { case 0: for (i = 0; i tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } if (point...

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

25. 其他引擎的Demo-Example_05 [ 97%]

....SCALE_FULL; setup(); })(); function setup() { Laya.stage.on(Event.RESIZE, this, onResize); makeObject(0); for (var i = 0; i objs) { current = 0; } makeObject(current); } function makeObject(t) { var xd; var i; switch (t) { case 0: for (i = 0; i tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } if (point...

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

26. 富文本过程中我遇到的问题以及解决方法(超链接换行以及无法接收超链接鼠标事件以及br或者 标签会崩溃报错的问题) [ 97%]

...者  标签崩溃问题 解决方法 HTMLElemen类中      var words = this._getWords();             if (words == null && (!this._children || this._children.length == 0))                 return false;             if (words) {                 for (var i = 0, n ...

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

27. 鼠标交互-双指缩放(多点触控) [ 97%]

...(); })(); function setup() { createSprite(); Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 300, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.po...

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

28. UI-Button [ 97%]

... COLUMNS - 1) - BUTTON_HEIGHT) / 2; Laya.loader.load(skins, Handler.create(this, onUIAssetsLoaded)); })(); function onUIAssetsLoaded() { for (var i = 0, len = skins.length; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDL...

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

29. 物理引擎-牛顿摆 [ 97%]

...)(); function setup() { initMatter(); initWorld(); Laya.stage.on("resize", this, onResize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render...

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

30. 性能测试-卡通人物2 [ 97%]

...Animation; // Class Character function Character(images) { Character.super(this); Character.WIDTH = 110; Character.HEIGHT = 110; var bloodBar; var animation; var nameLabel; Character.prototype.createAnimation = function(images) { animation = new Animation(); animation.loadImages(images); animation.i...

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