mirror of
https://github.com/SamEyeBam/animate.git
synced 2025-12-16 10:41:05 +00:00
larry babby and threejs for glsl
This commit is contained in:
9
webGl/my-threejs-test/node_modules/glsl-token-string/.npmignore
generated
vendored
Normal file
9
webGl/my-threejs-test/node_modules/glsl-token-string/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
node_modules
|
||||
*.log
|
||||
.DS_Store
|
||||
bundle.js
|
||||
test
|
||||
test.js
|
||||
demo
|
||||
example
|
||||
!.gitignore
|
||||
12
webGl/my-threejs-test/node_modules/glsl-token-string/LICENSE.md
generated
vendored
Normal file
12
webGl/my-threejs-test/node_modules/glsl-token-string/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
The MIT License (MIT)
|
||||
=====================
|
||||
|
||||
Copyright (c) 2014 [stackgl](http://github.com/stackgl/) contributors
|
||||
|
||||
*stackgl contributors listed at <https://github.com/stackgl/contributing/blob/master/CONTRIBUTING.md#contributors>*
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
35
webGl/my-threejs-test/node_modules/glsl-token-string/README.md
generated
vendored
Normal file
35
webGl/my-threejs-test/node_modules/glsl-token-string/README.md
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# glsl-token-string
|
||||
|
||||
[](http://github.com/badges/stability-badges)
|
||||
|
||||
Simple helper package that converts an array of GLSL tokens to a plain GLSL
|
||||
source string.
|
||||
|
||||
## Usage
|
||||
|
||||
[](https://nodei.co/npm/glsl-token-string/)
|
||||
|
||||
### `src = stringify(tokens)`
|
||||
|
||||
``` javascript
|
||||
var tokenize = require('glsl-tokenizer/string')
|
||||
var stringify = require('glsl-token-string')
|
||||
var assert = require('assert')
|
||||
|
||||
var src = 'vec3 light = vec3(1.0);'
|
||||
var tokens = tokenize(src)
|
||||
|
||||
assert(stringify(tokens) === src)
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [glsl-tokenizer](http://github.com/stackgl/glsl-tokenizer)
|
||||
* [glsl-token-scope](http://github.com/stackgl/glsl-token-scope)
|
||||
* [glsl-token-depth](http://github.com/stackgl/glsl-token-depth)
|
||||
* [glsl-token-properties](http://github.com/stackgl/glsl-token-properties)
|
||||
* [glsl-token-assignments](http://github.com/stackgl/glsl-token-assignments)
|
||||
|
||||
## License
|
||||
|
||||
MIT. See [LICENSE.md](http://github.com/stackgl/glsl-token-string/blob/master/LICENSE.md) for details.
|
||||
20
webGl/my-threejs-test/node_modules/glsl-token-string/fixture.glsl
generated
vendored
Normal file
20
webGl/my-threejs-test/node_modules/glsl-token-string/fixture.glsl
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
precision mediump float;
|
||||
|
||||
attribute vec3 aPosition;
|
||||
attribute vec3 aNormal;
|
||||
|
||||
uniform mat4 uProj;
|
||||
uniform mat4 uView;
|
||||
uniform mat4 uModel;
|
||||
|
||||
varying float vLight;
|
||||
|
||||
struct x {
|
||||
float y;
|
||||
float z;
|
||||
};
|
||||
|
||||
void main( void ) {
|
||||
vLight = dot(aNormal, vec3(0, 1, 0));
|
||||
gl_Position = uProj * uView * uModel * vec4(aPosition, 1);
|
||||
}
|
||||
12
webGl/my-threejs-test/node_modules/glsl-token-string/index.js
generated
vendored
Normal file
12
webGl/my-threejs-test/node_modules/glsl-token-string/index.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
module.exports = toString
|
||||
|
||||
function toString(tokens) {
|
||||
var output = []
|
||||
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
if (tokens[i].type === 'eof') continue
|
||||
output.push(tokens[i].data)
|
||||
}
|
||||
|
||||
return output.join('')
|
||||
}
|
||||
32
webGl/my-threejs-test/node_modules/glsl-token-string/package.json
generated
vendored
Normal file
32
webGl/my-threejs-test/node_modules/glsl-token-string/package.json
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "glsl-token-string",
|
||||
"version": "1.0.1",
|
||||
"description": "Converts an array of GLSL tokens to a plain source string",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "node test | tap-spec"
|
||||
},
|
||||
"author": {
|
||||
"name": "Hugh Kennedy",
|
||||
"email": "hughskennedy@gmail.com",
|
||||
"url": "http://hughsk.io/"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"glsl-tokenizer": "^2.0.0",
|
||||
"tap-spec": "^2.1.2",
|
||||
"tape": "^3.0.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/stackgl/glsl-token-string.git"
|
||||
},
|
||||
"keywords": [
|
||||
"ecosystem:stackgl"
|
||||
],
|
||||
"homepage": "https://github.com/stackgl/glsl-token-string",
|
||||
"bugs": {
|
||||
"url": "https://github.com/stackgl/glsl-token-string/issues"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user