Jump to content

Uncaught SyntaxError: Unexpected token <


Recommended Posts

Hi there! I really appreciate the pixi.js library; keep up the great work! :)


My app stopped working about 30 minutes ago, and I think pixi.js is the problem, as the same problem exists when I run the "basic" example:

<!DOCTYPE html><html>	<head>		<script src="pixi.js"></script>	</head>	<body>		<script>			var renderer = PIXI.autoDetectRenderer(800, 600,{backgroundColor : 0x1099bb});			document.body.appendChild(renderer.view);			// create the root of the scene graph			var stage = new PIXI.Container();			// create a texture from an image path			var texture = PIXI.Texture.fromImage('_assets/basics/bunny.png');			// create a new Sprite using the texture			var bunny = new PIXI.Sprite(texture);			// center the sprite's anchor point			bunny.anchor.x = 0.5;			bunny.anchor.y = 0.5;			// move the sprite to the center of the screen			bunny.position.x = 200;			bunny.position.y = 150;			stage.addChild(bunny);			// start animating			animate();			function animate() {				requestAnimationFrame(animate);				// just for fun, let's rotate mr rabbit a little				bunny.rotation += 0.1;				// render the container				renderer.render(stage);			}		</script>	</body></html>

The error when running the app is: "Uncaught SyntaxError: Unexpected token <

I am running v3.0.6 of pixi.js. I'm running a local WAMP 2.5 server. Any thoughts?
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...