Spawn Sprites on Desktop [Haxe Flixel] - openfl

I am trying to spawn sprites on the desktop, the same way you would in a regular HaxeFlixel State.
Kinda like the desktop goose from a while back.
I have already tried to do this effect with boarder-less windows but it just isn’t rendering sprites correctly.
I was woundering if anyone had a different solution to this problem!
Better example of what I mean:
This!
This video is a animation.
Thank you all!

You can use FlxSprite.
var sprite = new FlxSprite
https://api.haxeflixel.com/flixel/FlxSprite.html

Related

Rendering DOM elements onto webGL

I would like to render DOM elements (which im otherwise using React for) onto (for example) a plane in a 3D (WebGL -> Three.js -> Three Fiber (??? so far best way to go about it as im figuring?)) environment.
So basically Id have my containing my entire app lets say rendered, as is traditional, into "root" element. Except I want to inject a layer in that utilizes Three Fiber to render and everything I might want my site (or even just a particular component) to contain onto this plane. Allowing one to make a react site as normal and behind the scenes (probably in index.js or intermediate file) would instead of being rendered "flat" against the screen i could "tilt" the entire site, give it opacity, maybe have multiple webpages all able to be shuffled like cards, sides of a dice, w/e tf.
If anybody has any suggestions im struggling with how one could go about this.
Im worried i might have to get kind of low-level (which im not totally against), but was hopeful there was some support for something of this nature. So far ive tried even having simple elements like an image element inside a material (element - via three fiber) or inside the mesh element (where the material would go) to no avail. Im just beginning to get my hands dirty but google hasnt availed me much for this project, so I turned to good ol' stack overflow for my first personal request! 🤯 😲 👹 !
Thanks in advance so much for your time and consideration - cheers,
John Thummel
this is possible using drei/Html. some impressions:
https://twitter.com/0xca0a/status/1398633764931178498
https://twitter.com/0xca0a/status/1407758860203573251

react-three-fiber display multiple skinned meshes on canvas

Hi coding wizards community. It's my first experience with react-tree-fiber. I have 3d skinned model which i have placed on canvas. Here is the sandbox. What I want to achieve is being able to place multiple character in the scene based on some event like a button press etc. So far, I could not find anything that could help me achieve my goal. Here is something that could have helped but I am unable to incorporate it in my code. Any help would be highly appreciated!
useLoader caches the data, so both instances are trying to run on the same model. that may work on geometries, but i don't think you can have two skinned meshes reference the same skeleton. not even sure if you can clone it, it looks like that's not possible in threejs.
so the solution is simple. just do it like you would in plain threejs. instead of useLoader load the gltf with the GLTFLoader. it executes two fetch requests, pulls and parses the model two times.
const [model, set] = useState()
useEffect(() => new GLTFLoader().load(url, set), [url])
return model ? <primitive object={model.scene} /> : null
demo: https://codesandbox.io/s/r3f-bones-7zw1c?file=/src/Stacy.js
otherwise i would pose the question differently or make a new one. try to clone the object in a useMemo and find out why it doesn't work. it should, so that could be a bug in threejs.
I’m not sure that the loader is the issue. The loaders work with static models but skinned meshes specifically seem to be the issue. I have tried replicating this approach without success. Also the example code sandbox crashes so a working example can’t be verified

Cycle2 - SwipeUp

I really need some help with this if anyone out there cares to be my life saver! I am using Cycle2 to do a feature and I am trying to apply swipe for iPad and iPhone. I have tried TouchSwipe, Wipetouch and the debugged version of CycleSwipe.
Here is the problem, my slider is Vertical and I want a SwipeUp and SwipeDown commend. I have spent a whole working day trying to get this and I just cannot get it working! Can anyone tell me how I can get a SwipeUp and Swipe down command for Cycle2? Also is it possible for the movement to be a little smoother?
My feature is using full bleed images.
I'm not too sure about, but I think it works: http://jquery.malsup.com/cycle2/demo/swipe.php
By the way, you can use Hammer.js to capture swipe gestures: http://eightmedia.github.io/hammer.js/
old question, but still.
I've made a patch a year ago to malsup's swipe plugin, that you can find here: https://github.com/walidvb/cycle2/commit/0c53a8972642ae90b865aae45d61f19aba807366#diff-0
That never made it to malsup's plugin unfortunately, but there you have it :)

Blender: export error root bone offset while exporting as Ogre mesh

I've recently started working with Blender. I've created a character with bones following different tutorials. But when I try to export it as Ogre mesh I get the error that the root bone has a location and rotation offset.
I've tried many solutions like ctrl+a->location, reset position, setting location and rotation to 0,0,0. But nothing seems to be working. As I couldn't export with animations I tried exporting the model without any movement at all. But I'm still getting the same error. I'm using blender 2.62 (i changed from 2.63 as it was giving erros like faces missing ..). Any suggestion is appreciated.
I also had this problem and tried different things in attempt to solve it. When I tried to correct an existing armature, it didn't bring any results. The only thing that worked for me is creating an armature from scratch, starting from a root bone and placing it correctly from the very beginning. Add a single bone, than press alt+G and alt+R to clear location and rotation. Then, adjust the position of the mesh, depending on where you want the your root bone to be. Then, extrude it further to make the entire armature, but don't change its position or location anymore. When done, parent armature to mesh.
I don't know if there are any other solutions, neither if this one is the best, but it worked for me.
Good luck!

Darg the screen in android device with MonkeyRunner?

I use python code as follow to horizontal drag the screen, but the device will response with long press event. I do not know why it is.I sincerely somebody could help me to solve this problem, thanks~!
Python code:
device.drag((380,520),(300,520),0.1,10)
I have the same issue with you in my application. My solution is just to disable the long press. Actually, what I found is not only for the 'drag', the onLongPress() would also be triggered by MoneyDevice.press(), then it fails to simulator the double-click by two calls to press().
After all, by disable Long-Press, the drag() and two press() work for me!

Resources