summaryrefslogtreecommitdiffstats
path: root/o3d/samples
Commit message (Collapse)AuthorAgeFilesLines
* Moving o3d up a level, to get it out of chrome checkouts.bradnelson@google.com2011-03-28606-139491/+0
| | | | | | | | | | BUG=None TEST=None Too large for codereview. Manual review by thaloun and tschelcher. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79609 0039d316-1c4b-4281-b951-d872f2087c98
* o3djs: Fix closure compiler errors.pathorn@chromium.org2010-10-153-2/+3
| | | | | | Review URL: http://codereview.chromium.org/3769001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62680 0039d316-1c4b-4281-b951-d872f2087c98
* Multiple simple lights, and a new demo.pathorn@chromium.org2010-09-295-54/+544
| | | | | | Review URL: http://codereview.chromium.org/3358020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60900 0039d316-1c4b-4281-b951-d872f2087c98
* Changed code to eliminate ibeam cursor to only affect the canvas itself (not ↵petersont@google.com2010-09-221-25/+70
| | | | | | | | the whole document) and made option to leave ibeam cursor alone part of a new options argument to o3djs.webgl.makeClients / o3djs.webgl.createClients which replaces opt_features (which wasn't doing anything in o3d-webgl anway) and contains options on the client itself. Review URL: http://codereview.chromium.org/3358002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60219 0039d316-1c4b-4281-b951-d872f2087c98
* Tidied up types to appease doc generator script for new version of ↵petersont@google.com2010-09-164-198/+200
| | | | | | | | o3djs/math.js. I think this should also fix the currently broken tree. Review URL: http://codereview.chromium.org/3443007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59745 0039d316-1c4b-4281-b951-d872f2087c98
* o3djs: Recommit effect.js for skinning shader.pathorn@chromium.org2010-09-152-9/+86
| | | | | | | | Also fixes skinning error in FF4 when getParameter(MAX_VERTEX_UNIFORM_VECTORS) gives GL_INVALID_ENUM. Review URL: http://codereview.chromium.org/3348006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59469 0039d316-1c4b-4281-b951-d872f2087c98
* o3djs: usePluginMath should be false, only set if o3djs.math is defined.pathorn@chromium.org2010-09-141-8/+8
| | | | | | | TBR=petersont Review URL: http://codereview.chromium.org/3411002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59332 0039d316-1c4b-4281-b951-d872f2087c98
* Replaces matrix math functions in o3d-webgl with a new library that uses ↵petersont@google.com2010-09-1325-2053/+5513
| | | | | | | | | | 1-dimensional arrays to represent matrices instead of 2-dimensional arrays. This is a duplicate of Daniel Horn's change http://codereview.chromium.org/3072008 for committal. Review URL: http://codereview.chromium.org/3273004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59268 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Assume 4 in case Float32Array is missing BYTES_PER_ELEMENT.pathorn@chromium.org2010-09-031-1/+2
| | | | | | | | BUG=233 TEST=Examples which use primitives work in FF4b4 Review URL: http://codereview.chromium.org/3349004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58462 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes the build for o3d.gman@chromium.org2010-08-313-2/+3
| | | | | | | | | TEST=it builds BUG=none Review URL: http://codereview.chromium.org/3217016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58073 0039d316-1c4b-4281-b951-d872f2087c98
* This is a change that Daniel Horn did as part of this: petersont@google.com2010-08-291-34/+25
| | | | | | | | | | http://codereview.chromium.org/3072008 I don't see why it can't be a separate, short changelist. Review URL: http://codereview.chromium.org/3215005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57810 0039d316-1c4b-4281-b951-d872f2087c98
* Added createDrawElements to Transform class. One more function in the API.petersont@google.com2010-08-291-2/+10
| | | | | | Review URL: http://codereview.chromium.org/3167046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57809 0039d316-1c4b-4281-b951-d872f2087c98
* Added capability for an error (default) cube map texture, so if a cube ↵petersont@google.com2010-08-297-121/+308
| | | | | | | | sampler doesn't have a texture associated with it, it doesn't choke WebGL. Review URL: http://codereview.chromium.org/3162048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57808 0039d316-1c4b-4281-b951-d872f2087c98
* Determines which shading language o3djs should use once when the client is ↵petersont@google.com2010-08-297-395/+137
| | | | | | | | installed, sets things appropriately in effect.js and other files which generate shaders appeal to effect.js to determine how to generate the right shader. Review URL: http://codereview.chromium.org/3166038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57807 0039d316-1c4b-4281-b951-d872f2087c98
* When the client is created, it sets a couple event callbacks to an empty ↵petersont@google.com2010-08-291-0/+8
| | | | | | | | function so that when you click and drag on the HTML canvas, it doesn't act like you're selecting text. Review URL: http://codereview.chromium.org/3106029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57806 0039d316-1c4b-4281-b951-d872f2087c98
* Added getter for field params on param object. (Just one more function in ↵petersont@google.com2010-08-291-0/+11
| | | | | | | | the API that got left behind) Review URL: http://codereview.chromium.org/3108052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57803 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a few minor issues.gman@chromium.org2010-08-271-5/+10
| | | | | | | | | | | | | | | | | | | | 1 is that Client objects are added to the global list of clients before they are ready. I just added a check that they are ready with if (this.gl) although we could change the code so they don't get added in the constructor but instead in initWithCanvas. Also added "webgl" as a context name. TEST=none BUG=none Review URL: http://codereview.chromium.org/3164044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57613 0039d316-1c4b-4281-b951-d872f2087c98
* Change the URL for when there is no WebGLgman@chromium.org2010-08-263-31/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an "official" url now. Over time it is supposed to be updated to auto redirect depending on the browser so Firefox would redirect to a Firefox upgrade page, Safari to a Safari upgrade page etc.. Also, make o3d-webgl run in IE6/7/8/9 at least to the point that it comes up with the message to get a browser that supports WebGL Also also note: There a 3 or more cases that need to be covered for WebGL apps Case #1: canvas doesn't exist at all. (IE6/7/8) Case #2: canvas does exist but there's no WebGL Case #3: canvas does exist, WebGL exists and should run but can't. (ie, don't tell the user to get new browser in this case) WebGL is being updated to give info so case #3 can be handled so we can update o3d-webgl when that's available. TEST=none BUG=none Review URL: http://codereview.chromium.org/3204014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57603 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Shader support for skinning.pathorn@chromium.org2010-08-1810-45/+469
| | | | | | | | | | Requires setting skinning in properly in o3djs/effect.js BUG=none TEST=o3d-webgl-samples/skinning.html runs much faster. Review URL: http://codereview.chromium.org/2873071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56558 0039d316-1c4b-4281-b951-d872f2087c98
* Converted o3d to use new types for floating point and integer arrays: ↵petersont@google.com2010-08-173-12/+9
| | | | | | | | Float32Array, Uint16Array et cetera. Review URL: http://codereview.chromium.org/3184007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56453 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Adding preliminary files for 'bubble blaster' demo.luchen@chromium.org2010-08-1313-0/+1735
| | | | | | Review URL: http://codereview.chromium.org/3123017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56110 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/3164012luchen@chromium.org2010-08-134-44/+111
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56071 0039d316-1c4b-4281-b951-d872f2087c98
* Adding implementations to two methods in texture.js and fixing a small typo/bug.luchen@chromium.org2010-08-121-32/+96
| | | | | | | I hacked two of the existing demos as a test to ensure the two new methods work (adding a small chunk of new code to them). Should these be included as brand new demos, or added to the existing demo (with a var doExtra = true/false switch), or should I try to make a brand new demo that exercises these methods? Review URL: http://codereview.chromium.org/3129010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55954 0039d316-1c4b-4281-b951-d872f2087c98
* Fix permissions to fix broken chromium tree.erg@google.com2010-08-124-0/+0
| | | | | | | | TBR=luchen,mirandac Review URL: http://codereview.chromium.org/3171004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55821 0039d316-1c4b-4281-b951-d872f2087c98
* WebGL bubble demo. Based off of: ↵luchen@chromium.org2010-08-1121-0/+2591
| | | | | | | | | http://code.google.com/p/o3d/source/browse/trunk/googleclient/o3d/?r=55#o3d/command_buffer/samples/bubble This demo adds dynamic ability to change the iridescence/noise textures, turn on/off the environment mapping, change the number of bubbles, bubble size/spin/thickness/etc. I also added a third texture that modulates the bubble geometry to get a pulsing effect (this could use some improvement but it's not bad). Review URL: http://codereview.chromium.org/3050048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55787 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes edge case where two components of the world ray are both 0.luchen@chromium.org2010-08-091-1/+1
| | | | | | Review URL: http://codereview.chromium.org/3013067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55476 0039d316-1c4b-4281-b951-d872f2087c98
* Changed primitive wireframe creation to be more correct, added to ↵petersont@google.com2010-08-092-50/+174
| | | | | | | | hellocube-wireframe.html to test. Review URL: http://codereview.chromium.org/3087013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55415 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Fix Matrix4AxisRotation by copying the last row.pathorn@chromium.org2010-08-081-0/+2
| | | | | | | | BUG=none TEST=kitty mesh loads Review URL: http://codereview.chromium.org/2873108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55372 0039d316-1c4b-4281-b951-d872f2087c98
* Deleting trailing spaces, add ending newline where missing to make lint ↵maf@chromium.org2010-08-0622-77/+72
| | | | | | | | happy. Also delete some commented out CSS, etc. Review URL: http://codereview.chromium.org/3083012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55162 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Adding support for triangle fan/strip in picking.luchen@google.com2010-08-052-7/+441
| | | | | | | TEST=picking-more.html demo Review URL: http://codereview.chromium.org/2805101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55017 0039d316-1c4b-4281-b951-d872f2087c98
* o3djs: Make bump shader code compile for webgl.pathorn@chromium.org2010-08-041-16/+23
| | | | | | | | | BUG=none TEST=collada mesh with bumpUV enabled and using the lambert shader. Review URL: http://codereview.chromium.org/3063018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55001 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Added remaining param_operation classes.pathorn@chromium.org2010-08-044-24/+174
| | | | | | | | | | | This CL adds the Matrix4Translation, Matrix4Scale and Matrix4AxisRotation, which are used by some collada meshes. BUG=none TEST=Convert and load an animated collada mesh. Review URL: http://codereview.chromium.org/3029050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54990 0039d316-1c4b-4281-b951-d872f2087c98
* Currently returns (e.g.) 32 if 16 is the input. Fix so it meets ↵luchen@google.com2010-08-021-0/+1
| | | | | | | | documentation: "Returns the smallest power of 2 that is larger than or equal to size." Review URL: http://codereview.chromium.org/3080020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54635 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: svn add vertex_source.jspathorn@chromium.org2010-07-311-0/+102
| | | | | | | | | | | Original review: http://codereview.chromium.org/3005015 BUG=none TEST=none TBR=luchen Review URL: http://codereview.chromium.org/3074019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54424 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Skin, SkinEval and VertexSource classes.pathorn@chromium.org2010-07-3011-20/+1067
| | | | | | | | | | This allows the basic sproingie skinning demo to work. BUG=none TEST=o3d-webgl-samples/skinning.html works Review URL: http://codereview.chromium.org/3005015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54397 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/2884048luchen@google.com2010-07-291-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54184 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/3047021luchen@google.com2010-07-281-3/+15
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54060 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Fixes errors when loading animated meshes in simpleviewer.pathorn@chromium.org2010-07-284-41/+55
| | | | | | | | | | Use setUpO3DParam_ instead of createParam so that the "o3d." names can be used by serialization.js; simpleviewer calls Pack.destroy which can fail. Implement o3d.Matrix4Composition. Typos in curve loading. Review URL: http://codereview.chromium.org/3020030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53985 0039d316-1c4b-4281-b951-d872f2087c98
* These changes are needed for when we turn on REAL gman@chromium.org2010-07-282-6/+12
| | | | | | | | | | OpenGL ES 2.0 GLSL and for the new texImage2D TBR=petersont@google.com Review URL: http://codereview.chromium.org/3035012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53898 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Adding particles demo to repository.luchen@google.com2010-07-271-0/+596
| | | | | | Review URL: http://codereview.chromium.org/3047004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53858 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Increasing the point size in shader to make points easier to see.luchen@google.com2010-07-271-1/+3
| | | | | | Review URL: http://codereview.chromium.org/3059005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53856 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Adjusting Sampler to throw an error if client attempts to use ↵luchen@google.com2010-07-273-10/+11
| | | | | | | | BORDER as uv address mode (not supported in WebGL). Review URL: http://codereview.chromium.org/3038014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53855 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a small typo; reported in: ↵luchen@google.com2010-07-271-1/+1
| | | | | | | | http://groups.google.com/group/o3d-discuss/browse_thread/thread/db4be6e10594af70?hl=en Review URL: http://codereview.chromium.org/3045017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53853 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Avoid computation per element if ParamParamArray is bound.pathorn@chromium.org2010-07-261-3/+4
| | | | | | | | BUG=none TEST=o3d-webgl-samples/convolution.html still works Review URL: http://codereview.chromium.org/2881037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53688 0039d316-1c4b-4281-b951-d872f2087c98
* Tweaked antialiasing function. Result looks good now in conjunctionkbr@google.com2010-07-241-2/+4
| | | | | | | | | | | | with multisampling. BUG=none TEST=none TBR=apatrick Review URL: http://codereview.chromium.org/3040018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53574 0039d316-1c4b-4281-b951-d872f2087c98
* Ported the Loop/Blinn shaders in samples/o3djs/gpu2d.js to GLSL to addkbr@google.com2010-07-241-91/+191
| | | | | | | | | | | | | | | | antialiasing support. Fixed build problems in GLES2 backend on Mac OS X. Tested updated gpu2d.js in Cg and GLSL versions of plugin. Note that multisampling must be turned on in order for the antialiasing to look good, and in particular O3D's Core Graphics and Core Animation backends on Mac OS X do not currently support this. BUG=none TEST=none TBR=apatrick,gman Review URL: http://codereview.chromium.org/2883038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53564 0039d316-1c4b-4281-b951-d872f2087c98
* Fix svn:executable permission for r53363.thestig@chromium.org2010-07-221-0/+0
| | | | | | | | | BUG=none TEST=check_perms goes green TBR=luchen Review URL: http://codereview.chromium.org/3061005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53380 0039d316-1c4b-4281-b951-d872f2087c98
* Adding WebGL version of the trends demo, including the original and new ↵luchen@google.com2010-07-2212-502/+2636
| | | | | | | | | | | | | particle versions. Differences in the non-particle version: * Switched the created energy texture from 3x32 (NPOT) to 4x32; made the energy shard width smaller. * In the shaders, added abs before the sqrt call to normalize behavior across CG/GLSL. Translated GLSL shader string in particles.js to be more human readable. Review URL: http://codereview.chromium.org/2934013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53363 0039d316-1c4b-4281-b951-d872f2087c98
* This adds four files ported from their C++ counterparts: animation.js, ↵pathorn@chromium.org2010-07-167-0/+2571
| | | | | | | | | | counter.js, curve.js and param_object.js. BUG= TEST=o3d-webgl-samples/animations.html works Review URL: http://codereview.chromium.org/2856032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52731 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented error texture support in client and ParamArray class. Fixed bug ↵luchen@google.com2010-07-1410-49/+1091
| | | | | | | | | in effect.js that broke checkerboard texture if running using CG shaders. TODO: Still a bug with render surface sets; will file issue and tackle problem in separate CL. Review URL: http://codereview.chromium.org/2803007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52248 0039d316-1c4b-4281-b951-d872f2087c98