This file contains hidden or 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
data:text/html,<script> | |
fetch('https://api.github.com/repos/crashinvaders/gdx-texture-packer-gui/releases').then(response => { | |
response.text().then(responseText => { | |
let parsedResponse = JSON.parse(responseText); | |
let content = parsedResponse[0].assets.map(asset => ({ | |
file: asset.name, | |
downloads: asset.download_count | |
})); | |
let htmlContent = JSON.stringify(content, null, 4); | |
alert(htmlContent); |
This file contains hidden or 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
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.files.FileHandle; | |
import com.badlogic.gdx.graphics.*; | |
import com.badlogic.gdx.graphics.VertexAttributes.Usage; | |
import com.badlogic.gdx.graphics.glutils.FrameBuffer; | |
import com.badlogic.gdx.graphics.glutils.ShaderProgram; | |
import com.badlogic.gdx.utils.Disposable; | |
import com.badlogic.gdx.utils.GdxRuntimeException; | |
/** |
This file contains hidden or 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
#target photoshop | |
app.bringToFront(); | |
// This script exports Adobe Photoshop layers as individual PNGs. It also | |
// writes a JSON file which can be imported into Spine where the images | |
// will be displayed in the same positions and draw order. | |
// Copyright (c) 2012-2017, Esoteric Software | |
// All rights reserved. | |
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
This file contains hidden or 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
#target photoshop | |
app.bringToFront(); | |
// This script exports Adobe Photoshop layers as individual PNGs. It also | |
// writes a JSON file which can be imported into Spine where the images | |
// will be displayed in the same positions and draw order. | |
// Copyright (c) 2012-2017, Esoteric Software | |
// All rights reserved. | |
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
This file contains hidden or 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
import com.badlogic.gdx.ApplicationAdapter; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; | |
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; | |
import com.badlogic.gdx.graphics.Color; | |
import com.badlogic.gdx.graphics.GL20; | |
import com.badlogic.gdx.graphics.OrthographicCamera; | |
import com.badlogic.gdx.graphics.Pixmap; | |
import com.badlogic.gdx.graphics.glutils.ShapeRenderer; | |
import com.badlogic.gdx.math.MathUtils; |
This file contains hidden or 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
BitmapFont font = interfaceService.getSkin().getFont("default-font"); | |
GlyphLayout glyphLayout = new GlyphLayout(font, getString("langZhTw")); | |
final int w = MathUtils.ceil(glyphLayout.width + 2f); | |
final int h = MathUtils.ceil(glyphLayout.height + 2f); | |
OrthographicCamera cam = new OrthographicCamera(w, h); | |
cam.setToOrtho(false, w, h); | |
cam.update(); |
This file contains hidden or 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
-- | |
-- created with TexturePacker (http://www.codeandweb.com/texturepacker) | |
-- | |
-- {{smartUpdateKey}} | |
-- | |
-- local sheetInfo = require("mysheet") | |
-- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetInfo:getSheet() ) | |
-- local sprite = display.newSprite( myImageSheet , {frames={sheetInfo:getFrameIndex("sprite")}} ) | |
-- |
This file contains hidden or 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
#target photoshop | |
function main() { | |
if (app.activeDocument == null) { | |
alert("You should open some document to execute that script" + selectedLayers.length); | |
return; | |
} | |
selectedLayers = getSelectedLayers(); | |
if (selectedLayers.length == 0) { |
This file contains hidden or 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
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.graphics.Color; | |
import com.badlogic.gdx.graphics.Colors; | |
import com.badlogic.gdx.graphics.Pixmap; | |
import com.badlogic.gdx.graphics.Texture; | |
import com.badlogic.gdx.graphics.g2d.Batch; | |
import com.badlogic.gdx.math.Interpolation; | |
import com.badlogic.gdx.scenes.scene2d.Stage; | |
import com.badlogic.gdx.scenes.scene2d.actions.Actions; | |
import com.badlogic.gdx.scenes.scene2d.actions.SequenceAction; |
This file contains hidden or 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
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Path; | |
import android.support.annotation.NonNull; | |
import android.util.AttributeSet; | |
import android.widget.FrameLayout; | |
/** | |
* Frame layout that has rounded corners (it clips content too). |