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

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

731. 滤镜-颜色滤镜 [ 54%]

...。let apePath = "res/apes/monkey2.png", apeTexture; class Filters_Color { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.sta...

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

732. 小游戏初始化黑屏 [ 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

733. 输入文本组件 · 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

734. 为啥静态变量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

735. 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

736. 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

737. 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

738. 屏幕适配-缩放-No Scale [ 54%]

... Laya.Stage; export class SmartScale_Scale_NOSCALE { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.dra...

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

739. 屏幕适配-缩放-No Border [ 54%]

...Laya.Stage; export class SmartScale_Scale_NOBORDER { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOBORDER; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.dr...

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

740. laya.d3.math.Rand [ 54%]

...:uint):voidseedsproperty public var seeds:Uint32Array获取随机种子。Constructor DetailRand()Constructorpublic function Rand(seed:uint) 创建一个 Rand 实例。 Parameters seed:uint — 32位无符号整型随机种子。 Method DetailgetByteFromInt()method public static function getByteFro...

来源: laya_api 发布时间: 20170929