summaryrefslogtreecommitdiffstats
path: root/o3d/samples
Commit message (Collapse)AuthorAgeFilesLines
* 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
* o3d-webgl: Adding oldschoolshadows sample.luchen@google.com2010-07-131-0/+277
| | | | | | Review URL: http://codereview.chromium.org/2924015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52210 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a TypeError bug introduced in the picking change. Cannot cancel event ↵luchen@google.com2010-07-121-1/+3
| | | | | | | | propagation if the event is cloned; need to cancel the original event object. Review URL: http://codereview.chromium.org/2962009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52115 0039d316-1c4b-4281-b951-d872f2087c98
* Box2d-3d demo ported to WebGL. Needed to strip some whitespace characters ↵luchen@google.com2010-07-1216-0/+6341
| | | | | | | | from the compressed box2d file to fix 'RangeError: Maximum call stack size exceeded' error in WebKit. Review URL: http://codereview.chromium.org/2845011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52110 0039d316-1c4b-4281-b951-d872f2087c98
* Adding checkers demo.luchen@google.com2010-07-121-0/+873
| | | | | | Review URL: http://codereview.chromium.org/2892004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52109 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented picking, at last. The picking sample is already checked in, but ↵petersont@google.com2010-07-0919-352/+983
| | | | | | | | to get the sample to draw the right thing required a bunch of ancillary bug fixes, also in this cl. Review URL: http://codereview.chromium.org/2874008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52021 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed race condition in O3D/WebGL FileRequest implementation by onlykbr@google.com2010-07-081-15/+14
| | | | | | | | | | | initiating download upon send(). BUG=none TEST=none Review URL: http://codereview.chromium.org/2903002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51909 0039d316-1c4b-4281-b951-d872f2087c98
* Made code which determines which side of contours to fill more robustkbr@google.com2010-07-072-3/+1
| | | | | | | | | | | | | | | | | | using new outgoing "ambiguous" parameter added to Skia XRay queries. Rolled forward Skia dependency to latest revision. With these changes the SVG butterfly renders correctly in O3D. Boosted polygon offsets again to avoid pixel dropouts. Also tested O3D canvas demos to verify no breakage with Skia roll-forward. BUG=none TEST=none Review URL: http://codereview.chromium.org/2813049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51791 0039d316-1c4b-4281-b951-d872f2087c98
* Changed definition of IntervalTree to contain closed, rather thankbr@google.com2010-07-062-0/+68
| | | | | | | | | | | | | | open, intervals, and changed back PathProcessor's AllSegmentsOverlappingY debug routine to report closed intervals. This fixes more rendering issues with the SVG butterfly. BUG=none TEST=samples/gpu2d/regression-tests/orientation-bug-3.html TBR=apatrick Review URL: http://codereview.chromium.org/2847049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51670 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed mismatch in fast and slow queries in overlap tests duringkbr@google.com2010-07-053-1/+69
| | | | | | | | | | | | | | | orientation determination which was causing assertion failures on some inputs. Avoided ray casting tests where results will not change decision of which side to fill. SVG butterfly is closer to rendering correctly with these changes but is still not 100% correct. BUG=none TEST=samples/gpu2d/regression-tests/orientation-bug-2.html TBR=apatrick Review URL: http://codereview.chromium.org/2862045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51643 0039d316-1c4b-4281-b951-d872f2087c98
* Adding 2d and hud-2d demos to samples. Small addition to state.js to ↵luchen@google.com2010-06-294-0/+1057
| | | | | | | | actually use the depthMask flag. Review URL: http://codereview.chromium.org/2830020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51192 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: adding shader test demo.luchen@google.com2010-06-2915-1/+1746
| | | | | | Review URL: http://codereview.chromium.org/2830003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51186 0039d316-1c4b-4281-b951-d872f2087c98
* Fix files with svn:executable permissions.thestig@chromium.org2010-06-233-0/+0
| | | | | | | BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50566 0039d316-1c4b-4281-b951-d872f2087c98
* Adding instancing and render target demos. luchen@google.com2010-06-179-2/+1839
| | | | | | | | Note: json scene for yard.o3dtgz; replaced this with teapot. (How much effort does it take to generate yard json scene?) Also, the instancing demos run sluggishly. (Limitation of JS?) Review URL: http://codereview.chromium.org/2714013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50158 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: Adding WebGL version of the pingpong game.luchen@google.com2010-06-173-0/+846
| | | | | | Review URL: http://codereview.chromium.org/2857002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50156 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: adding billboard demo.luchen@google.com2010-06-173-0/+401
| | | | | | Review URL: http://codereview.chromium.org/2863001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50155 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: adding generate-texture demo, with implementation of texture.set.luchen@google.com2010-06-172-37/+341
| | | | | | Review URL: http://codereview.chromium.org/2821004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50154 0039d316-1c4b-4281-b951-d872f2087c98
* Got the yard and seven_shapes models to convert to pure-json. This would ↵petersont@google.com2010-06-172-18/+39
| | | | | | | | have been trivial, it turns out, except one little bug where if there weren't other files mentioned in the json, it didn't finish loading. Added some comments to smooth things over. Review URL: http://codereview.chromium.org/2861004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50138 0039d316-1c4b-4281-b951-d872f2087c98
* o3d-webgl: vertex shader and vertex animation demos.luchen@google.com2010-06-163-0/+637
| | | | | | Review URL: http://codereview.chromium.org/2821003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50006 0039d316-1c4b-4281-b951-d872f2087c98
* Modified the function o3djs.quaternions.rotationToQuaternion() to address a ↵petersont@google.com2010-06-161-7/+42
| | | | | | | | | bug where the identity matrix was generating a bad quaternion. bug = http://code.google.com/p/o3d/issues/detail?id=224 Review URL: http://codereview.chromium.org/2822006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49872 0039d316-1c4b-4281-b951-d872f2087c98
* Do not init v8 on platforms where it is not supported. maf@google.com2010-06-151-4/+9
| | | | | | | Prevents hang on Safari 5/Mac OS X 10.6. Review URL: http://codereview.chromium.org/2866003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49860 0039d316-1c4b-4281-b951-d872f2087c98
* Adding render-mode demo. Update to client.js to render only if render mode ↵luchen@google.com2010-06-152-2/+290
| | | | | | | | is continuous. Review URL: http://codereview.chromium.org/2729016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49752 0039d316-1c4b-4281-b951-d872f2087c98
* Adding handlers to zoom in/out on scrollwheel event.luchen@google.com2010-06-093-8/+47
| | | | | | | | | | Questions: - Is deltaY the correct field in which to store this event value? - Is the 'wheel' addEventListener hook broken in the first place? Doesn't work for me on OSX, but might be working in Windows/Linux and don't know if this change would break it for those. - It is necessary to cancel event bubbling for the onmousewheel event? Review URL: http://codereview.chromium.org/2456004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49305 0039d316-1c4b-4281-b951-d872f2087c98
* Adding wireframe light indicator to shadow map demo.luchen@google.com2010-06-093-11/+11
| | | | | | Review URL: http://codereview.chromium.org/2718003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49304 0039d316-1c4b-4281-b951-d872f2087c98
* Adding debugging demo to o3d-webgl collection. Includes minor bug fix in ↵luchen@google.com2010-06-086-52/+319
| | | | | | | | param_object (removeFromArray fails because collection is an object, not an array). Review URL: http://codereview.chromium.org/2716001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49192 0039d316-1c4b-4281-b951-d872f2087c98
* Adding support for pointlist, linelist, linestrip, trianglestrip and ↵luchen@google.com2010-06-083-5/+423
| | | | | | | | triangelfan primitive drawing types. Demo file included. Review URL: http://codereview.chromium.org/2645003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49173 0039d316-1c4b-4281-b951-d872f2087c98
* Converted four more demo files to o3d-webgl: juggler, sobel, julia and ↵luchen@google.com2010-06-074-0/+1351
| | | | | | | | texturesamplers. Review URL: http://codereview.chromium.org/2690002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49101 0039d316-1c4b-4281-b951-d872f2087c98
* Adding WebGL-ized rotatemodel.html demo.luchen@google.com2010-06-031-0/+250
| | | | | | Review URL: http://codereview.chromium.org/2483002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48869 0039d316-1c4b-4281-b951-d872f2087c98
* Porting the Phong Shader demo to WebGL.luchen@google.com2010-06-031-0/+345
| | | | | | Review URL: http://codereview.chromium.org/2503001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48868 0039d316-1c4b-4281-b951-d872f2087c98
* Adding WebGL-ified version of the customcamera.html demo.luchen@google.com2010-06-021-0/+456
| | | | | | Review URL: http://codereview.chromium.org/2439003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48682 0039d316-1c4b-4281-b951-d872f2087c98
* Until we work out why V8 refuses to work on the Safari/10.6 combination, ↵maf@google.com2010-05-291-0/+24
| | | | | | | | | ignore attempts to select the V8 engine on that config. This makes everything work. w00t! Review URL: http://codereview.chromium.org/2361003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48549 0039d316-1c4b-4281-b951-d872f2087c98
* Changed how checkers sample identifies whether a hit occurred usingkbr@google.com2010-05-281-2/+4
| | | | | | | | | | | | | | | clientId rather than object equality. In both Safari and Chrome, if the browser's JavaScript engine is used rather than O3D's embedded V8, these equality comparisons fail. It looks like we may need to disable the use of the embedded V8 for this sample due to bad interactions with event dispatching. BUG=none TEST=none Review URL: http://codereview.chromium.org/2334001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48451 0039d316-1c4b-4281-b951-d872f2087c98
* Some texture parameters were being set in the pack when the texture was ↵petersont@google.com2010-05-242-97/+210
| | | | | | | | created by calling pack.createTexture2D or pack.createTextureCUBE. Moved that code into Texture class. Review URL: http://codereview.chromium.org/2117003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48078 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored Buffer and Field getAt functions to use a common helper function, ↵petersont@google.com2010-05-242-27/+38
| | | | | | | | avoiding redundant code. Review URL: http://codereview.chromium.org/2081002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48071 0039d316-1c4b-4281-b951-d872f2087c98
* The z-sorting sample looked tinted gray because of the final alpha channel ↵petersont@google.com2010-05-193-6/+16
| | | | | | | | copying to the screen. Fixing this revealed that the sort was actually broken in a different way as well, so I fixed that, too. Review URL: http://codereview.chromium.org/2074015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47606 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a typo in pool code and made comments more google stylepetersont@google.com2010-05-174-19/+29
| | | | | | | Implemented ParamObject.removeParam and ParamObject.copyParams. Minor style change in primitive.js. Review URL: http://codereview.chromium.org/2083004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47465 0039d316-1c4b-4281-b951-d872f2087c98
* Sorts drawlists by priority or by depth as indicated by the flag in the ↵petersont@google.com2010-05-174-7/+272
| | | | | | | | DrawPass. Review URL: http://codereview.chromium.org/2075003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47459 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored the SAS parameter code slightly to avoid redundant listing of ↵petersont@google.com2010-05-142-181/+170
| | | | | | | | parameter names. Review URL: http://codereview.chromium.org/2122002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47337 0039d316-1c4b-4281-b951-d872f2087c98
* When a demo on the o3d-webgl site gets opened in an ordinary browser that ↵petersont@google.com2010-05-142-11/+78
| | | | | | | | doesn't support WebGL yet, the error message just says "WebGL context not found". Now it provides a link with more information. Review URL: http://codereview.chromium.org/2099002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47312 0039d316-1c4b-4281-b951-d872f2087c98
* Added setLanguage functions to canvas, fps and particles. Added ↵amarinichev@chromium.org2010-05-0623-106/+7106
| | | | | | | | beachdemo-glsl and its shaders. Review URL: http://codereview.chromium.org/1894001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46579 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored event handling code gman added to simpleviewer.html intokbr@google.com2010-04-302-98/+130
| | | | | | | | | | | | | | client.js. Fixed bug where window.event was being overwritten, which for some reason broke key event handling in Firefox even though the event wrapper wasn't being used. Tested pool sample in Firefox, WebKit and Chromium. BUG=none TEST=none Review URL: http://codereview.chromium.org/1826002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46140 0039d316-1c4b-4281-b951-d872f2087c98
* Merged in gman's fixes to make o3d-webgl samples work in Firefox.kbr@google.com2010-04-306-14/+123
| | | | | | | | | | | | | Resized poolballs.png to power-of-two dimensions. Retested all o3d-webgl samples in top of tree Firefox, WebKit and Chromium. BUG=none TEST=none TBR=gman,petersont Review URL: http://codereview.chromium.org/1695031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46100 0039d316-1c4b-4281-b951-d872f2087c98
* Advancing to latest gyp.bradnelson@google.com2010-04-301-59/+4
| | | | | | | | Reverting 46012. Review URL: http://codereview.chromium.org/1815003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46082 0039d316-1c4b-4281-b951-d872f2087c98
* Incorporated gman's CSS changes for resizing and placing thekbr@google.com2010-04-301-6/+29
| | | | | | | | | | | instructions at the bottom of the page. BUG=none TEST=ran pool sample Review URL: http://codereview.chromium.org/1706020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46022 0039d316-1c4b-4281-b951-d872f2087c98
* Added pool ball image to MANIFEST.kbr@google.com2010-04-301-0/+1
| | | | | | | | | | BUG=none TEST=ran built pool sample TBR=petersont Review URL: http://codereview.chromium.org/1812006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46019 0039d316-1c4b-4281-b951-d872f2087c98