大约有 178 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0050 秒)
...。 1. 使用getBounds/ getGraphicBounds。 ```typescript var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调...
来源: Laya2.0_文档 发布时间: 20210714
...ElementUsage.TEXTURECOORDINATE0 }; var uniformMap = { 'u_MvpMatrix': [Laya.Sprite3D.MVPMATRIX, Laya.Shader3D.PERIOD_SPRITE], 'u_WorldMat': [Laya.Sprite3D.WORLDMATRIX, Laya.Shader3D.PERIOD_SPRITE], 'u_texture': [CustomMaterial.DIFFUSETEXTURE_ID, Laya.Shader3D.PERIOD_MATERIAL] }; var customShader = La...
来源: Laya_社区 发布时间: 20170815
...displayClasspublic class AnimationPlayerBaseInheritanceAnimationPlayerBase Sprite Node EventDispatcher ObjectSubclasses Animation, FrameAnimation 动画播放基类,提供了基础的动画播放控制方法和帧标签事件相关功能。 可以继承此类,但不要直接实例化此类,因...
来源: laya_api 发布时间: 20170929
...1.3 资源卸载1.4 关于滤镜、遮罩二、渲染优化方式2.1 优化Sprite2.2 优化DrawCall2.3 优化Canvas2.4 CacheAs2.5 文字描边2.6 跳过文本排版,直接渲染三、减少CPU使用量3.1 减少动态属性查找3.2 性能消耗的回收3.3 获取显示对象边界的做法3.4 根...
来源: Laya3.0_文档 发布时间: 20251010
...eader(); reader.readAsDataURL(imgBlob); reader.onload = (e)=> { let sp1:Sprite = new Sprite(); //加载Base64图片数据 sp1.loadImage(e.target.result as string); this.owner.addChild(sp1); } }); 上述代码中,用 Laya.loader.fetch 加载图片二进制数据,根据自定义的规则,可...
来源: Laya3.0_文档 发布时间: 20230303
...Packagelaya.displayClasspublic class AnimationBaseInheritanceAnimationBase Sprite Node EventDispatcher ObjectSubclasses Animation, FrameAnimation 动画基类,提供了基础的动画播放控制方法和帧标签事件相关功能。 可以继承此类,但不要直接实例化此类,因为有...
来源: Laya2.0_api 发布时间: 20190513
...l, function(tex) { //使用纹理 var earth1 = scene.addChild(new Laya.MeshSprite3D(PrimitiveMesh.createSphere(5, 32, 32))); earth1.transform.translate(new Laya.Vector3(10, 20, -8)); var earthMat = new Laya.BlinnPhongMaterial(); earthMat.albedoTexture = tex; earthMat.albedoIntensity = 1; earth1.mesh...
来源: Laya2.0_文档 发布时间: 20210715
... and subtracts the offset of the cache rectangle. When false, it keeps the sprite's original relative position for drawing. * @param flipY Optional. If true, the texture will be flipped vertical. Default is false. * @param clearColor Optional. If provided, the texture will be cleared to this color b...
来源: Laya_社区 发布时间: 20250827
...sspublic class FrameAnimationInheritanceFrameAnimation AnimationPlayerBase Sprite Node EventDispatcher ObjectSubclasses EffectAnimation 关键帧动画播放类。 Public Properties Hide Inherited Public Properties Show Inherited Public Properties PropertyDefined By alpha : Number透明度,值...
来源: laya_api 发布时间: 20170929
...l, function(tex) { //使用纹理 var earth1 = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(5, 32, 32))); earth1.transform.translate(new Laya.Vector3(10, 20, -8)); var earthMat = new Laya.BlinnPhongMaterial(); earthMat.albedoTexture = tex; earthMat.albedoIntensity = 1; earth1...
来源: Laya2.0_文档 发布时间: 20210715