-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scene refactor #37
Scene refactor #37
Conversation
# Conflicts: # scene.js
mesh.js
Outdated
return image; | ||
} | ||
|
||
function loadImages(imageInfos, gl, mesh) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be moved into the Mesh class, along with loadImage
mesh.js
Outdated
} | ||
} | ||
|
||
function applyState(gl, program, globalState, localState) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless we want to add a context.js (not suggesting this), I'd just move applyState and disableState into the Mesh class too.
Looks really good to me! |
@abwood's comments have been addressed. |
Looks good to me. Thanks! |
This is a fairly large set of changes, but offers a number of key improvements.
Scene
andMesh
both sharedscene.js
.Mesh
was the larger class by far, and has been split off into its ownmesh.js
file.There's still work to do. This could be part of this PR or could be made as later PRs after this is merged.
CLAMP_TO_EDGE
andMIRROR_REPEAT
are not yet supported.mesh.js
are still global in scope and could be better belonging to either Mesh or Scene./cc @moneimne @snagy @abwood
(Note: Shader/GLSL code is un-touched here, only JavaScript changes.)