Giter Club home page Giter Club logo

lwf's People

Contributors

ahubanov avatar arbieo avatar delsystem32 avatar filwag avatar fum1h1ro avatar hiroyukihaga avatar keishake avatar kojinakamaru avatar splhack avatar stnguyen avatar tdoe avatar toolsp2002 avatar victor-pavlychko avatar wespc avatar yonekawa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lwf's Issues

How do LWF decide image name rule?

1
execute 'Publish for LWF' on Adobe FLASH,
make xxxxx.bitmap folder and export some png image files.

2
makes above image files and bytes data loaded unity.

3
run Unity preview..but display only white image(don't load png texture?).
After that , image file name change to 'xxxxx_0.png' , function well.

4
Next,
for example , 'test0.png' , 'test2.png' , 'test3.png' under putting Adobe Flash.
execute 'Publish for LWF' and make an easy rename 'xxxxx_0.png' , 'xxxxx_1.png' , 'xxxxx_2.png'.
and above image files and bytes data loadde unity.

But , seems to be afield from image order.

How do LWF decide image name rule?

Question: Playing a

I've been sent a pack of image sequences in form of JPEGs that I import to flash to animate it. I tried LWFS but it don't accept the published swf from Flash tool. Is there a workaround to play the SWF using only its frame information?

Question: Rendering Multiple LWFs Html5.

I've been attempting to render multiple LWFs using html5 without success for a while now.

The only result I've been able to achieve is attaching one LWF to another via ".attachLWF()", but using that technique I seem to loose the ability to sort the seperate LWFs on the z depth, so I can have the ability to determine which lwf is placed ontop of the other.

The main problem is when I try to render more then one LWF only the last lwf gets rendered.

Help would be much appreciated. The main parts of my code are: (this is just sorta pseudo code)

var lwfFileName = ["0.lwf", "1.lwf","2.lwf"]; //list of lwf files im using
var lwf = []; // Store an array of LWF objects
var lwfObjList = []; // Allows me to control position/scale properties of each individual LWF.

for (i in lwfFileName.length){
   lwfCache.loadLWFs( lwf:lwfFileName[i]  ,stage:myStage  ,onload:handleLoad)
}

function handleLoad(l) {
   lwf.push(l);
   lwfObjList.push(l.rootMovie);
}

function tick() {
   for (i in lwf){

      lwf[i].depth = i; // I assume this will overlay the the lwfs based on they're position in the array. Never was able to make this work.

      lwf[i].exec();
      lwf[i].update(); // because I disable update
      lwf[i].render();  // The main problem is here. Only one lwf gets rendered at the end on this loop.
   }
}

Unity - lwf scaling problem

Hi,

my main flash movieclip is created with several movieclip symbols:

image

When I export it with LWFS and load it in Unity, applying this code:

attached_movie = lwf.rootMovie.AttachMovie(linkage_name, linkage_name + "1");
attached_movie.Scale(0.0012f, 0.0012f);

and what happens is that in Unity each movieclip symbol gets its own Z position in world making it unusable:

image

without this "Scale" part it looks good but oversized:
image

One of the reasons of this scaling tryout is cause when I use the basic scaling of GameObject in Unity, image quality gets degraded drastically with decreasing a screen size - also, is there any other way of resize of lwf movie without losing on quality?

thank you on all of your help and keep up the good work!

error running swf2lwf.rb

trying to get texture atlas created with texturepacker working since we use LWF so much that the frame rate start to slow down... (too many draw calls probably).

Getting this error when trying to extract the PNG from the swf...anyone have any ideas?

zoomcrypt-macbook-pro:swf2lwf zoomcrypt$ ruby swf2lwf.rb -p /Users/zoomcrypt/Desktop/LWFS_work/piece_blue.swf
swf2lwf.rb:224:in export_png': uninitialized constant Img::ARGB8888 (NameError) from swf2lwf.rb:1037:inexport_png'
from swf2lwf.rb:4203:in block in swf2lwf' from swf2lwf.rb:4203:inmap'
from swf2lwf.rb:4203:in swf2lwf' from swf2lwf.rb:4250:in

'

Unity - AddMovieEventHandler acting strange

Hi everyone,

I have a strange behavior while using this code:

iHeadCount = (int)Mathf.Floor(UnityEngine.Random.Range(1,8));
lwf.AddMovieEventHandler("head", postLoad:(mov2) =>{
mov2.GotoFrame(iHeadCount);
});

iHeadCount is a frame number representing the different head (max 8 frames) on one of my characters.

What happens is that it doesn't get called every time - I instantiate 10 of those characters and I get headless ones :)

Strange is that it's random, sometimes I get 4 with heads and 6 without and I can't pinpoint what I did wrong...

Thank you for your great support!

LWF & memory costs

Hello,

We have noticed that using an LWF animation seems to cost a large amount of memory, but we aren't sure why.

We have one LWF animation with about 3.5 mb worth of textures, but when it is added to the scene, memory goes up by about 20 mb.

Another animation has about 17.7 mb worth of textures, and raises the memory by 80 mb.

Has anyone experienced this before, or know any ways to lower the memory used when running an LWF animation?

  • Joe

Using Sprite Sheet

Can you please help me ?

I am trying to use sprite sheet, but I don't quite get how it works.

this is what i have gotten so far.

  1. Publish For LWF (using Adobe Flash CS6)
  2. Create new file in Flash and import all my png files
  3. Generate Sprite Sheet (using Adobe Flash CS 6)
  4. Use JSON file format
  5. Convert to UTF-8 (BOM) using K2editor (i am not sure about this part i don't know any japanese so its hard to tell if i converted right)
  6. then I justed copy all my files ,

test.swf, test_texture.json , test_texture.png to LWFS_WORK to make the converting happen,

but it seems like it's only using test.swf...

can you help me out thank you so much :)

help me plz!

what's happend....

NullReferenceException: Object reference not set to an instance of an object
LWF.Movie..ctor (LWF.LWF lwf, LWF.Movie parent, Int32 objId, Int32 instId, Int32 matrixId, Int32 colorTransformId, Boolean attached, LWF.MovieEventHandlers handler) (at Assets/Plugins/core/lwf_movie.cs:130)
LWF.LWF.Init () (at Assets/Plugins/core/lwf_core.cs:282)
LWF.LWF..ctor (LWF.Data lwfData, IRendererFactory rendererFactory) (at Assets/Plugins/core/lwf_core.cs:181)
LWFObject.Load (System.String path, System.String texturePrefix, System.String fontPrefix, Single zOffset, Single zRate, Int32 renderQueueOffset, UnityEngine.Camera camera, Boolean autoUpdate, System.Func2 lwfDataCallback, System.Action1 lwfLoadCallback, System.Action1 lwfDestroyCallback, System.Func2 lwfDataLoader, System.Func2 textureLoader, System.Action1 textureUnloader) (at Assets/Plugins/wrapper/LWFObject.cs:190)
Simple.Start () (at Assets/Simple.cs:10)

Problem with NGUI Extension

NGUI v.2.5.0
Error:
Assets/Plugins/UILWFObject.cs(6,28): error CS0246: The type or namespace name `UIWidget' could not be found. Are you missing a using directive or an assembly reference?

change symbol method?

Is there anyway to change the lwf animation by symbol name?
For example
i need symbol name "wait" work 3 seconds for loop,More than 3 seconds change to symbol "attack" and not want loop, just one time.

by the way,how to set animation loop or not....

[UIKit]LWFResourceCache::unloadLWFData does not finish by lock wait

Sometime, LWFResourceCache::unloadLWF does not finish because it waits for lock released.

I think that the problem is caused by this.

I tried to remove line of 193, the problem is fixed (I know it is dangerous)

one more question for attach movie and detach movie in the callback method..

void Start()
{
string dir = string.Format("{0}/", file_name);
string path = dir + file_name;
Load(path:path, texturePrefix:dir,enterFrame: enterFrameCallback);
lwf.rootMovie.AttachMovie("test","test",enterFrame:enterFrameCallback);
}

void enterFrameCallback( LWF.Movie movie )
{
if (movie.currentFrame == movie.totalFrames || !movie.playing) {
if(movie.name == "test"){
lwf.rootMovie.DetachMovie("test");
lwf.rootMovie.AttachMovie("test2","test2");
}
}

IT's worked but display erro.like this

InvalidOperationException: tree modified
System.Collections.Generic.RBTree+NodeEnumerator.check_version ()
System.Collections.Generic.RBTree+NodeEnumerator.MoveNext ()
System.Collections.Generic.SortedDictionary`2+ValueCollection+Enumerator[System.Int32,LWF.Movie].MoveNext ()
LWF.Movie.PostExec (Boolean progressing) (at Assets/Plugins/lwf/core/lwf_movie.cs:437)

NGUI 3

has anyone properly updated the UILwfObject to work with NGUI3 and how it handles depth sorting?

Unity - controlling subsymbol

Hi,

in Flash I have a subsymbol child_Sym with some tween motions that I add to my main symbol Parent_Sym.
Parent_Sym is used later in LWF via linkage name - but the problem is that I can control playback only of that Parent_Sym, but not the child_Sym in it.

Is there any way to control she child movieclip?

thank you very much for your answers!

Unity - issue with framerate

Hi,

I don't know why but regardless whether I use:

lwf.SetFrameRate(15);

it gets ignored by animation and it is played with some crazy fast rate.
I'm using it in this code:

public Camera camera;
void Start()
{
string dir = string.Format("{0}.swf/", "Canibals");
string path = dir + "Canibals";
Load(path:path, texturePrefix:dir, camera:camera);
lwf.SetFrameRate(15);
}

Any help would be much much appreciated!

thank you!

Texture Replacing?

I've been scouring the internet looking for how to go about this but for the life of me I can not get this to work. The scenario is I'd like to run my fancy script that replaces colors within a texture by creating a new texture. I would like LWF to use my new textures. I'm assuming I would use LWF.Format.TextureReplacement() however, I am completely at a loss on how or if this works?

Spritesheets again

Hi,
first of all thank you for this amazing tool set!!

Until now i was using LWF with single pngs, but since their count is increasing i'm now trying to use texture atlases.

Conversion seems to work (except the "is not rect" errors, that haven't been a problem with the single texture files)

but when i put everything in Unity (like in basic2), i get this error:

NullReferenceException: Object reference not set to an instance of an object
LWF.CombinedMeshRenderer.Factory..ctor (LWF.Data d, UnityEngine.GameObject gObj, Single zOff, Single zR, Int32 rQOff, UnityEngine.Camera cam, System.String texturePrfx, System.String fontPrfx, System.Func`2 textureLdr, System.Action`1 textureUnldr) (at Assets/Plugins/lwf/renderer/combinedmesh/lwf_combinedmesh_factory.cs:85)
LWFObject.Load (System.String path, System.String texturePrefix, System.String fontPrefix, Single zOffset, Single zRate, Int32 renderQueueOffset, UnityEngine.Camera camera, Boolean autoUpdate, System.Func`2 lwfDataCallback, System.Action`1 lwfLoadCallback, System.Action`1 lwfDestroyCallback, System.Func`2 lwfDataLoader, System.Func`2 textureLoader, System.Action`1 textureUnloader) (at Assets/Plugins/lwf/wrapper/LWFObject.cs:181)

What could be the problem?

Thanks in advance!

GotoAndPlay seems to show the first frame of the movie clip before performing goto label....

we are using LWF for Unity....the following code generally works but it seems to render the first frame of the movieclip before jumping to the label and continuing on....will investigate the unity renderer to see what is going on but curious if anyone has any idea or similar problem.

m_CurrentBossMovie = bossObj.lwf.rootMovie.AttachMovie(clipName, "walk01");
m_CurrentBossMovie.GotoAndPlay("angry");

[Windows 8 Apps Target Build] Error in LWFObject.cs LWFPlayer.cs (LINQ error)

I'm trying to build a game for windows 8 apps target build. Unity keeps complaining about these errors, perhaps due to removal of some linq features for windows 8 metro style app:

  1. Assets\Plugin\wrapper\LWFObject.cs(642,53): error CS0165: Use of unassigned local variable 'h'
  2. Some error complaints on use of now unsupported linq features for both LWFObject.cs and LWFPlayer.cs: 'System.Collections.Generic.List<>' does not contain a definition for 'ForEach' and no extension method 'ForEach' accepting a first argument of type 'System.Collections.Generic.List>' could be found (are you missing a using directive or an assembly reference?). The suggestion is to use simple foreach statement (http://stackoverflow.com/questions/15449160/list-foreach-not-found) to increase compatibility for new platforms such windows 8 metro apps.

Using perspective camera in Unity3D

We are working on 2.5D game and FLW gives us really nice workflow and excellent results except for parts of FLW animation change their Z index when the perspectiv camera is used. Is there some way to fix this? Maybe forcing the elements to be rendered on different distances from the camera?

LWF in Unity - how to detect when movie is done?

Hello! LWF has been super handy for me so far. The only thing I cannot figure out is how to detect when a movie is done playing. I see that I can add a fscommand to the fla, but I can't seem to figure out how to detect the event inside Unity.

view and animate in unity editor

unity very powerfull and handfull tool.
viewing lwf in editor window without runing scene - that wouldd be awesome.

p.s. also maybe "Play in Editor" checkbox to animate

NGUI extension error override?

I am using NGUI 2.6.5 with lwf extension
after I imported all the nessesary file, It throw this error :

no suitable method found to override OnUpdate()
no suitable method found to override keepMaterial
no suitable method found to override OnDrawSomething(can't remember)()

in UIBitmapFontLabel, UILWFObject, etc

my first try with lwf..

with sample flash animation (only with bitmap, motion tween and movie clip), I have tested lwf.
but it looks like bug on right leg.

bug_unity.png

Anyway I'd like to fix it, so can you point me which code is good to start debugging?
It must be helpful for me.

Thanks.

Switch Animation with label

Hello,

recently I am trying to switch animation by label,

luckly I found great example by you guys,

I took at look at the sample and follow exactly same step,

in Flash, and Unity,

when I did simple version with only two images,

it seems to work fine,

so I did it with much more complicated work,

but it just doesn't work , and I have no clue how to fix it.

I used exact same script and everything else in the unity,

do you think you can take a look at my flash file??

my flash file is at

https://www.dropbox.com/s/uj802oj27mh12eg/dragon02.zip

thank you so much for helping me out

(Unity) LWF.DrawMeshRenderer doesn't seem to work (multi layer swfs)

Hi,

We've been trying to get a fairly simple swf imported into Unity, and have been running into trouble. We've reduced the issue to having multiple layers in a swf. Github wont let me attach swfs, but I can forward 2 very simple test swfs if anyone wants.

A swf with a single layer goes through LWF.CombinedMeshRenderer and works fine.

A swf with two layers goes through LWF.DrawMeshRenderer and doesn't show anything (although no failure, error, or warnings are sent as far as I can tell).

I've dug into the code a little bit, but it's slow going with no working examples for LWF.DrawMeshRenderer.

How do buttons work with LWF

hi we are setting up for LWF for our game and have been succesfull with animations already. but when we added buttons to our flash they get lost in the conversion from SWF->bytes process. is there any information on how to set up buttons correctly in the flash file.

symbol question

"I assume that you want to create new instance of symbol in library by specifying symbol's name in runtime. Is this correct understanding?"

yes.would you tell me how to do that.If possible,I need a simple example...
thank you so much...

flickering with attach/detach movie clips

we are using different movie clips in the library to handle multiple animations for a character. we currently use detach/attaach to switch animations, but it seems that often times the character will flickr (render blank) for a frame when we are changing animations....

i guess there is some delay in the loading and rendering of the animation or the first frame sometimes renders blank?

the code is simple just:
LWFObject pieceObj = m_CurrentPiece.lwfObject;
m_CurrentPiece.lwfObject.lwf.rootMovie.DetachMovie(m_CurrentMovie);
m_CurrentMovie = null;
m_CurrentMovie = pieceObj.lwf.rootMovie.AttachMovie("surprise1", "surprise0", load:(m)=>{ m.Play(); } );

Is there sometihng we can do to avoid the flickering?
maybe we should be handling multiple animations a different way? we are going to try just putting them all into the root movie clip and using goto(label) instead.....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.