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

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

501. 如何启用摇一摇 [ 35%]

...updata(event:AccelerometerEvent):void { // TODO Auto-generated method stub const k:Number=5; var accX:Number=Math.round(event.accelerationX*k)/k; var accY:Number=Math.round(event.accelerationY*k)/k; var accZ:Number=Math.round(event.accelerationZ*k)/k; sum+=Math.abs(accX-oldAccX); sum+=Math.abs(accY-...

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

502. laya.utils.Byte [ 35%]

...| All Classes | Index | Frames No Frames ByteProperties | Methods | Constants Packagelaya.utilsClasspublic class ByteInheritanceByte Object Byte 类提供用于优化读取、写入以及处理二进制数据的方法和属性。 注意: Byte 类适用于需要在字节层访问数据的...

来源: laya_api 发布时间: 20170929

503. Sprite-屏幕截图 [ 35%]

...发语言、LayaAirIDE让项目开发更高效。class Sprite_ScreenShot { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; this.btnArr = ["res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png"]; this.nameArr = ["canvas截...

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

504. laya.maths.Rectangle [ 35%]

...l Classes | Index | Frames No Frames RectangleProperties | Methods | Constants Packagelaya.mathsClasspublic class RectangleInheritanceRectangle Object Rectangle 对象是按其位置(由它左上角的点 (x, y) 确定)以及宽度和高度定义的区域。 Rectangle 类的 x、y、width...

来源: laya_api 发布时间: 20170929

505. 屏幕适配-屏幕适配 [ 35%]

..."full", "fixedwidth", "fixedheight"], index = 0, txt; class SmartScale_T { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Image = Laya.Image, Text = Laya.Text; // 不支持WebGL时自动切换至Canvas Laya.init(550, 40...

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

506. laya.maths.Rectangle [ 34%]

...l Classes | Index | Frames No Frames RectangleProperties | Methods | Constants Packagelaya.mathsClasspublic class RectangleInheritanceRectangle Object Rectangle 对象是按其位置(由它左上角的点 (x, y) 确定)以及宽度和高度定义的区域。 Rectangle 类的 x、y、width...

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

507. 支付宝小游戏 · LayaAir3.0文档 · LAYABOX [ 34%]

...用资源,方法与web发布略有不同,加载代码示例如下: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } // 组件被激活后执行,此时所有节点和...

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

508. 图集动画(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 33%]

...tils.Handler; import laya.webgl.WebGL; public class HelloLayabox { private const AniConfPath:String = "../../../../res/role.atlas"; private var roleAni:Animation; public function HelloLayabox() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); L...

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

509. laya的ide如何import js并调用里面的类和方法?VS Code正常。 [ 33%]

...se strict"; Object.defineProperty(exports, "__esModule", { value: true }); const t = require("./test/TestExportClass"); // 程序入口 class GameMain { constructor() { // Laya.init(600,400); console.log("start"); var exportCls = new t.TestExportCls(); exportCls.callFunc(); } } new GameMain(); } htt...

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

510. VSCode高效开发工作流配置指南(TypeScript-IDE篇(TS)-代码模式基础) [ 33%]

...创建一个gulpfile.js脚本文件,脚本内容参照如下: ```json const {watch ,task } = require("gulp"); const {exec} = require("child_process"); function compile(cb) { //执行编译命令 layaair2-cmd compile let process = exec("layaair2-cmd compile"); process.stdout.on("data",(data)=>{ c...

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