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

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

511. 分包后, 资源加载问题 [ 76%]

...ata)"); //此行报错 var load:* = __JS__('new loading100()'); Laya.stage.addChild(load); trace("loading100..."); }   这个loading100.js: (function(window,document,Laya){ console.log("kk1") var __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya....

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

512. TimeLineUI不存在的问题 [ 76%]

...个UI实例 var plan = new ui.TimeLineUI(); //添加到舞台 Laya.stage.addChild(plan); //播放UI场景中的动画 plan.crashed.play(); }运行时发现ui变量不存在,打控制台打ui,Laya.ui,Laya.TimeLineUI均发现不存在,在文档中也搜到不TimeLineUI的文档,请问这个API...

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

513. 文本-字数限制 [ 76%]

...nput() { const Input = Laya.Input; let inputText = new Input(); Laya.stage.addChild(inputText); inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = Laya.stage.height - inputText.height >> 1; // 设置字体样式 inputText.bold = true; inputText.bgColor = "...

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

514. runtime this.loadScene is no a function [ 76%]

...8) >> 2)]] is not a function 官方视频教程中飞机大战 "this.addChild is not a function" at api readFile fail callback function 打地鼠发布成微信小游戏后提示gameThirdScriptError this.preinitialize is not a function 分包发布,static方法拿取不到。报错:类名....

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

515. 面板容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...s/comp/hscroll.png"; panel.size(600, 275); panel.pos(150, 150); this.owner.addChild(panel); // 创建Image组件,作为Panel的子节点 let img: Laya.Image; for (var i: number = 0; i < 4; i++) { // 创建4个Image,水平排列 img = new Laya.Image("atlas/comp/image.png"); img.x = i * 512; pa...

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

516. DOM元素-视频 [ 76%]

...画布上的对齐参照物 let reference = new Laya.Sprite(); Laya.stage.addChild(reference); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设...

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

517. 3D场景-地形场景 [ 76%]

...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_示例 发布时间: 20251209

518. 求绘制遮罩会引起黑屏的解决办法 [ 76%]

... this.vmask.graphics.drawPie(0, 0, 20, -90, 270, "#000000"); this.progress.addChild(this.progressvalue); this.progressvalue.mask = this.vmask;   this.changevalue = function(value) { this.targetvalue = value; target = parseInt(360 * value - 90);  this.vmask.graphics.clear(); if(target == -90){ //th...

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

519. 设置滤镜(JavaScript-LayaAir基础篇(JS)-位图) [ 76%]

...pe = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); return ape; } })(); ``` 在上面的代码中,我们创建了一个原始位图、一个红色滤镜效果位图、一个灰色滤镜效果位图。运行效果如图1所示: ![图1](img/1.png) (图1) ## 2...

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

520. 分享一下自己的屏幕适配方案 [ 76%]

... this.Img.x =0; this.Img.y =0; this.Img.url ="../game/1.png"; Laya.stage.addChild(this.Img); //获取图片初始x y轴坐标 this.ImgX=this.Img.x; this.ImgY =this.Img.y; this.layout(); Laya.stage.on(Laya.Event.RESIZE, this, this.layout); Laya.stage.on(Laya.Event.ADDED, this, this.layout);   layout...

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