Recent Posts

Pages: [1] 2 3 ... 10
1
Hello everyone!
I use the Flare3d sdk in FlashDevelop to realise a swf application which shall be able to load variing collada files into a Viewer3D.
While embeding the Colladafile manually and loading it with the ColladaLoader the test runs just fine.
But I have an issue while loading a Colladafile embeded in a .property-file using the ColladaLoader.
First of all I created a .property file (named metadata.properties) and embeded the .dae file by using following syntax:
Model_1=Embed(source="../localpath/example.dae",mimeType="application/octet-stream")
Then I use it like this:
Code: [Select]
[ResourceBundle("metadata")]
public class Main extends Sprite
{
[...]
            public function Main():void
{
var rm:IResourceManager = ResourceManager.getInstance();
rm.localeChain = ['properties'];
for ( i = 0; i <= 6; i++){
var file:ColladaLoader = new ColladaLoader(XML(rm.getClass('properties', 'Model_' + i)), null, scene, "", false, Context3DTriangleFace.BACK);
obj = new Pivot3D();

file.parent = scene;

file.load();
         }
[...]
    }
}
At the moment I'm loading 6 Models,later it's meant to be a variing amount of nearly random Colladafiles. Thats why I tried solving it with the ResourceManager,so i can simply change the properties before compiling.
Now when I test-run the project I get an "TypeError: Error #1006: value is not a function."
for the load()-function of the ColladaLoader.
So I would like to ask wether it is even possible to embed .dae-files using the ResourceManager this way. I feel like I'm giving false input for the ColladaLoader constructor but I don't know how exactly...
I hope somebody can help me.

Thanks in advance!

Hans

[EDIT]
Just found out the
Code: [Select]
rm.getClass('properties', 'Model_' + i)
returns null so it's not a problem with the flare3d sdk at all! Propably I did something wrong with the properties. Maybe there is still someone out there who'll help me to figure out how to use the ResourceManager correctly.^^
2
Engine Library / Re: Buffer to BitmapData?
« Last post by Ariel Nehmad on July 29, 2017, 12:35:39 AM »
Before drawing, maybe try to clear the context buffer with alpha = 0.0

Code: [Select]
scene.context.clear( 0.0, 0.0, 0.0, 0.0 );

or if you're using the scene's one.

Code: [Select]
scene.clearColor.w = 0.0;
3
Engine Library / Re: Buffer to BitmapData?
« Last post by Dave on July 28, 2017, 04:10:13 AM »
Hi - thank you! I am using that, and it works however I don't seem to be able to get alpha channel? I'm no longer using that occlusion code and have just a scene with one model in it. I use drawToBitmapData to a transparent bitmapData, but get black where there is nothing. Can I get alpha there? Right now I just threshold that to get what I need, but it's an extra step I'd rather not have to take.
4
Engine Library / Re: Buffer to BitmapData?
« Last post by Ariel Nehmad on July 27, 2017, 07:38:25 AM »
Hi dave, try

Code: [Select]
scene.context.drawToBitmapData(bitmapData);
5
Engine Library / Buffer to BitmapData?
« Last post by Dave on July 27, 2017, 05:22:38 AM »
I have an occlusion model in my scene that is used like so:

Code: [Select]
						
scene.context.setColorMask(false, false, false, false);
var containers : Vector.<Pivot3D> = occlusionNodes;

var group : Pivot3D;

for(var i:int = 0; i < containers.length; i++) {
group = containers[i];
group.draw();
}

scene.context.setColorMask(true, true, true, true);


Is it possible to get a BitmapData of this colorMask?
6
Engine Library / Re: Verify Error - Scene3D
« Last post by Dave on July 27, 2017, 04:52:58 AM »
I figured it out. In AS Settings you have to expand the Flare3D SWC line you added to the Library Path. In there you need to change Link Type from 'External' to 'Merged into code'. Once I did that the verify error went away.
7
Engine Library / Verify Error - Scene3D
« Last post by Dave on July 26, 2017, 02:54:43 PM »
I own 2.7.1 commercial, but haven't used it in a while. I have a class path to the swc and I have the swc set in the library path in AS Settings.

Whenever I do a new Scene3D I get this verify error:

VerifyError: Error #1014: Class flare.basic::Scene3D could not be found.

I am importing flare.basic.Scene3D; at the start of my class as well.

I have tried switching commercial to trial swc and get the same thing. Just wondering what will cause this error...
8
User Showcase / Re: Soccer Games with Flare3D
« Last post by 59427c04a50c3 on June 15, 2017, 05:25:25 AM »
nice game i will play
joe root
9
Engine Library / Re: v.2.8.5 commercial version
« Last post by ray lei on May 27, 2017, 11:28:53 AM »
10
IDE and Tools / Re: Mac IDE 2.8.6
« Last post by Ariel Nehmad on April 27, 2017, 08:47:55 PM »
Pages: [1] 2 3 ... 10