-
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.
- Loading branch information
Showing
107 changed files
with
2,036 additions
and
858 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,43 @@ | ||
language: java | ||
jdk: | ||
- openjdk6 | ||
- openjdk7 | ||
- oraclejdk7 | ||
- oraclejdk8 | ||
|
||
# blacklist | ||
branches: | ||
except: | ||
- gh-pages | ||
|
||
# whitelist | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
- master | ||
- develop | ||
|
||
# Use the container-based infrastructure | ||
sudo: false | ||
|
||
cache: | ||
directories: | ||
- $HOME/.m2 | ||
- '$HOME/.m2/repository' | ||
- '$HOME/.sonar/cache' | ||
|
||
# Use to publish the gdx2d API Javadoc to the gdx2d website | ||
env: | ||
global: | ||
secure: Trl21W5O4XR8sTR9JPrYk4Rl/9j3CfbXLvFOWepQ8dcl5r90OeqUtBZvEygxzem1fqBGDHPryC/hSMoimac5YQj9J7PFqi15zQ4JhYNbg8zvpgfGk4tJwmJ+nBzz9TF6lkZQsRGwqpWYaSnv5BlL8fnuIRREe2FbHyCEZEcLeNk= | ||
# Publish the gdx2d API Javadoc to the gdx2d website | ||
# - secure: Trl21W5O4XR8sTR9JPrYk4Rl/9j3CfbXLvFOWepQ8dcl5r90OeqUtBZvEygxzem1fqBGDHPryC/hSMoimac5YQj9J7PFqi15zQ4JhYNbg8zvpgfGk4tJwmJ+nBzz9TF6lkZQsRGwqpWYaSnv5BlL8fnuIRREe2FbHyCEZEcLeNk= | ||
|
||
# Publish snapshots to Sonatype (CI_DEPLOY_USERNAME, CI_DEPLOY_PASSWORD) | ||
- secure: "kNBemLDqDCzTf0OUtBImE68EO6s4nhXM5fxn+iGfEtAk+W70KlV6L5BkKmAbmlI/iZqtwA13FMmj4cIK9gNDj0nydgDLuCUGRIbnYdOnxrVc6Ykkw0ja61aRtiFpJs/WWqIqrZOJqnp/f9pmx+s3QKnHvTndepqv8/LKEdfeYLQ=" | ||
- secure: "H4ipPQ5dP0P1hmRBXQSIvmgEgZS4YI8ZrRjl2pNKImJ3KVN+pM9Jft9+DxOC8kCbLyI6dPHRkNFIa5A2BWoWrj20nOz2fTBNtW/kJQReAALoCycMZilN5YXKFsPERSSfJpws2qXTfIZq9A1PwsfsNOgdUM3z58T5Zyp5rzoTzVg=" | ||
|
||
# SonarQube analysis (SONAR_TOKEN) | ||
- secure: "QY0AlaKUXRfzNGm5M9by4EV5PrZst7FFtLgpmk7WKj/fYgCrh5LAO3q49+OQn+rAoY7TsxZoF+KNtBC7Xdq0/9FzhYhGLXlsCZpvuc1NVU8qCSA1mNs1bkEadITVBguxQkNtL9C8mhBEXsWZ90t1QGBYUaXFtbnwd3yUv4ZbECA=" | ||
|
||
# Maven build only (test and gpg signature disabled) | ||
# Snapshots and releases are upload manually to Sonatype for now | ||
install: | ||
- mvn install -DskipTests=true -Dgpg.skip=true | ||
|
||
# Run the SonarQube analysis | ||
script: | ||
- .travis/sonar-analysis.sh | ||
|
||
# Publish snapshots to Sonatype | ||
after_success: | ||
- .travis/deploy-snapshot.sh | ||
|
||
# Do not generate the javadoc for each modules any more | ||
# after_success: | ||
# - ./.travis/publish-javadoc-api.sh |
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,13 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<servers> | ||
<server> | ||
<!-- | ||
Maven deploy settings for Travis | ||
OSSRH login and password must be encrypted and available in the environment. | ||
--> | ||
<id>ossrh</id> | ||
<username>${env.CI_DEPLOY_USERNAME}</username> | ||
<password>${env.CI_DEPLOY_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
</settings> |
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,25 @@ | ||
#!/bin/bash | ||
|
||
# Deploy a jar, source jar, and javadoc jar to Sonatype's snapshot repo. | ||
# | ||
# Adapted from https://coderwall.com/p/9b_lfq and | ||
# http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/ | ||
|
||
SLUG="hevs-isi/gdx2d" | ||
JDK="openjdk6" | ||
BRANCH="develop" | ||
|
||
set -e | ||
if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then | ||
echo "Skipping snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'." | ||
elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then | ||
echo "Skipping snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'." | ||
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
echo "Skipping snapshot deployment: was pull request." | ||
elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then | ||
echo "Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'." | ||
else | ||
echo "Deploying snapshot..." | ||
mvn deploy -DskipTests -Dgpg.skip --settings ./.travis/deploy-settings.xml | ||
echo "Snapshot deployed!" | ||
fi |
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,39 @@ | ||
#!/bin/sh | ||
# Exit on failure | ||
set -e | ||
|
||
# Adapted from https://github.com/bellingard/multi-language-project/blob/master/runSonarQubeAnalysis.sh | ||
# This assumes that the following variable is defined: | ||
# - SONAR_TOKEN => token of a user who has the "Execute Analysis" permission on the SQ server | ||
|
||
if [ "$TRAVIS_JDK_VERSION" != "openjdk6" ]; then | ||
echo "Skipping analysis: wrong JDK. Expected 'openjdk6' but was '$TRAVIS_JDK_VERSION'." | ||
|
||
# And run the analysis | ||
# It assumes that the project uses Maven and has a POM at the root of the repo | ||
elif [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then | ||
# => This will run a full analysis of the project and push results to the SonarQube server. | ||
# | ||
# Analysis is done only on master so that build of branches don't push analyses to the same project and therefore "pollute" the results | ||
echo "Starting analysis by SonarQube..." | ||
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -B -e -V \ | ||
-Dsonar.host.url=https://nemo.sonarqube.org \ | ||
-Dsonar.login=$SONAR_TOKEN | ||
|
||
elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN-}" ]; then | ||
# => This will analyse the PR and display found issues as comments in the PR, but it won't push results to the SonarQube server | ||
# | ||
# For security reasons environment variables are not available on the pull requests | ||
# coming from outside repositories | ||
# http://docs.travis-ci.com/user/pull-requests/#Security-Restrictions-when-testing-Pull-Requests | ||
# That's why the analysis does not need to be executed if the variable GITHUB_TOKEN is not defined. | ||
echo "Starting Pull Request analysis by SonarQube..." | ||
mvn clean package sonar:sonar -B -e -V \ | ||
-Dsonar.host.url=https://nemo.sonarqube.org \ | ||
-Dsonar.login=$SONAR_TOKEN \ | ||
-Dsonar.analysis.mode=preview \ | ||
-Dsonar.github.oauth=$GITHUB_TOKEN \ | ||
-Dsonar.github.repository=$TRAVIS_REPO_SLUG \ | ||
-Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST | ||
fi | ||
# When neither on master branch nor on a non-external pull request => nothing to do |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.metadata | ||
.gradle | ||
bin/ | ||
classes/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Ant build properties file for the gdx2d-demoDesktop project | ||
|
||
# Gdx2d library version | ||
gdx2d.version=1.2.1 | ||
gdx2d.version=1.2.2 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,49 @@ | ||
// in from the java side | ||
uniform sampler2D backbuffer; | ||
uniform vec2 resolution; | ||
uniform float time; | ||
uniform int enabled; | ||
uniform vec3 cameraPosition; | ||
uniform vec3 cameraAxis; | ||
uniform float cameraAngle; | ||
uniform float screenPlanDistance; | ||
|
||
//"in" varyings from our vertex shader | ||
varying vec4 vColor; | ||
varying vec2 vTexCoord; | ||
|
||
|
||
mat3 rotationMatrix(vec3 axis, float angle) | ||
{ | ||
axis = normalize(axis); | ||
float s = sin(angle); | ||
float c = cos(angle); | ||
float oc = 1.0 - c; | ||
|
||
return mat3(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, | ||
oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, | ||
oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c); | ||
} | ||
|
||
void main() { | ||
if(enabled == 1){ | ||
//Calculate the vector coming out from the camera to the pixel of the screen in the 3D space. | ||
vec3 pixelRay; | ||
pixelRay.xz = (gl_FragCoord.xy / resolution.xy)*vec2(1.0, -1.0) + vec2(-0.5, 0.5); | ||
pixelRay.y = screenPlanDistance; | ||
pixelRay *= rotationMatrix(cameraAxis,cameraAngle); | ||
|
||
//Calculate the colision point from the cameraPosition with the pixelRay, to the z plan. | ||
vec2 hitPosition = cameraPosition.xy + pixelRay.xy * (cameraPosition.z / pixelRay.z) + vec2(0.5, 0); | ||
|
||
//Graphic stuff | ||
hitPosition = hitPosition - floor(hitPosition); //Optional texture repeat | ||
vec4 me = texture2D(backbuffer, hitPosition); | ||
|
||
//final color | ||
gl_FragColor = me.rgba; | ||
} else { | ||
gl_FragColor = texture2D(backbuffer, gl_FragCoord.xy / resolution.xy); | ||
} | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+9.25 MB
...-demoDesktop/libs/gdx2d-desktop-1.2.1.jar → ...-demoDesktop/libs/gdx2d-desktop-1.2.2.jar
Binary file not shown.
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
Oops, something went wrong.