6.0.2-v65 • Published 3 years ago

@vf.js/vf v6.0.2-v65

Weekly downloads
88
License
MIT
Repository
github
Last release
3 years ago

不能直接使用!!!!

不能直接使用!!!!

不能直接使用!!!!

不能直接使用!!!!

不能直接使用!!!!

不能直接使用!!!!

Install

npm install @vf.js/vf
<script src="./node_modules/@vf.js/vf/dist/vf.js"></script> 

Basic Usage Example

// The application will create a renderer using WebGL, if possible,
// with a fallback to a canvas render. It will also setup the ticker
// and the root stage VF.Container.
const app = new VF.Application();

// The application will create a canvas element for you that you
// can then insert into the DOM.
document.body.appendChild(app.view);

// load the texture we need
app.loader.add('bunny', 'bunny.png').load((loader, resources) => {

    // This creates a texture from a 'bunny.png' image.
    const bunny = new VF.Sprite(resources.bunny.texture);

    // Setup the position of the bunny
    bunny.x = app.renderer.width / 2;
    bunny.y = app.renderer.height / 2;

    // Rotate around the center
    bunny.anchor.x = 0.5;
    bunny.anchor.y = 0.5;

    // Add the bunny to the scene we are building.
    app.stage.addChild(bunny);

    // Listen for frame updates
    app.ticker.add(() => {
         // each frame we spin the bunny around a bit
        bunny.rotation += 0.01;
    });
});
6.0.2-v65

3 years ago

6.0.2-v64

3 years ago

6.0.2-v62

4 years ago

6.0.2-v63

4 years ago

6.0.2-v61

4 years ago

6.0.2-v60

4 years ago

6.0.2-v58

4 years ago

5.3.3-v56

4 years ago

5.3.3-v57

4 years ago

5.3.3-v55

4 years ago

5.3.3-v54

4 years ago

5.3.3-v53

4 years ago

5.3.3-v52

4 years ago

5.3.3-v51

4 years ago

5.3.3-v50

4 years ago

5.3.3-v49

4 years ago

5.3.3-v48

4 years ago

5.3.3-v47

4 years ago

5.3.3-v46

4 years ago

5.3.3-v45

4 years ago

5.3.3-v44

4 years ago

5.3.3-v43

4 years ago

5.3.3-v42

4 years ago

5.3.3-v41

5 years ago

5.3.3-v40

5 years ago

5.3.3-v39

5 years ago

5.3.3-v38

5 years ago

5.3.3-v37

5 years ago

5.3.3-v36

5 years ago

5.3.3-v35

5 years ago

5.3.3-v34

5 years ago

5.3.3-v33

5 years ago

5.3.3-v32

5 years ago

5.3.3-v31

5 years ago

5.3.3-v30

5 years ago

5.2.4-v29

5 years ago

5.2.4-v28

5 years ago

5.2.4-v27

5 years ago

5.2.4-v26

5 years ago

5.2.4-v25

5 years ago

5.2.4-v23

5 years ago

5.2.4-v24

5 years ago

5.2.1-v20

5 years ago

5.2.1-v18

5 years ago

5.2.1-v17

5 years ago

5.2.1-v16

5 years ago

5.2.1-v15

5 years ago

5.2.1-v14

5 years ago

5.2.1-v13

5 years ago

5.2.1-v12

5 years ago

5.2.1-v9

5 years ago

5.2.1-v10

5 years ago

5.2.1-v8

5 years ago

5.2.1-v7

5 years ago

5.2.1-v6

5 years ago

5.2.1-v5

5 years ago

5.2.1-v4

5 years ago

5.2.1-v3

5 years ago

5.2.1-v2

5 years ago

5.2.1

5 years ago