3Base
3d Web Application Engine
Install
yarn add 3base
Usage Example
Folder Scructure
.├── README.md├── package-lock.json├── package.json├── src│ ├── ExampleScene.js│ ├── index.js├── srv│ ├── assets│ │ ├── audio│ │ ├── images│ │ ├── models│ │ └── stylesheets│ ├── bundle.js│ └── index.html├── webpack.config.js└── yarn.lock
webpack.config.js
const path = ; moduleexports = node: fs: "empty" // Nedded For Ammo.js, webpack does weird things with node fs module... entry: app: './src/index.js' output: path: path filename: 'bundle.js' module: rules: test: /\.$/ exclude: /node_modules/ use: 'babel-loader' devServer: port: 10001 ;
index.html
Three Base Example
index.js
'use-strict'; ;; let manager = canvas: myCanvas;manager;
Scene1.js
'use-strict'; ; Scene { supermanager;// required this; // required } { this thismanager; this thismanager; this 0 0 -10 'assets/models/deadpool' 3 0 true } { let dl = this 1 200 0; dl; dl let skyColor = 0xe5efff; let groundColor = 0xecffd1; this skyColor groundColor 002; }