From 7e96f36dd6dfe39ed00b6052276456dab001c893 Mon Sep 17 00:00:00 2001 From: Mugen87 Date: Thu, 2 May 2019 11:52:55 +0200 Subject: [PATCH 01/53] WebGLRenderer: Set debug.checkShaderErrors to true. --- src/renderers/WebGLRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index 148695dbdbb51a..b662727fd41976 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -84,7 +84,7 @@ function WebGLRenderer( parameters ) { * Enables error checking and reporting when shader programs are being compiled * @type {boolean} */ - checkShaderErrors: false + checkShaderErrors: true }; // clearing From 672258ec1dcaf18a809d1b2b52628540f1290ee7 Mon Sep 17 00:00:00 2001 From: Temdog007 Date: Sat, 4 May 2019 20:01:32 -0700 Subject: [PATCH 02/53] Add .toJSON to BufferAttribute --- src/core/BufferAttribute.js | 10 ++++++++++ src/core/BufferGeometry.js | 14 ++------------ src/core/InstancedBufferAttribute.js | 12 ++++++++++++ 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/core/BufferAttribute.js b/src/core/BufferAttribute.js index ec5b7544095e69..ad27afe0635372 100644 --- a/src/core/BufferAttribute.js +++ b/src/core/BufferAttribute.js @@ -319,6 +319,16 @@ Object.assign( BufferAttribute.prototype, { return new this.constructor( this.array, this.itemSize ).copy( this ); + }, + + toJSON: function() { + + return { + itemSize: this.itemSize, + type: this.array.constructor.name, + array: Array.prototype.slice.call( this.array ), + normalized: this.normalized + }; } } ); diff --git a/src/core/BufferGeometry.js b/src/core/BufferGeometry.js index c5a4e94344b3ad..1db3cfbc3111bc 100644 --- a/src/core/BufferGeometry.js +++ b/src/core/BufferGeometry.js @@ -1063,12 +1063,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy var attribute = attributes[ key ]; - var attributeData = { - itemSize: attribute.itemSize, - type: attribute.array.constructor.name, - array: Array.prototype.slice.call( attribute.array ), - normalized: attribute.normalized - }; + var attributeData = attribute.toJSON(); if ( attribute.name !== '' ) attributeData.name = attribute.name; @@ -1089,12 +1084,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy var attribute = attributeArray[ i ]; - var attributeData = { - itemSize: attribute.itemSize, - type: attribute.array.constructor.name, - array: Array.prototype.slice.call( attribute.array ), - normalized: attribute.normalized - }; + var attributeData = attribute.toJSON(); if ( attribute.name !== '' ) attributeData.name = attribute.name; diff --git a/src/core/InstancedBufferAttribute.js b/src/core/InstancedBufferAttribute.js index 75144f2f76bdc8..c62c4451a5214a 100644 --- a/src/core/InstancedBufferAttribute.js +++ b/src/core/InstancedBufferAttribute.js @@ -36,6 +36,18 @@ InstancedBufferAttribute.prototype = Object.assign( Object.create( BufferAttribu return this; + }, + + toJSON: function () { + + var data = BufferAttribute.prototype.toJSON.call( this ); + + data.meshPerAttribute = this.meshPerAttribute; + + data.isInstancedBufferAttribute = true; + + return data; + } } ); From bbb1105c01437b3c16fd788ee2e71faa57e855e3 Mon Sep 17 00:00:00 2001 From: Temdog007 Date: Sat, 4 May 2019 20:02:09 -0700 Subject: [PATCH 03/53] Fix format --- src/core/BufferAttribute.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/BufferAttribute.js b/src/core/BufferAttribute.js index ad27afe0635372..d7cff273dfffd7 100644 --- a/src/core/BufferAttribute.js +++ b/src/core/BufferAttribute.js @@ -321,7 +321,7 @@ Object.assign( BufferAttribute.prototype, { }, - toJSON: function() { + toJSON: function () { return { itemSize: this.itemSize, @@ -329,6 +329,7 @@ Object.assign( BufferAttribute.prototype, { array: Array.prototype.slice.call( this.array ), normalized: this.normalized }; + } } ); From 5aa714bfd6d6b2323ec75b94b5d630b581627ded Mon Sep 17 00:00:00 2001 From: Mugen87 Date: Sun, 5 May 2019 12:29:38 +0200 Subject: [PATCH 04/53] Docs: Improve Useful Links page. --- docs/manual/en/introduction/Useful-links.html | 28 ++++++++-------- docs/manual/zh/introduction/Useful-links.html | 32 ++++++++++++------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/docs/manual/en/introduction/Useful-links.html b/docs/manual/en/introduction/Useful-links.html index 2c144eab316e43..414117d2d4a8e8 100644 --- a/docs/manual/en/introduction/Useful-links.html +++ b/docs/manual/en/introduction/Useful-links.html @@ -25,7 +25,7 @@

