-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Created the Testing platforms [J/JS] - Tested out PlaceImg [J/JS] - Restructured codebase [JS] - Updated Image README to reflect changes
- Loading branch information
Showing
6 changed files
with
70 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.cwt.screen; | ||
|
||
import java.awt.Component; | ||
import java.awt.Graphics2D; | ||
|
||
import com.jslix.Screen; | ||
import com.jslix.image.ImgLibrary; | ||
|
||
/** | ||
* A playground for testing the different features of the program | ||
* | ||
* @author Carr, Crecen | ||
* @version 12.27.20 | ||
*/ | ||
|
||
public class TestBed extends Screen { | ||
|
||
private ImgLibrary imgLib; | ||
|
||
public TestBed() { | ||
imgLib = new ImgLibrary(); | ||
} | ||
|
||
@Override | ||
public void init() { | ||
imgLib.addImage("cwtargetapp.png"); | ||
} | ||
|
||
@Override | ||
public void update(int timePassed) { | ||
|
||
} | ||
|
||
@Override | ||
public void render(Graphics2D g, Component dthis) { | ||
g.drawImage(imgLib.getImage(0), 10, 10, dthis); | ||
imgLib.placeImg(g, 0, 20, 20, dthis); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { input, state, loop, view } from "./engine/screenstate.js" | ||
import * as jslix from "./engine/js/jslix.js" | ||
|
||
// Playground for testing out the features in the code | ||
|
||
export function init(){ | ||
jslix.addImage("./cwtargetapp.png") | ||
} | ||
|
||
export function update(){ | ||
|
||
} | ||
|
||
export function render(canvas, ctx){ | ||
ctx.drawImage(jslix.getImg(0), 10, 10); | ||
jslix.placeImg(ctx, 0, 20, 20); | ||
} |