Skip to content

my249645545/LibraryTemplate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installing

npm run install

Running

npm run start

Building

npm run build

The bundled js file will be saved in lib/gl.js

All usage and apis example could be found in src/js/app.js

Usage

import WebGLAnimation from 'lib/gl';

const webglAnim = new WebGLAnimation('assets/');
document.body.appendChild(webglAnim.canvas);

webglAnim = new WebGLAnimation('assets/', {});
webglAnim.on('onProgress', onProgress);
webglAnim.on('onLoaded', onLoaded);

function onProgress(e) {
	console.log('loading : ', e.percent);
}

function onLoaded(e) {
	//	all assets loaded
}

Public APIs

Pause WebGL rendering

webglAnim.pause()

Resume WebGL rendering

webglAnim.play()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.5%
  • SCSS 2.3%
  • GLSL 1.6%
  • HTML 1.6%