This commit is contained in:
Gregg Tavares 2019-11-03 14:24:50 +09:00
parent db2add60b4
commit e71facdfb0
15 changed files with 48 additions and 20 deletions

View File

@ -63,7 +63,7 @@ export type DrawObject = {
count?: number;
instanceCount?: number;
};
export type AttachmentOptions = {
export type AttachmentOptions = TextureOptions & {
attach?: number;
format?: number;
type?: number;

View File

@ -1,5 +1,5 @@
/*!
* @license twgl.js 4.13.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
* @license twgl.js 4.13.1 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
* Available via the MIT license.
* see: http://github.com/greggman/twgl.js for details
*/
@ -1192,6 +1192,7 @@ var LINEAR_MIPMAP_LINEAR = 0x2703; // eslint-disable-line
* If provided will attach this Object. This allows you to share
* attachments across framebuffers.
* @memberOf module:twgl
* @mixes module:twgl.TextureOptions
*/
var defaultAttachments = [{
@ -5460,6 +5461,7 @@ function loadShader(gl, shaderSource, shaderType, opt_errorCallback) {
function getProgramOptions(opt_attribs, opt_locations, opt_errorCallback) {
var transformFeedbackVaryings;
var transformFeedbackMode;
if (typeof opt_locations === 'function') {
opt_errorCallback = opt_locations;
@ -5480,11 +5482,13 @@ function getProgramOptions(opt_attribs, opt_locations, opt_errorCallback) {
opt_errorCallback = opt.errorCallback;
opt_attribs = opt.attribLocations;
transformFeedbackVaryings = opt.transformFeedbackVaryings;
transformFeedbackMode = opt.transformFeedbackMode;
}
var options = {
errorCallback: opt_errorCallback || error,
transformFeedbackVaryings: transformFeedbackVaryings
transformFeedbackVaryings: transformFeedbackVaryings,
transformFeedbackMode: transformFeedbackMode
};
if (opt_attribs) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/* @license twgl.js 4.12.1 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
/* @license twgl.js 4.13.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
Available via the MIT license.
see: http://github.com/greggman/twgl.js for details */
/*
@ -7264,6 +7264,7 @@ function loadShader(gl, shaderSource, shaderType, opt_errorCallback) {
*/
function getProgramOptions(opt_attribs, opt_locations, opt_errorCallback) {
let transformFeedbackVaryings;
let transformFeedbackMode;
if (typeof opt_locations === 'function') {
opt_errorCallback = opt_locations;
opt_locations = undefined;
@ -7281,11 +7282,13 @@ function getProgramOptions(opt_attribs, opt_locations, opt_errorCallback) {
opt_errorCallback = opt.errorCallback;
opt_attribs = opt.attribLocations;
transformFeedbackVaryings = opt.transformFeedbackVaryings;
transformFeedbackMode = opt.transformFeedbackMode;
}
const options = {
errorCallback: opt_errorCallback || error$1,
transformFeedbackVaryings: transformFeedbackVaryings,
transformFeedbackMode: transformFeedbackMode,
};
if (opt_attribs) {
@ -8595,6 +8598,7 @@ const LINEAR = 0x2601;
* If provided will attach this Object. This allows you to share
* attachments across framebuffers.
* @memberOf module:twgl
* @mixes module:twgl.TextureOptions
*/
const defaultAttachments = [

2
dist/4.x/twgl.d.ts vendored
View File

@ -63,7 +63,7 @@ export type DrawObject = {
count?: number;
instanceCount?: number;
};
export type AttachmentOptions = {
export type AttachmentOptions = TextureOptions & {
attach?: number;
format?: number;
type?: number;

8
dist/4.x/twgl.js vendored
View File

@ -1,5 +1,5 @@
/*!
* @license twgl.js 4.13.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
* @license twgl.js 4.13.1 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
* Available via the MIT license.
* see: http://github.com/greggman/twgl.js for details
*/
@ -1192,6 +1192,7 @@ var LINEAR_MIPMAP_LINEAR = 0x2703; // eslint-disable-line
* If provided will attach this Object. This allows you to share
* attachments across framebuffers.
* @memberOf module:twgl
* @mixes module:twgl.TextureOptions
*/
var defaultAttachments = [{
@ -2400,6 +2401,7 @@ function loadShader(gl, shaderSource, shaderType, opt_errorCallback) {
function getProgramOptions(opt_attribs, opt_locations, opt_errorCallback) {
var transformFeedbackVaryings;
var transformFeedbackMode;
if (typeof opt_locations === 'function') {
opt_errorCallback = opt_locations;
@ -2420,11 +2422,13 @@ function getProgramOptions(opt_attribs, opt_locations, opt_errorCallback) {
opt_errorCallback = opt.errorCallback;
opt_attribs = opt.attribLocations;
transformFeedbackVaryings = opt.transformFeedbackVaryings;
transformFeedbackMode = opt.transformFeedbackMode;
}
var options = {
errorCallback: opt_errorCallback || error,
transformFeedbackVaryings: transformFeedbackVaryings
transformFeedbackVaryings: transformFeedbackVaryings,
transformFeedbackMode: transformFeedbackMode
};
if (opt_attribs) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7461,6 +7461,14 @@ attachments across framebuffers.</p></td>
<dt class="mixes">Mixes In:</dt>
<dd class="mixes"><ul>
<li><a href="module-twgl.html#.TextureOptions">module:twgl.TextureOptions</a></li>
</ul></dd>

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- this file is auto-generated from README.md. Do not edited directly -->
<!--
@license twgl.js 4.13.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
@license twgl.js 4.13.1 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
Available via the MIT license.
see: http://github.com/greggman/twgl.js for details
-->

View File

@ -1,5 +1,5 @@
/*!
* @license twgl.js 4.13.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
* @license twgl.js 4.13.1 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
* Available via the MIT license.
* see: http://github.com/greggman/twgl.js for details
*/
@ -1192,6 +1192,7 @@ var LINEAR_MIPMAP_LINEAR = 0x2703; // eslint-disable-line
* If provided will attach this Object. This allows you to share
* attachments across framebuffers.
* @memberOf module:twgl
* @mixes module:twgl.TextureOptions
*/
var defaultAttachments = [{
@ -2400,6 +2401,7 @@ function loadShader(gl, shaderSource, shaderType, opt_errorCallback) {
function getProgramOptions(opt_attribs, opt_locations, opt_errorCallback) {
var transformFeedbackVaryings;
var transformFeedbackMode;
if (typeof opt_locations === 'function') {
opt_errorCallback = opt_locations;
@ -2420,11 +2422,13 @@ function getProgramOptions(opt_attribs, opt_locations, opt_errorCallback) {
opt_errorCallback = opt.errorCallback;
opt_attribs = opt.attribLocations;
transformFeedbackVaryings = opt.transformFeedbackVaryings;
transformFeedbackMode = opt.transformFeedbackMode;
}
var options = {
errorCallback: opt_errorCallback || error,
transformFeedbackVaryings: transformFeedbackVaryings
transformFeedbackVaryings: transformFeedbackVaryings,
transformFeedbackMode: transformFeedbackMode
};
if (opt_attribs) {

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "twgl-base.js",
"version": "4.13.0",
"version": "4.13.1",
"description": "A Tiny WebGL helper library",
"main": "dist/4.x/twgl.js",
"types": "dist/4.x/twgl-full.d.ts",