Giter VIP home page Giter VIP logo

indigocs-webgl-tutorials's People

Contributors

jakedanczyk avatar princessgod avatar sessamekesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

indigocs-webgl-tutorials's Issues

Using fetch().then() and Promises to avoid nested callback

Promises and fetch is one of ES6 features and should be used to chain asynchronously.

Here's an example:

Promise.all([
	loadText('shader/vs.glsl'),
	loadText('shader/fs.glsl'),
	loadJSON('sphere.json'),
	loadImage('tex/soccer.png'),
	loadImage('tex/crate.png')
]).then(([vertexShaderText,fragmentShaderText,sphereJson,soccerImage,crateImage])=>{
	let vertexShader = new Shader.VertexShader(gl).create(vertexShaderText);
	let fragmentShader = new Shader.FragmentShader(gl).create(fragmentShaderText);
	let shaderProgram = new ShaderProgram(gl).attachShader(vertexShader,fragmentShader);
	return Promise.all([
		new Ball(gl,shaderProgram,sphereJson,soccerImage),
		new Crate(gl,shaderProgram,crateImage)
	])
}).then(([soccerObj, crateObj]) => {
	ball = soccerObj;
	crate = crateObj;
	setTimeout(start,1000);
});

You can find the full code here

light visible from behind the walls

Hi Kamaron!

I watched your shadow mapping tutorial today, first of all, great job!

I have kind of a question/issue about your code.
I did the following:

  • turned the CULL_FACE off during rendering (only ON during _GenerateShadowMap).
  • then I moved the camera out of the room.
  • now if I look at the walls from outside, I still see the effect of lights and shadows.
    Is there any way to avoid this?

I am working on a project that has multiple rooms. I don't want the light from one room being visible in others which is logical. Project is for the university and I am not allowed to use 3rd party software (only glmatrix).

Many Thanks
Behzad

async doesn't seem to make

$ make
jshint lib/async.js test/*.js mocha_test/* perf/*.js
ERROR: Can't open test/*.js
lib/async.js: line 319, col 55, Functions declared within loops referencing an outer scoped variable may lead to confusing semantics. (running, callback, errored, replenish)

mocha_test/compose.js: line 24, col 36, Expected an assignment or function call and instead saw an expression.
mocha_test/compose.js: line 54, col 39, Expected an assignment or function call and instead saw an expression.
mocha_test/compose.js: line 55, col 42, Expected an assignment or function call and instead saw an expression.
mocha_test/compose.js: line 79, col 32, Expected an assignment or function call and instead saw an expression.

perf/memory.js: line 14, col 33, Functions declared within loops referencing an outer scoped variable may lead to confusing semantics. (async)

6 errors
make: *** [lint] Error 2

and test folder isn't even there...

$ ls
CHANGELOG.md	README.md	deps		lib		perf
LICENSE		bower.json	dist		mocha_test	support
Makefile	component.json	karma.conf.js	package.json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.