8000 GitHub · Where software is built 8000
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
app.onResize is constently being triggered even when no resizing is going on resulting in double vision for sprites sometimes. #9
Open
@BracerJack

Description

@BracerJack
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Booty 5</title>

<style type="text/css">
body
{
	background-color: #666;
	width: 1024px;
	height: 576px;
}
</style>

<script src="booty5_min.js"></script>

<script>
window.addEventListener("load", on_init);

function on_init(event)
{
	window.removeEventListener("load", on_init);

	//Initialize Booty5
	var app = new b5.App(document.getElementById("Booty5_Canvas"), true);
	b5.app = app;
	app.debug = true;
	app.target_frame_rate = 24;
	app.setCanvasScalingMethod(b5.App.FitBest);

	//Scene Stuff:
	var scene = new b5.Scene();
	scene.name = "main scene";
	app.addScene(scene);
	app.
	{
		trace ("Why is this constantly being triggered ?");
	}

	app.waitForResources();

	var actor = new b5.ArcActor();
	actor.fill_style = "rgb(80,20,255)";
	actor.radius = 30;
	actor.x = actor.y = 1;
	actor.vx = 1;
	scene.addActor(actor);
}

function trace(arg)
{
	console.log(arg);
}
</script>
</head>
<body>
<canvas id="Booty5_Canvas"></canvas>
</body>
</html>

Sometimes when you resize the browser, you will see "double vision" for the circle sprite...and also...is x = 0 suppose to be at the center instead of the top left which is the standard for Flash ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0