asdru
asdru
JCHJava Community | Help. Code. Learn.
Created by asdru on 12/22/2024 in #java-help
make github actions build artifact public
- name: Build
run: echo ${{ github.sha }} > Release.txt
- name: Test
run: cat Release.txt
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: Release.txt
- name: Build
run: echo ${{ github.sha }} > Release.txt
- name: Test
run: cat Release.txt
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: Release.txt
this part?
25 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 12/22/2024 in #java-help
make github actions build artifact public
name: Java CI with Maven

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'oracle'
- run: mvn --batch-mode --update-snapshots verify
- run: mkdir staging && cp target/*.jar staging
- uses: actions/upload-artifact@v4
with:
name: Runnable Jar
path: staging
name: Java CI with Maven

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'oracle'
- run: mvn --batch-mode --update-snapshots verify
- run: mkdir staging && cp target/*.jar staging
- uses: actions/upload-artifact@v4
with:
name: Runnable Jar
path: staging
how can i merge it with this 😅
25 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 12/22/2024 in #java-help
make github actions build artifact public
yeah that'd be ideal, i tried messing with the yml file but could figure out how
25 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 12/22/2024 in #java-help
make github actions build artifact public
push->build jar->upload jar as release
25 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 12/22/2024 in #java-help
make github actions build artifact public
i know how to do that manually, but i was hoping to find a way to automate the process?
25 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 12/22/2024 in #java-help
make github actions build artifact public
I mean change the yaml file so that it automatically publishes the artifact as a release
25 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 12/22/2024 in #java-help
make github actions build artifact public
Ohh ok But what if I wanted to make it a release
25 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 12/22/2024 in #java-help
make github actions build artifact public
25 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 12/19/2024 in #java-help
build javaFX jar from github via maven
i checked and have all the required dependencies in my pom.xml file, so i cant tell what im doing wrong here
7 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 10/24/2024 in #java-help
Optimizing draw function for texured triangle
thanks for the advice!
20 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 10/24/2024 in #java-help
Optimizing draw function for texured triangle
but i should test it further
20 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 10/24/2024 in #java-help
Optimizing draw function for texured triangle
its not super slow so far i have 50 triangles on my screen and its still running at 60fps
20 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 10/24/2024 in #java-help
Optimizing draw function for texured triangle
i tried lwjgl too but didn't like it since ur working with ints
20 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 10/24/2024 in #java-help
Optimizing draw function for texured triangle
lets say its a personal challenge and im trying to learn 3d graphics
20 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 10/24/2024 in #java-help
Optimizing draw function for texured triangle
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.BLACK);
g2.fillRect(0, 0, getWidth(), getHeight());


// Creazione del BufferedImage e del zBuffer
BufferedImage img = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
double[] zBuffer = new double[img.getWidth() * img.getHeight()];
Arrays.fill(zBuffer, Double.NEGATIVE_INFINITY);

// Draw the scene
//scene.draw(img,zBuffer);
GrassBlock gblock = new GrassBlock(0, 0, 0);
gblock.draw(img, zBuffer, new Camera(this.getWidth(), this.getHeight(), new Vertex(0, 500, 1000)));
g2.drawImage(img, 0, 0, null);
}
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.BLACK);
g2.fillRect(0, 0, getWidth(), getHeight());


// Creazione del BufferedImage e del zBuffer
BufferedImage img = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
double[] zBuffer = new double[img.getWidth() * img.getHeight()];
Arrays.fill(zBuffer, Double.NEGATIVE_INFINITY);

// Draw the scene
//scene.draw(img,zBuffer);
GrassBlock gblock = new GrassBlock(0, 0, 0);
gblock.draw(img, zBuffer, new Camera(this.getWidth(), this.getHeight(), new Vertex(0, 500, 1000)));
g2.drawImage(img, 0, 0, null);
}
do you know why this draws a cube but if i call the scene.draw method
public class RenderingScene {
private final RenderingPanel renderingPanel;
private Camera camera;
private final ArrayList<Cube> cubes = new ArrayList<>();

public RenderingScene(RenderingPanel renderingPanel) {
this.renderingPanel = renderingPanel;
this.camera = new Camera(renderingPanel.getWidth(), renderingPanel.getHeight(), new Vertex(0, 500, 1000));
this.cubes.add(new GrassBlock(0, 0, 0));
this.cubes.add(new Dirt(0, -100, 0));

}

public void update() {

}

public void draw(BufferedImage img, double[] zBuffer) {
for (Cube cube : cubes) {
cube.draw(img, zBuffer, camera);
}
}

}
public class RenderingScene {
private final RenderingPanel renderingPanel;
private Camera camera;
private final ArrayList<Cube> cubes = new ArrayList<>();

public RenderingScene(RenderingPanel renderingPanel) {
this.renderingPanel = renderingPanel;
this.camera = new Camera(renderingPanel.getWidth(), renderingPanel.getHeight(), new Vertex(0, 500, 1000));
this.cubes.add(new GrassBlock(0, 0, 0));
this.cubes.add(new Dirt(0, -100, 0));

}

public void update() {

}

public void draw(BufferedImage img, double[] zBuffer) {
for (Cube cube : cubes) {
cube.draw(img, zBuffer, camera);
}
}

}
it doesnt draw the cubes?
20 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 10/24/2024 in #java-help
Optimizing draw function for texured triangle
No description
20 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 10/24/2024 in #java-help
Optimizing draw function for texured triangle
If there's a better solution that involves built in functions im all ears but i couldn't find anything
20 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 9/19/2024 in #java-help
scanner blocking thread close
:shrugging:
24 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 9/19/2024 in #java-help
scanner blocking thread close
I switched to using a buffered reader since its nextline function isnt blocking and that fixed it
24 replies
JCHJava Community | Help. Code. Learn.
Created by asdru on 9/19/2024 in #java-help
scanner blocking thread close
I did try that and i still had the same issue
24 replies