[name]


Help forums

- Three.js officially uses [link:http://stackoverflow.com/tags/three.js/info Stack Overflow] for help requests. + Three.js officially uses the [link:https://discourse.threejs.org/ forum] and [link:http://stackoverflow.com/tags/three.js/info Stack Overflow] for help requests. If you need assistance with something, that's the place to go. Do NOT open an issue on Github for help requests.

@@ -46,6 +46,9 @@

Getting started with three.js

More extensive / advanced articles and courses

    +
  • + [link:https://discoverthreejs.com/ Discover three.js] +
  • [link:https://threejsfundamentals.org/ Three.js Fundamentals]
  • @@ -66,21 +69,16 @@

    More extensive / advanced articles and courses

    [link:http://learningthreejs.com/ Learning Three.js] – a blog with articles dedicated to teaching three.js
  • - [link:http://bkcore.com/blog/3d/webgl-three-js-animated-selective-glow.html Animated selective glow in Three.js] - by [link:https://github.com/BKcore BKcore] + [link:https://discourse.threejs.org/t/three-js-bookshelf/2468 Three.js Bookshelf] - Looking for more resources about three.js or computer graphics in general? + Check out the selection of literature recommended by the community.
-

Tutorials in other languages

+

News and Updates

  • - [link:http://www.natural-science.or.jp/article/20120220155529.php Building A Physics Simulation Environment] - three.js tutorial in Japanese + [link:https://twitter.com/hashtag/threejs Three.js on Twitter]
  • - -
- -

News and Updates

-
  • [link:http://www.reddit.com/r/threejs/ Three.js on reddit]
  • @@ -90,9 +88,6 @@

    News and Updates

  • [link:http://learningwebgl.com/blog/ Learning WebGL Blog] – The authoritive news source for WebGL.
  • -
  • - [link:https://plus.google.com/104300307601542851567/posts Three.js posts] on Google+ – frequent posts on Three.js -

Examples

@@ -179,6 +174,13 @@

Old Links

[link:http://12devsofxmas.co.uk/2012/01/webgl-and-three-js/ A whirlwind look at Three.js] by [link:http://github.com/nrocy Paul King] +
  • + [link:http://bkcore.com/blog/3d/webgl-three-js-animated-selective-glow.html Animated selective glow in Three.js] + by [link:https://github.com/BKcore BKcore] +
  • +
  • + [link:http://www.natural-science.or.jp/article/20120220155529.php Building A Physics Simulation Environment] - three.js tutorial in Japanese +
  • diff --git a/docs/manual/zh/introduction/Useful-links.html b/docs/manual/zh/introduction/Useful-links.html index c32ad2cf30a913..b6642639297d37 100644 --- a/docs/manual/zh/introduction/Useful-links.html +++ b/docs/manual/zh/introduction/Useful-links.html @@ -31,6 +31,9 @@

    教程以及课程

    three.js入门