0.3.86 • Published 3 years ago

x-visual v0.3.86

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

MRT Support: npm

About

X-visual is a lib for data visiualization using Three.js for rendering.

Before v1.0, it's a part of a research project and a prototype of a comercial system used to verify and accumulate any usefull tech.

NPM Version

Currently there are two main branches:

  • master with even least minor version number for developing based on WebGL 2.

    	E.g, 0.3.52
  • webgl1 with odd least minor version number for legacy function support.

    	The latest branch version is 0.3.81.

Quick Start

    npm i x-visual

Start from the source

    git clone https://github.com/odys-z/x-visual.git
    # npm install webpack
    # npm i three
    npm i

test (without server)

X-visual using two ways to test.

html pages

This way needing clone from git repository like:

   git clone https://github.com/odys-z/x-visual.git

Then using webpack to transpile the tests.

There html test pages are located in test/html, which can be opened directly from local file system:

    test/html/index.html

Some of them are explained in docs/tests & examples

npm test

X-visual initially use Mocha for unit test, but is considering reducing test cases currently. So the "npm test" way is not always working.

The project uses Mocha and Chai for testing, imports like this.

    import chaiStats from 'chai-stats'

To build and test

    npm run build
    npm test

For installing and troubleshooting, there is a trying page may be helpful. See Mocha project example

  • debug tip

The Mocha & Chai test cases support debugging with Node:

    npm test -- --inspect --inspect-brk

Chrome will show the inspect list at

    chrome://inspect

See also [1] [2] [3]

Hello World

For ecs "hello world", try test/ecs.html. You should see something like this (v0.1.11)

ecs plain js example

  • tip

The html pages can be load from local file system if browser allow cross domain file access. Try (tested on Ubuntu):

    vim chrome
    # add this: google-chrome --allow-file-access-from-files --allow-file-access --allow-cross-origin-auth-prompt
    chmod +x chrome
    ./chrome

Since v0.3.56, some page can not been loaded without issue of CORS plus local files loaded from file system, due to the new version of browser's policies.

The testing page can be visited for runing python server at x-visual's root folder:

    python3 -m http.server 8000 --bind 127.0.0.1

Some Other Examples

  • Test Case: GLTFLoader (test/html/gltf-city.html)

  • Test Case: using html DOM as texture

To update rendering texture, use

    Htmltex.refresh();

see test/html/svg-canvas.html.

  • Test Case: Model Animization

  • Test Case: Particle Animation Script

Documents

All the documents are updating.

updating: Introduction, Guide & Reference

API jsdoc

Acknowledgement

Three.js

Note

Since v0.3.54, x-visual no longer directly depends on Three.js directly, via npm pacakge. It's using a forked and modified version of Three.js.

ECS - Powered by @fritzy/ecs

x-visual is a js ECS framework inspired by fritz's ecs-js. The ECS part of x-visual is modified from his source. See change log in x-visual depending package's README in packages/ecs-js.

extension: html2canvas

14 Jan. 2020:

According to it's README: "The script is still in a very experimental state".

So A tested working version is provided as packages/misc/html2canvas.esm.js

extension: Tween.js

Modified for adapting to ecs framework, together with unit tests.

Asset Resources

  • Low Poly City

Used by x-visual gltf loader test case, etc.

Referenced by Three.js tutorial: Three.js Loading a .GLTF File

Download: scene.gltf @ threejsfundamentals and together with referenced resources like scene.bin and textures/*.png.

or low poly city @ sketchfab

  • Simple Scene GLTF

Used by x-visual gltf mesh BuffereGeometry test case, etc.

Referenced by Gltf tutorial: A Minimal glTF File

  • Earth GLTF Assets

By Bisnessniper, Can be Downloaded @ CGTrader, licensed under Royalty Free License

It's texture also been used in another low polygon model.

  • Simple Route 66 Low Poly Scene

free 3D model by hj7880, download @ CGTrader, licensed under Royalty Free License.

0.3.86

3 years ago

0.3.82

3 years ago

0.3.81

3 years ago

0.3.80

3 years ago

0.3.78

3 years ago

0.3.76

3 years ago

0.3.74

3 years ago

0.3.72

3 years ago

0.3.70

3 years ago

0.3.68

3 years ago

0.3.66

3 years ago

0.3.64

3 years ago

0.3.63

3 years ago

0.3.62

3 years ago

0.3.60

3 years ago

0.3.58

3 years ago

0.3.56

3 years ago

0.3.53

3 years ago

0.3.52

4 years ago

0.3.51

4 years ago

0.3.50

4 years ago

0.3.44

4 years ago

0.3.43

4 years ago

0.3.41

4 years ago

0.3.40

4 years ago

0.3.39

4 years ago

0.3.38

4 years ago

0.3.37

4 years ago

0.3.36

4 years ago

0.3.35

4 years ago

0.3.31

4 years ago

0.3.34

4 years ago

0.3.33

4 years ago

0.3.32

4 years ago

0.3.30

4 years ago

0.3.29

4 years ago

0.3.28

4 years ago

0.3.27

4 years ago

0.3.26

4 years ago

0.3.25

4 years ago

0.3.24

4 years ago

0.3.23

4 years ago

0.3.22

4 years ago

0.3.21

4 years ago

0.3.17

4 years ago

0.3.15

4 years ago

0.3.12

4 years ago

0.3.11

4 years ago

0.3.8

4 years ago

0.3.9

4 years ago

0.3.10

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.40

4 years ago

0.2.39

4 years ago

0.2.38

4 years ago

0.2.37

4 years ago

0.2.36

4 years ago

0.2.35

4 years ago

0.2.34

4 years ago

0.2.33

4 years ago

0.2.32

4 years ago

0.2.31

4 years ago

0.2.30

4 years ago

0.2.28

4 years ago

0.2.27

4 years ago

0.2.26

4 years ago

0.2.25

4 years ago

0.2.24

4 years ago

0.2.23

4 years ago

0.2.22

4 years ago

0.2.21

4 years ago

0.2.20

4 years ago

0.2.19

4 years ago

0.2.18

4 years ago

0.2.17

4 years ago

0.2.16

4 years ago

0.2.15

4 years ago

0.2.14

4 years ago

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.1

4 years ago

0.2.2

4 years ago

0.1.22

4 years ago

0.1.21

4 years ago

0.1.20

4 years ago

0.1.19

4 years ago

0.1.18

4 years ago

0.1.16

4 years ago

0.1.17

4 years ago

0.1.15

4 years ago

0.1.12

4 years ago

0.1.10

4 years ago

0.1.11

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

5 years ago