3.0.29 • Published 3 months ago

visual-js v3.0.29

Weekly downloads
1
License
MIT
Repository
github
Last release
3 months ago

Visual-js

Version : 3.0.0

All new version begin with 3.0.0 for client, server/dev parts.

Join the chat at https://gitter.im/Visual-JS-game-engine/Lobby

Creator: Nikola Lukic zlatnaspirala@gmail.com

Full name: Visual-js game engine

Npm package: visualjs

This is JavaScript game engine (dev tools node.js / client js).

Installation and setup:

Use npm i for next folders:

  • /project/client,
  • /project/server,
  • /test-npm
npm i

You can use this project from this git repo or you can use it from npm services like in test-npm/ folder.

Run Dev Editor node.js

Add your paths in /server/config.js:

Config

module.exports = {
  VERSION : "3.0.0",
  PATH_OF_NODE_APP : "G:\\web_server\\xampp\\htdocs\\visualjs\\project\\server\\",
  PATH_OF_WWW :      "G:\\web_server\\xampp\\htdocs\\visualjs\\project\\client\\",
  EDITOR_PORT : "1013",
  DESTROY_SESSION_AFTER_X_mSECUNDS : 20000,
  SELF_HOST: {
    protocol: 'http',
    port: 80
  }
};

How to start simple host node.js:

npm run host

This is just a webserver for simple hosting in nodejs. No need for this if you use xamp for example.

How to build image resource node.js:

Just put new image in new folder -> (logo/someimage.png). After cmd npm run res engine will get meta data. This is not list for direct loading images. Build meta data for image/images. Now test in console RESOURCE.logo!

npm run res
or
node server/res.js

Note: Use this in develop/local mode only !!!

How to run editor node.js:

npm run editor
or
node server/editor.js
 This is editor to make possible concept of EDITOR-ON-PAGE.

Note: Use this in develop/local mode only !!!

How to pack final bundle node.js:

This will pack all scripts created from editor to the starter/visual.js folder.

npm run pack
or
node server/build.js

Editor use cache/ this folder for cache data -maybe you will need extra permission. In browser navigate to /client/ folder (index.html)

Use visual-js from npm service

Take a look at the test-npm/ folder. (test npm github link)https://github.com/zlatnaspirala/visualjs/tree/master/test-npm

You need to create config.js file with content:

module.exports = {
  VERSION : "3.0.0",
  PATH_OF_NODE_APP : "G:\\web_server\\xampp\\htdocs\\visualjs\\test-npm\\",
  PATH_OF_WWW :      "G:\\web_server\\xampp\\htdocs\\visualjs\\test-npm\\",
  EDITOR_PORT : "1013",
  DESTROY_SESSION_AFTER_X_mSECUNDS : 20000,
  SELF_HOST: {
    protocol: 'http',
    port: 80
  }
};

Replace PATH_OF_NODE_APP and PATH_OF_WWW with your own project folder path. For windows best try with \\ agenst \ like this G:\\web_server\\xampp\\htdocs\\

Main JS script (Client part web):

import { sys, ActivateModifiers, loadEditor, runEditor, loadEditorObjects } from 'visual-js';
ActivateModifiers();

// Run editor
runEditor();
loadEditor();

sys.DOM.CREATE_SURFACE("SURF", "examples", 100, 99.4, "DIAMETRIC");
examples.ENGINE.CREATE_MODUL("STARTER");
var smodul = examples.ENGINE.MODULES.ACCESS_MODULE("STARTER");

// This is preload gameobject , you can't manipulate with
// this game object in editor.
smodul.NEW_OBJECT("IamNewObject", 25, 50, 12, 25, 10);

// Run editor
loadEditorObjects();

I use browserify for building bundle: browserify test.js -p esmify > builds/examples.js

Example for editor:

let tools = require('visual-js-server');

let config = {
  VERSION : "3.0.0",
  PATH_OF_NODE_APP : "G:\\web_server\\xampp\\htdocs\\visualjs\\test-npm\\",
  PATH_OF_WWW :      "G:\\web_server\\xampp\\htdocs\\visualjs\\test-npm\\",
  EDITOR_PORT : "1013",
  DESTROY_SESSION_AFTER_X_mSECUNDS : 20000,
  SELF_HOST: {
    protocol: 'http',
    port: 80
  }
};

tools.editor(config);

Then open new terminal and run:

node editor.js

External licences in this project:

Disclaimer of warranty

'Visual js' is provided "as-is" and without warranty of any kind, express, implied or otherwise, including without limitation, any warranty of merchantability or fitness for a particular purpose. In no event shall the author of this software be held liable for data loss, damages, loss of profits or any other kind of loss while using or misusing this

3.0.29

3 months ago

3.0.27

6 months ago

3.0.28

6 months ago

3.0.23

1 year ago

3.0.24

1 year ago

3.0.21

1 year ago

3.0.22

1 year ago

3.0.25

1 year ago

3.0.26

1 year ago

3.0.18

2 years ago

3.0.19

2 years ago

3.0.9

2 years ago

3.0.12

2 years ago

3.0.4

2 years ago

3.0.13

2 years ago

3.0.3

2 years ago

3.0.10

2 years ago

3.0.2

2 years ago

3.0.11

2 years ago

3.0.1

2 years ago

3.0.16

2 years ago

3.0.8

2 years ago

3.0.17

2 years ago

3.0.7

2 years ago

3.0.14

2 years ago

3.0.6

2 years ago

3.0.15

2 years ago

3.0.5

2 years ago

3.0.0

2 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago