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

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

801. 关于Pivot和Mask联合使用时的显示问题再次提交 [ 68%]

...         bg.loadImage("../../res/bg2.png");         Laya.stage.addChild(bg);         bg2 = new Sprite();         bg2.loadImage("../../res/bg2.png");         Laya.stage.addChild(bg2);         bg2.scale(3, 3);         bg2.pivot(50,50)         //创建mas...

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

802. 缓动-时间线 [ 68%]

...= new Sprite(); target.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(target); target.pivot(55, 72); target.pos(100,100); } function createTimerLine() { timeLine.addLabel("turnRight",0).to(target,{x:450, y:100, scaleX:0.5, scaleY:0.5},2000,null,0) .addLabel("turnDown",0).to(target,{x:4...

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

803. mac下用FB打包发布测试页面,chrome浏览器看不到预期显示文字 [ 68%]

...le is not defined. /LayaAirTest/src/LayaAirTest.as (22):warning:Laya.stage.addChild This variable is not defined.   代码如下: package {     import laya.display.Text;     public class LayaAirTest     {         public function LayaAirTest()         {             Laya....

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

804. 粒子编辑器报错 [ 68%]

...把此信息截图给研发商 Uncaught TypeError: Cannot read property 'addChild' of null TypeError: Cannot read property 'addChild' of null at Function.ViewRenderManager.show (file:///E:/LayaAirIDE_1.7.10_beta/resources/app/out/vs/layaEditor/h5/layabuilder.max.js:15196:27) at ParticleScene.__proto...

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

805. 物理引擎-布 [ 68%]

...esize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render = LayaRender.create( { engine: engine, container: gameWorld, width: stageWidth, hei...

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

806. 图集打包后使用Texture不显示啊 [ 68%]

... = new Laya.Sprite(); sp.graphics.drawTexture(texture,300,300); Laya.stage.addChild(sp); var ani: Laya.Animation = new Laya.Animation(); ani.loadAtlas("res/start.json"); // 加载图集动画 ani.interval = 30; // 设置播放间隔(单位:毫秒) ani.index = 1; // 当前播放索引 ani.play(...

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

807. HTMLIframeElement 使用出错?请大神指点 [ 68%]

... = Laya.HTMLIframeElement; var iHtml = new HTMLIframeElement(); Laya.stage.addChild(iHtml); iHtml.href="http://www.baidu.com"; 一启动运行就现以下错误  Error processing "variables": TypeError: Cannot read property 'length' of undefined at trimProperty (d:\Program Files\LayaIDE\resources\...

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

808. Laya3D 官方请看:有关Laya.MeshSprite3D.instantiate的Bug [ 68%]

...3D = Laya.Sprite3D.load("res/Coin/layaScene.lh") as Laya.Sprite3D;  scene.addChild(temp);  temp.on(Laya.Event.HIERARCHY_LOADED,this,()=>  {  this.model = Laya.MeshSprite3D.instantiate(temp,scene) as Laya.MeshSprite3D;  if(index == 0)  {  this.model.transform.position = new Laya.Vector3(0.8...

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

809. 请问HtmlDivElement控件在innerHTML中有<div>标签的情况下获取实际宽高为0的问题? [ 68%]

...ml } function createParagraph() { var p = new HTMLDivElement(); Laya.stage.addChild(p); p.style.font = "Impact"; p.style.fontSize = 30; var html = "&lt;div&gt;" html += "&lt;span color='#e3d26a'&gt;使用&lt;/span&gt;"; html += "&lt;span style='color:#FFFFFF;font-weight:bold'&gt;HTMLDivElement&lt;/s...

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

810. 鼠标交互-Hold [ 68%]

...ge.width / 2, Laya.stage.height / 2); this.ape.scale(0.8, 0.8); Laya.stage.addChild(this.ape); // 鼠标交互 this.ape.on(Event.MOUSE_DOWN, this, this.onApePress); } onApePress(e) { const Event = Laya.Event; // 鼠标按下后,HOLD_TRIGGER_TIME毫秒后hold Laya.timer.once(HOLD_TRIGGER_TIME, this...

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