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

大约有 3,990 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0091 秒)

2051. 绘制图形的BUG [ 68%]

...rite; import laya.utils.Tween; public class MyBox extends Sprite { private var _shape:Sprite; public function MyBox() { super(); graphics.drawRect(0,0,200,200,"#00ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"); addChild(_shape); //加上这句正常,反之则异常 //_sh...

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

2052. Laya中如何使用canvas [ 68%]

Laya中如何使用canvas 我是这么用的 var canvas = Laya.Render.canvas; var context = canvas.getContext('2d'); context.fillStyle = "#FF0000"; context.fillRect(10,10,100,100); 运行后没有报错,输出canvas和context都有值,但是绘制不生效,请问该如何使用canvas 2018-08-...

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

2053. layanative安卓端需要怎么添加ttf字体,需要增加两种字体? [ 68%]

...remember.ttf",new Handler(this,test)); }   private function test():void { var text:Text; text = new Text(); text.fontSize = 30; text.color = "#ff0000"; text.text = "你好"; text.pos(100, 100); Laya.stage.addChild(text);   text = new Text(); text.fontSize = 30; text.color = "#ff0000"; text.text = ...

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

2054. 位图字体的制作与使用(JavaScript-LayaAir基础篇(JS)-文本) [ 67%]

...``typescript //初始化引擎 Laya.init(550,400); //自定义文件名称 var mFontName = "diyFont"; var mBitmapFont = new Laya.BitmapFont(); //这里不需要扩展名,外部保证fnt与png文件同名 mBitmapFont.loadFont("res/test.fnt",new Laya.Handler(this,onLoaded)); function onLoaded(){ ini...

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

2055. laya.d3.math.BoundSphere [ 67%]

...ndSphere  toDefault():voidBoundSphereProperty Detailcenterpropertypublic var center:Vector3包围球的中心。radiusproperty public var radius:Number包围球的半径。Constructor DetailBoundSphere()Constructorpublic function BoundSphere(center:Vector3, radius:Number) 创建一个 BoundSphere...

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

2056. laya.d3.component.AttachPoint [ 67%]

...生变化后调度。Component3DProperty DetailattachBonespropertypublic var attachBones:Vector.<String>挂点骨骼的名称。matrixsproperty public var matrixs:Vector.<Matrix4x4>挂点骨骼的变换矩阵。Constructor DetailAttachPoint()Constructorpublic function AttachPoint() 创...

来源: laya_api 发布时间: 20170929

2057. 想用js写一个什么也不继承的类,但每次实例化这个类的时候会报错,是不是这个类写得不对呀 [ 67%]

...次实例化这个类的时候会报错,是不是这个类写得不对呀 var Test = (function(_super){ function Test(){         Test.super(this);         console.log("执行测试构造函数"); } //注册类 Laya.class(Test,"Test",_super); //获取执行域 var _proto = Test.prototype; //_...

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

2058. IOs使用手动删除本地资源再次进去加载问题 [ 67%]

... https://ask.layabox.com/question/16878 这个问题 function beginLoad(){ var res_array = [ {url : "res/atlas/loading.atlas", type : Laya.Loader.ATLAS}, {url : "res/atlas/person.atlas", type : Laya.Loader.ATLAS}, {url : "loading/progress.png", type : Laya.Loader.IMAGE}, {url : "loading/progress$bar...

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

2059. 子弹添加了colliderShape后onUpdate移动,destroy会报错“Cannot read property 'getWorldTransform' of null” [ 67%]

...hSprite3D(m); this.Sn.addChild(bullet); bullet.addComponent(BulletScript); var bulletCollider = bullet.addComponent(Laya.PhysicsCollider); var bulletShape = new Laya.MeshColliderShape(); bulletShape.mesh = bullet.meshFilter.sharedMesh; bulletCollider.colliderShape = bulletShape; })) } }    子弹...

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

2060. 使用插件导出模型后,使用js加载ls文件,报错Laya.Scene.load is not a function [ 67%]

...Laya.Stage.SCREEN_NONE; Laya.Stat.show(); //加载插件导出的场景。 var scene = Laya.Scene.load("LayaScene_layaScene/layaScene.ls"); Laya.stage.addChild(scene); var camera = new Laya.Camera(0, 0.1, 1000); //加载到场景 scene.addChild(camera); 2018-11-07 添加评论 免费帖 --> 分享 ...

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