Some use PIXIJS

  I found pixijs in the country is simply a static soil ah, only a little bit weak can no longer faint voice.

  Here I am finishing up my use of some of the issues addressed in the process and may understand it, it is a point, rather than a complete example.

  First put net example Officer:  https://pixijs.io/examples-v4/#/demos-basic/container.js

    Document official website: http://pixijs.download/release/docs/PIXI.Application.html  (plain English, it is still a bit hard to read)

  

// create a sample 
new new PIXI.Application ({ 
	width: W, 
	height: H 
});

  This is a must

// Create a group of co-occurrence required for placing sprite 
new new PIXI.Container ({ 
		width: W, 
		height: H 
	});

  Switching the beginning of the scene do not understand, do not know how to handle it. The wizard is later learned packet, before the scene in order to achieve the control group was implicit handover.

// create a wizard, the wizard is that every resource. Our animation mainly operate it. If the entire group is then 
let sense_two_ticket = PIXI.Sprite.fromImage ( 'sense_two_ticket' )

  For some attributes used sprite (also using part of the group)

    anchor: An anchor point, the default is the upper left corner, it may be provided anywhere within the sprite, commonly used in the focus of the zoom.

    pivot: location of the center of rotation time, empathy anchor.

    position: positioned.

    width / height: width high.

  Remarks:

    1, I used pixijs I realized that 0xFFFFFF and FFFFFF is a color, just a 16-band, a string.

    2, I made reference to a friend of the project was to understand: This is her home:  http://www.chunling.online/#/

  Above is limited to personal understanding, rightly or wrongly.

Guess you like

Origin www.cnblogs.com/ningmin/p/11412170.html