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

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

691. timeline播放完成Bug [ 66%]

timeline播放完成Bug class Sprite_DisplayImage { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH ...

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

692. [LayaAirIDE3]2d相机打包后问题 [ 66%]

...stick } from "./Joystick"; import { Player } from "./Player";  const { regClass, property } = Laya;  @regClass() export class Main extends Laya.Script {     @property({ type: Laya.Sprite })     public player: Laya.Sprite;      @property({ type: Laya.Sprite })     public joystick: Laya.Spr...

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

693. 在 tiledmap 插入一个精灵在上面 [ 66%]

...方的一个图层中。这个图层可以是对象层 也可以是格子 class GameInfo{ private tiledMap: Laya.TiledMap; private sp:Laya.Sprite;   constructor(){   console.info("start");   this.init(); } init():void{   Laya.init(800, 700, Laya.WebGL);   Laya.loader.load("res/atlas/images.atla...

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

694. 请大家帮助优化一下这个抛物线的代码 [ 66%]

...码  希望大家指正 https://my.oschina.net/u/659068/blog/1564002  class Ball extends Laya.Sprite{ private static cached:boolean = false; private body:Laya.Sprite; constructor(){ super(); this.init(); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); th...

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

695. WebSocket通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 66%]

...直接处理即可。 接收字符串数据的完整示例: const { regClass } = Laya; @regClass() export class WebSocketDemo extends Laya.Script { private socket: Laya.Socket; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.socket = new Laya.Socket(); // 注...

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

696. 官方LayaAir之灯光一节示例背景在微信里表现不一致 [ 66%]

...色背景。 开发环境:mac 1.7.16   源码如下: // 程序入口 class LayaAir3D { constructor() { //初始化微信小游戏 Laya.MiniAdpter.init();// 程序入口 //初始化引擎 Laya3D.init(0, 0, true); //适配模式 Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode ...

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

697. 2.0下资源加载和销毁内存问题 [ 66%]

...注:测试图片大小为640*1038,900K    先创建一个img实例 class bitmapimg extends Laya.Image //2.0版本 这里区别为export default class bitmap extends Laya.Image { private szurl:string="" constructor(url:string){ super() this.onUrlChangeHandler(url); } protected onUrlChangeHandle...

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

698. Cannot read property 'rayCast' of undefined [ 66%]

Cannot read property 'rayCast' of undefined export default class indexscene extends Laya.Script { constructor(){ super(); this.rotation = new Laya.Vector3(0, 0.01, 0); this.point = new Laya.Vector2(); this.ray = new Laya.Ray(new Laya.Vector3(),new Laya.Vector3()); //1.开启第四个参数 let conf...

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

699. laya.d3.math.native.ConchVector3_API3.0 [ 66%]

...Only exported Menu Globals "laya/d3/math/Native/ConchVector3" ConchVector3 Class ConchVector3 Vector3 类用于创建三维向量。 Hierarchy ConchVector3 Implements IClone Index Constructors constructor Properties elements ForwardLH ForwardRH NAN NegativeUnitX ONE UnitX UnitY UnitZ Up ZERO Accesso...

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

700. 物理引擎-牛顿摆 [ 66%]

...ya.Browser; import WebGL = Laya.WebGL; import Render = Laya.Render; export class Physics_NewtonsCradle { private stageWidth: number = 800; private stageHeight: number = 600; private Matter: any = Browser.window.Matter; private LayaRender: any = Browser.window.LayaRender; private mouseConstraint: any...

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