≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Can't Change Texture When Loading A Compile CCBJS
Posted by:
(you are not logged in)
Enter the missing letter in: "I?ternational"
(you are not logged in)
Text:
[quote][b]joel-few-io[/b] wrote: I'm loading the engine from a CCBJS file, created by a colleague: [code] var engine = startCopperLichtFromFile('3darea', '../coppercube/test.ccbjs'); [/code] I am able to successfully get the mesh node from the scene, but the texture in the WebGL view does not change: [code] engine.ingComplete = function() { var scene = engine.getScene(); sceneBillboard = scene.getSceneNodeFromName('myObject'); //type is MeshSceneNode sceneBillboard.getMaterial(0).Tex1 = engine.getTextureManager().getTexture('../path/to/myTexture.png', true); } [/code] I'm also trying to update the texture at every frame of a video feed, and I notice that inside of my draw loop, the texture I assign is getting reset: [code] // runs every frame of the web cam video function processFrame(){ console.log( window.sceneBillboard.getMaterial(0).Tex1.Name ); // "theOriginalTextureSetInCopperCube.png" sceneBillboard.getMaterial(0).Tex1 = engine.getTextureManager().getTexture('../path/to/myTexture.png', true); console.log( window.sceneBillboard.getMaterial(0).Tex1.Name ); // "myTexture.png" } // end of loop [/code][/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact