javascript - How to get three.js sprite in Verold script -


First post on stack overflow ...

I'm playing with all three. JS based World Editor has some great features, but I have participated in a problem with scripting setup.

I am trying to implement one of three espressions () and attach it as a component of an object.

Here I have tried:

  Component.prototype.objectCreated = function () {// this.getThreeData () is available this.spriteimage.load ({load : _.bind (function () {this.createImageSprite ();}, this)}); }; Component.protipip.createimagestrateg = function () {// load spreadmage var map = this.spriteimage.threeData; Var spritematerial = new three.SpriteMaterial ({map: map, color: "RGB (255,0,0)", fog: true, use screen corridors: incorrect}); Var mySprite = new three. Light (phantom content); mySprite.scale.set (1,1,1); MySprite.location.x = 0.5; MySprite.location.y = 0.5; MySprite.location.y = 0.5; scene.add (mySprite); };   

The script has a feature called spriteimage , which is a fixed asset - & gt; 2D Texture

When this script is added as a component of the scene, the project runs, but you can not see a sprite at all.

I have tried to replicate it with success as a regular three. Code in JS project

Can anyone solve this?

Thanks

There are some small issues with your code. Otherwise, it works fine first, mySprite.location should be mySprite.position . Maybe three A previous version of JS used 'space'?

The second issue is not defined as the context of 'visual'. In a script, you can ask 'this.getThreeScene ()' to return to the context of the three assassins that it is part of the object which is attached to this script.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -