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

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

181. LayaNative2.0 UI移除舞台,再添加必然无法显示 [ 87%]

...添加必然无法显示 private function CreateCon():void { _con1 = new Sprite(); _con2 = new Sprite(); _con3 = new Sprite(); _con4 = new Sprite(); Laya.stage.addChild(_con1); Laya.stage.addChild(_con2); Laya.stage.addChild(_con3); Laya.stage.addChild(_con4);   _p1 = new UI1(); _p2 = new UI2();  ...

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

182. 其他引擎的Demo-Example_23 [ 87%]

...种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Point = Laya.Point; var Browser = Laya.Browser; var WebGL = Laya.WebGL; var viewWidth = Browser.width; var viewHeight = Browser.height; var lasers = []; var tick = 0; var freque...

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

183. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 87%]

...eControlScript extends Laya.Script{ /*角色模型*/ public roleModel:Laya.Sprite3D; /*角色动画组件*/ public roleAni:Laya.Animator; /*角色当前动作*/ public currentAction:string = "stand"; /*角色动画是否完成*/ public aniComplete:Boolean = true; /*角色移动速度*/ public speed:...

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

184. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 87%]

...办法降DrawCall package { import laya.display.Node; import laya.display.Sprite; import laya.maths.Rectangle; import laya.ui.Dialog; import laya.ui.Image; import laya.utils.Handler; import ui.TestDialogUI; import ui.TestViewUI; public class TestView extends TestViewUI { private var PATH_LEN:Number ...

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

185. 骨骼动画-Spine事件 [ 87%]

...t mFactory, mArmature, mStartX = 400, mStartY = 500, mCurrIndex = 0, mLabelSprite; class Skeleton_SpineEvent { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Sprite = Laya.Sprite; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.cli...

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

186. 导入3D模型有问题 [ 87%]

...;   //添加自定义模型        var mesh = scene.addChild(new Laya.Sprite3D.load("res/dg/dg.lh"));        mesh.once(Laya.Event.HIERARCHY_LOADED, null, function (sprite) {        setMeshParams(sprite, Laya.StandardMaterial.RENDERMODE_CUTOUT, new Vector4(3.5, 3.5, 3.5, 1.0), new Vector...

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

187. 其他引擎的Demo-Example_23 [ 87%]

...BG.jpg"); Laya.stage.frameLoop(1, this, this.animate); } animate() { const Sprite = Laya.Sprite, Point = Laya.Point; let laser; if (tick > frequency) { tick = 0; // iterate through the dudes and update the positions laser = new Sprite(); laser.loadImage("res/pixi/laser0" + ((type % 5) + 1) + ".png")...

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

188. 绘制直线与折线(TypeScript-LayaAir基础篇(TS)-矢量图) [ 87%]

...线,示例代码如下: ```javascript module laya {     import Sprite = Laya.Sprite;     import Stage = Laya.Stage;     import WebGL = Laya.WebGL;       export class Sprite_DrawShapes {         private sp: Sprite;           constructor()     ...

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

189. 渲染性能实例问题 [ 87%]

...oc/?nav=zh-js-3-2-2 从以上找到实例, 这代代码不能跑。我看sprite里面没有addChild 应该怎么做的呢?Sprite 不可以addChild. Laya.init(550,400,Laya.WebGL);Laya.Stat.show();var textBox = new Laya.Sprite();for(var i=0;i<10000;i++){txt=new Text();txt.text=(Math.random()*10...

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

190. Sprite-切换纹理 [ 87%]

...种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var texture1 = "../../res/apes/monkey2.png"; var texture2 = "../../res/ap...

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