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

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

381. 没有预加载的图片怎么获取width和height ? [ 75%]

...();      older.loadImage("../laya/assets/comp/image.png");     Laya.stage.addChild(older);     console.log(older.scaleX,older.scaleY,older.rotation,older.x,older.y, older.width,older.height,older.getBounds().width,older.getBounds().height);      older.scale(2,2);     console.log(o...

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

382. 3D中摄像机绕物体旋转该如何实现? [ 75%]

...Distance = Vector3.distance(this.transform.position, this.AroundPos); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouse...

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

383. textInput的单行输入&多行输入(ActionScript-LayaAir基础篇(AS3)-文本) [ 75%]

...满的情况下在下一行输入。 ```java package { import laya.display.Stage; import laya.ui.TextInput; public class TextInput_Example { public function TextInput_Example() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景...

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

384. 官方新手游戏引导示例中关于hit和unHit的使用疑问 [ 75%]

...感觉用反了。hitArea = new HitArea(); hitArea.hit.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.hitArea = hitArea; guideContainer.mouseEnabled = true; hitArea.unHit.clear(); hitArea.unHit.drawCircle(step.x, step.y, step.radius, "#000000");我的理解是给父...

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

385. Tree属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 75%]

...件夹。 **示例代码:** ```javascript package { import laya.display.Stage; import laya.ui.Tree; import laya.utils.Browser; import laya.utils.Handler; import laya.utils.Utils; import laya.webgl.WebGL; public class UI_Tree { public function UI_Tree() { // 不支持WebGL时自动切换至Canvas L...

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

386. 官方案例里摄像机绕物体旋转脚本的问题 [ 75%]

...Distance = Vector3.distance(this.transform.position, this.AroundPos); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouse...

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

387. laya.ui.VBox [ 75%]

...设置为true后,会变灰并且禁用鼠标。UIComponent displayedInStage : Boolean[read-only] 表示是否在显示列表中显示。Node displayHeight : Number[read-only] 对象的显示高度(以像素为单位)。 Sprite displayWidth : Number[read-only] 对象的显示宽度(以像...

来源: Laya2.0_api 发布时间: 20190513

388. 请问graphics.drawTexture(texture)中如何增加一个matrix,只显示图中的一个圆形区域 [ 75%]

...g(miniMap); var miniMap1 = new Laya.Image(); miniMap1.loadImage(img); Laya.stage.addChild(miniMap1); } } miniMap.src=url;     function circle_image(img, oldImgWidth, oldImgHeight) { var width, height, canvas, contex, circle; if (img.width > img.height) { width = img.height; height = img.height;...

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

389. laya2.3图集含空白裁切后,锚点旋转bug,demo重现 [ 75%]

...中心反而是对的,这按理是bug吧         // sp3.pos(Laya.stage.width/2,0);         Laya.stage.addChild(sp3);         Laya.timer.frameLoop(2,null,function()             {                 sp3.rotation = sp3.rotation+10;           ...

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

390. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 75%]

...如下: ```typescript module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Texture = Laya.Texture; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class Sprite_DisplayImage { constructor() { // 不支持WebGL时自动切换至...

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