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

大约有 1,102 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0054 秒)

471. htmlDiv中img图片大小问题 [ 54%]

htmlDiv中img图片大小问题 // 程序入口 class GameMain{ constructor() { Laya.init(600,400); let htmlDiv = new Laya.HTMLDivElement(); let imgUrl = 'images/kb-emoji-U+E056.png'; // origin width/height: 64/64px; //let imgStr = `<img src="${imgUrl}" width="30" height="30"></img>`; l...

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

472. 小游戏初始化黑屏 [ 54%]

...gColor无效 Laya.MiniAdpter.init(); Laya.init(450, 800); class GameMain { constructor() { Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.stage.bgColor = "...

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

473. clearRes好像没作用,或许我的用法不对 [ 54%]

...,或许我的用法不对 刚才代码路径有误,更正如下     constructor() {         super();         Laya.stage.on(Laya.Event.KEY_UP, this, this.onKeyUp);     }     onKeyUp(e: Laya.Event) {         if (e.keyCode == 65) {//A             console.log("释...

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

474. 为啥静态变量name不能定义 [ 54%]

...Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'GFHomePageView'. 代码如下: export class GFHomePageView extends ui.GFGameHomeUI { static name = "homepageview"; static moreBgNodeName = "morebgnode"; static diamondList: any; static clickedWeixinClo...

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

475. 鼠标脚本(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 54%]

...class MouseScript extends Laya.Script3D{ private meshsp:Laya.MeshSprite3D; constructor(){super();} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(){ this.meshsp = this.owner as Laya.MeshSprite3D(); } //物体必须...

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

476. 输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

...te3D; @property( { type : Laya.TextInput } ) public txtin: Laya.TextInput; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.txtin.pos(Laya.stage.width >> 1, Laya.stage.height >> ...

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

477. laya.d3.core.material.Material_API3.0 [ 54%]

...aterial ExtendTerrainMaterial WaterPrimaryMaterial Implements IClone Index Constructors constructor Properties _id destroyedImmediately lock name renderQueue url uuid ALPHATESTVALUE DEBUG RENDERQUEUE_ALPHATEST RENDERQUEUE_OPAQUE RENDERQUEUE_TRANSPARENT SHADERDEFINE_ADDTIVEFOG SHADERDEFINE_ALPHATEST ...

来源: Laya3.0_api 发布时间: 20231115

478. ts怎么判断对象是否是某个类 [ 54%]

...// 声明数组[1,2,3]  alert(arr instanceof Array); // false  alert(arr.constructor === Array); // false    2017-11-02 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 sky_fly 相关问题 两个对象new了一个相同的对象,调...

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

479. RopeJoint代码动态创建 无法设置otherbody [ 54%]

...ya.Script {     static Fru:fruit;     public rope:Laya.RopeJoint     constructor() {         super();        fruit.Fru=this;             }      onAwake() {         let rig:Laya.RigidBody=this.owner.getComponent(Laya.RigidBody);         var lala=UIcontrol.FUI.bg.getComp...

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

480. 3D场景跳转到2D场景问题 [ 54%]

..../GameScene'; export default class VictoryScene extends VictorySceneUI {  constructor() { super();   } onAwake(){ let btnOnce=this.getChildByName("btnOnce"); btnOnce.on(Laya.Event.CLICK,this,this.onClick); } onClick(e){ this.removeSelf(); let gameScene=new GameScene(); Laya.stage.addChild(gameScen...

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