大约有 22 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0050 秒)
...e: "MyTestSettingsType", properties: [ { name: "option1", type: "boolean", default: true }, { name: "option2", type: "string", default: "", } ] } ]); Editor.extensionManager.createSettings("MyTestSettings", "project", "MyTestSettingsType"); } createSettings的第一个参数是这个配置的名称...
来源: Laya3.0_文档 发布时间: 20251010
...方便识别,引擎API的组其实是2的N次幂值。 例如图2-1中的Default是2的0次幂,也就是1,而自己添加的npc组是2的2次幂,实际值是4,以此类推,分组ID为3的碰撞组实际值为8。 所以,如果我们不通过IDE来设置碰撞分组的话,引擎API的...
来源: Laya3.0_文档 发布时间: 20251010
...?: string; //资源类型。比如:Loader.IMAGE。 priority?: number; //(default = 0)加载的优先级,数字越大优先级越高,优先级高的优先加载。 group?: string; //分组,方便对资源进行管理。 cache?: boolean; //是否缓存 noRetry?: boolean; //是否重新尝试...
来源: Laya3.0_文档 发布时间: 20251010
...包含脚本的文本具有相同的主机名和端口。 * @param data (default = null)发送的数据。 * @param method (default = "get")用于请求的 HTTP 方法。值包括 "get"、"post"、"head"。 * @param responseType (default = "text")Web 服务器的响应类型,可设置为 "text"、...
来源: Laya3.0_文档 发布时间: 20251010
...信开发者工具中查看效果: const Layout = require("./engine.js").default; let sharedCanvas = wx.getSharedCanvas(); let sharedContext = sharedCanvas.getContext("2d"); // 使用XML格式的内容来描述开放数据域的界面,一般使用模板函数来构建 let template = ` <view i...
来源: Laya3.0_文档 发布时间: 20251010
...supportReflectionProbe:true, uniformMap:{ u_AlphaTestValue: { type: Float, default: 0.5, range: [0.0, 1.0] }, u_TilingOffset: { type: Vector4, default: [1, 1, 0, 0] }, u_AlbedoColor: { type: Color, default: [1, 1, 1, 1] }, u_AlbedoTexture: { type: Texture2D, options: { define: "ALBEDOTEXTURE" } }, u...
来源: Laya3.0_文档 发布时间: 20251010
..."spine4.1/role.json"; // 设置Spine动画数据源 this.spine.skinName = "default"; // 设置皮肤名称 this.spine.play("att", true); // 播放名称为"att"的攻击动画,true表示循环播放 this.btn.on(Laya.Event.CLICK, this, this.changeAttachment); //监听点击事件,触发切换武...
来源: Laya3.0_文档 发布时间: 20251128
...robe:true, shaderType:2, uniformMap:{ u_gradientDirection: {type: Vector2, default:[1,1]}, // 渐变方向 u_gradientStartColor: {type:Vector4, default:[1,1,1,1]}, // 渐变起始颜色 u_gradientEndColor: {type:Vector4, default:[1,1,1,1]} // 渐变结束颜色 }, attributeMap: { a_position: Vector4...
来源: Laya3.0_文档 发布时间: 20251120
...非0,可以照亮。 3.1.1 照亮指定层 LayaAir3-IDE默认提供一个Default层(值为0),假设我们新建一个Background层(值为1),要让灯光同时照亮这两个层,可以通过以下方式实现: 使用左移位运算获取各层的2次幂值 通过按位或运算组...
来源: Laya3.0_文档 发布时间: 20251010
...mal; } //Animal.ts const { regClass, property } = Laya; @regClass() export default class Animal { @property({ type : Number }) weight : number; } 上面的示例中,组件脚本MyScript中引用了自定义的Animal对象 ,并将装饰器属性标识的类型设置为Animal, 尽管Animal不是...
来源: Laya3.0_文档 发布时间: 20251010