当前位置: 首页>>代码示例>>Java>>正文


Java GwtApplication类代码示例

本文整理汇总了Java中com.badlogic.gdx.backends.gwt.GwtApplication的典型用法代码示例。如果您正苦于以下问题:Java GwtApplication类的具体用法?Java GwtApplication怎么用?Java GwtApplication使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GwtApplication类属于com.badlogic.gdx.backends.gwt包,在下文中一共展示了GwtApplication类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: screenshot

import com.badlogic.gdx.backends.gwt.GwtApplication; //导入依赖的package包/类
public void screenshot(String filename) {
	CanvasElement canvas = ((GwtApplication) Gdx.app).getCanvasElement();
	// base64 encoded PNG file using data URL encoding! send this to your server
	String dataUrl = canvas.toDataUrl("image/png");
	// just opening it in a new window, replace this with whatever you want to do with the data
	Window.open(dataUrl, "_blank", "");
}
 
开发者ID:DaanVanYperen,项目名称:ns2-scc-profiler,代码行数:8,代码来源:ScreenshotHelper.java

示例2: FileHandleStream

import com.badlogic.gdx.backends.gwt.GwtApplication; //导入依赖的package包/类
public FileHandleStream (String path) {
	super(((GwtApplication)Gdx.app).getPreloader(), path, FileType.Internal);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:4,代码来源:FileHandleStream.java

示例3: uploadPalette

import com.badlogic.gdx.backends.gwt.GwtApplication; //导入依赖的package包/类
@Override
public void uploadPalette(int width, int height) {
    Gdx.graphics.getGL20().glPixelStorei(GL20.GL_UNPACK_ALIGNMENT, 1);
    WebGLRenderingContext.getContext(((GwtApplication) Gdx.app).getCanvasElement()).texImage2D(GL20.GL_TEXTURE_2D, 0, GL20.GL_RGBA, width, height, 0,
            GL20.GL_RGBA,
            GL20.GL_UNSIGNED_BYTE, paletteBuffer);
}
 
开发者ID:neuroradiology,项目名称:TinyVoxel,代码行数:8,代码来源:GwtConfig.java

示例4: uploadSinglePalette

import com.badlogic.gdx.backends.gwt.GwtApplication; //导入依赖的package包/类
@Override
public void uploadSinglePalette(int paletteId) {
    Gdx.graphics.getGL20().glPixelStorei(GL20.GL_UNPACK_ALIGNMENT, 1);
    WebGLRenderingContext.getContext(((GwtApplication) Gdx.app).getCanvasElement()).texSubImage2D(GL20.GL_TEXTURE_2D, 0, 0, paletteId, Config.TINY_GRID_TOTAL, 1,
            GL20.GL_RGBA,
            GL20.GL_UNSIGNED_BYTE, tinyPaletteBuffer);
}
 
开发者ID:neuroradiology,项目名称:TinyVoxel,代码行数:8,代码来源:GwtConfig.java

示例5: create

import com.badlogic.gdx.backends.gwt.GwtApplication; //导入依赖的package包/类
@Override
public void create() {

	GwtGdxGraphics.init();
	GdxAssets.init("");
	CanvasAdapter.textScale = 0.7f;
	GLAdapter.init((GL) Gdx.graphics.getGL20());
	GLAdapter.GDX_WEBGL_QUIRKS = true;
	MapRenderer.setBackgroundColor(0xffffff);

	JsMap.init(mMap);

	if (GwtApplication.agentInfo().isLinux() &&
	        GwtApplication.agentInfo().isFirefox())
		GwtGdxGraphics.NO_STROKE_TEXT = true;

	MapConfig c = MapConfig.get();
	super.create();

	MapPosition p = new MapPosition();
	p.setZoomLevel(c.getZoom());
	p.setPosition(c.getLatitude(), c.getLongitude());

	MapUrl mapUrl = new MapUrl(mMap);
	mapUrl.parseUrl(p);
	mapUrl.scheduleRepeating(5000);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:28,代码来源:GwtMap.java


注:本文中的com.badlogic.gdx.backends.gwt.GwtApplication类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。