Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux jsprime #724

Open
nanjizal opened this issue Feb 16, 2024 · 1 comment
Open

linux jsprime #724

nanjizal opened this issue Feb 16, 2024 · 1 comment

Comments

@nanjizal
Copy link

Huge

Is the current version of nme setup to work properly on Linux. Was thinking pop_os install.
Currently trying to run nmml and it's not finding the jsprime directory, have a feeling some stuff is setup wrong.

Specifically wanted to test https://github.com/nanjizal/pi_xy/blob/main/src/pi_xy/formats/NMEbitmapData.hx or similar. Locally I have some xml setup based on old projects and not getting a build. Got kicked from haxe discord, struggling to find much on nme these days, do you have forum or similar.

Best Justin

@nanjizal
Copy link
Author

in case your curious currently trying... ( not yet commited ).

package pi_xy.application;

import nme.display.Sprite;
import nme.events.Event;
import nme.display.Graphics;
import nme.display.BitmapData;

import pixelimage.Pixelimage;
import pixelimage.Pixelshape;

import pi_xy.Pixelimage;
import pi_xy.formats.Format;
import pi_xy.triangleGML.TriangleGML;

import pi_xy.formats.NMEbitmapData;

function main(): Void { Lib.current.addChild( new Grid() ); }
class TestNME extends Sprite {
    public function new(){
        super();
        
        var current = Lib.current;
        var stage = current.stage;
        viewSprite = new Sprite();
        var g = viewSprite.graphics;
        addChild( viewSprite );
        
        var pixelImage = new Pixelimage( 1024, 768 );
        pixelImage.transparent = true;
        pixelImage.simpleRect( 0, 0, pixelImage.width, pixelImage.height, 0xFF000000 );
        var parser = new TriangleGML( pixelImage );
        parser.addShape( backGround, 10, 10 );
        parser.addShape( aGrid,      10,   10 );
        var bitmapData = toNmeBitmapData( pixelShape );
        var bitmap = new Bitmap (bitmapData);
        addChild( bitmap );
        current.graphics.beginFill(0xFFFFFF, 1. );
        current.graphics.drawRect( 0., 0., 70., 40. );
        current.graphics.endFill();
        current.addChild( new nme.display.FPS() );
    }

    var backGround = 
    '<RectangleForm
        left = "-1"
        top = "-1"
        width = "3073"
        height = "2305"
        fill = "0xFF000203">
    </RectangleForm>';
    
    var aGrid = 
    '<LineGridShape
        left = "100"  top = "100"
        width = "2048" height = "1536"
        delta = "100" deltaH = "100"
        strokeColor="0xfF003300" strokeWidth="3">
    </LineGridShape>';
}

not happy with the xml approach but it's a start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant