大约有 89 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0043 秒)
...需要显示Tips或属性的中文别名等完整功能需求 @property({ type: String, caption: "IDE显示用的别名", tips: "这是一个文本对象,只能输入文本哦" }) public text1: string = ""; //装饰器属性类型的简写方式,适用于只定义类型的需求 @property(String...
来源: Laya3.0_文档 发布时间: 20251010
...criptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); /...
来源: Laya3.0_文档 发布时间: 20241014
...criptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); /...
来源: Laya3.0_文档 发布时间: 20251105
...: true, extends: "Script", construct: { params: [ { "name": "testParams", "type": "string" } ] } }) export class TestBluePrint extends Laya.Script { constructor(testParams: string) { super(); } } (图12-1) 3.2 属性 在变量前使用装饰器的标识@bpProperty,在get和set前使用装饰...
来源: Laya3.0_文档 发布时间: 20251010
...er的名字,非.shader文件名字 name: ShaderName } Shader3D End shaderType:Shader类型(在2D Shader中,直接设定为2)。 Shader3D Start { shaderType:2 } Shader3D End 三、uniformMap uniform变量是着色器程序中的全局变量,在一次渲染过程中保持不变,由CPU端...
来源: Laya3.0_文档 发布时间: 20251010
...Laya; @regClass() export class NewScript extends Laya.Script { @property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图1-2所示: (图1-2) 1.2 3D节点...
来源: Laya3.0_文档 发布时间: 20251010
...vent.CLICK:string = "click"。CLICK 静态属性用于定义事件对象的type类型属性值为单击事件。这个事件是由鼠标点击触发后系统派发的事件,开发者也可以调用event()方法派发这些事件,如何派发事件会在下面的内容涉及。 (图2-2) 点...
来源: Laya3.0_文档 发布时间: 20251010
...ndom(), 0.3, getRangeRandom()); } } shader代码如下: Shader3D Start { type:Shader3D name:PBRColorBatchShader enableInstancing:true, supportReflectionProbe:true, uniformMap:{ u_AlphaTestValue: { type: Float, default: 0.5, range: [0.0, 1.0] }, u_TilingOffset: { type: Vector4, default: [1, 1, 0, 0...
来源: Laya3.0_文档 发布时间: 20251010
...名字,实际为Shader3D对象的名称 name: ShaderName } Shader3D End type Shader类型 目前LayaAir仅支持Shader3D类型,考虑后续支持Compute Shader等高级Shader类型 Shader3D Start { type:Shader3D } Shader3D End 3.uniformMap Uniform是一种从CPU中的应用向GPU中的着色器...
来源: Laya3.0_文档 发布时间: 20251010
...r3.0 Loader修改 1.1加载一个资源 示例: var url = "xxx.png"; var type = Laya.Loader.IMAGE; Laya.loader.load(url).then((res)=> { //不带类型,用于常规的资源 }); Laya.loader.load(url, type).then((res)=> { //带类型,用于区别同一后缀不同作用的资源。 //例...
来源: Laya3.0_文档 发布时间: 20251010