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

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

861. 使用百度地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 42%]

...pDiv: any;// 包含百度地图的div容器 二、接着是构造函数: constructor() { Laya.init(1, 1); this.init(); // 使用高精度位置 Laya.Geolocation.enableHighAccuracy = true; Laya.Geolocation.watchPosition(Laya.Handler.create(this, this.updatePosition), Laya.Handler.create(this, this....

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

862. Button属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 42%]

... class GameMain{ //按钮资源路径 private skin:string = "button.png"; constructor() { //初始化引擎,设置宽高并开启WebGL渲染模式 Laya.init(600,400,Laya.WebGL); //设置舞台背景颜色 Laya.stage.bgColor = "#ffffff"; //加载资源成功后,执行onLoaded回调方法 Laya.loa...

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

863. 其他引擎的Demo-Example_21 [ 42%]

...colors[0]; private liveGraphics:Graphics; private canvasGraphics:Graphics; constructor() { Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.bgColor = "#3da8bb"; this.createCanvases(); Laya.timer.frameLoop(1, this, this.animate); Laya.stage.on('mousedown', this, this.onMouseDown); Laya.sta...

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

864. [LayaAir3]Laya3.x graphics.drawCurves 闪烁的问题 [ 42%]

...参考代码   export class CatmullRomSpline { private points: number[]; constructor(points: number[]) { if (points.length < 4 || points.length % 2 !== 0) { throw new Error("At least two points (four numbers) are required, and the total number of values must be even"); } this.points = points; } ...

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

865. 弹窗视图组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 42%]

...N_PADDING: number = 5; private assets: any[]; private dialog: Laya.Dialog; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { // 图片资源来自“引擎API使用示例” this.assets = ["resources/re...

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

866. UI-CheckBox [ 42%]

...ded)); })(); function onCheckBoxSkinLoaded() { var cb; for (var i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgCo...

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

867. 一个简单的跑酷曲面shader分享 [ 42%]

...adonly Z_Distance: number = Laya.Shader3D.propertyNameToID("u_ZDistance"); constructor() { super(); this.setShaderName("CustomCurveShader"); this.enableVertexColor = false; this.albedoColor = new Laya.Vector4(0.0, 0.0, 0.0, 0.0); this.xoffset = 15.0; this.yoffset = -15.0; this.zdistance = 200.0; } p...

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

868. laya.html.dom.HTMLIframeElement_API3.0 [ 42%]

...加载外并解析数据 Hierarchy HTMLDivElement HTMLIframeElement Index Constructors constructor Properties _extra _ownGraphics _scene _skinBaseUrl _url autoSize hitTestPrior mouseThrough name drawtocanvCtx Accessors active activeInHierarchy alpha blendMode cacheAs components contextHeight context...

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

869. 基础使用与构成 · LayaAir3.3 · 引擎文档 · LAYABOX [ 42%]

..., property } = Laya; @regClass() export class Script extends ItemBoxBase { constructor() { super(); } get dataSource(): any { return super.dataSource; } set dataSource(value: any) { super.dataSource = value; if (!value) return; //把数据源里的值,给到子节点属性 if (value.avatar) { let ...

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

870. 3D网格添加刚体后设置欧拉角出现位置错误 [ 42%]

...基础碰撞器)中运行即可: class PhysicsWorldBaseCollider{     constructor(){         //初始化引擎         Laya3D.init(0, 0);         //设置画布模式         Laya.stage.scaleMode = Laya.Stage.SCALE_FULL;         Laya.stage.screenMode = Laya.Stage.SCREEN_NONE...

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