<p dir="auto">From <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="172552141" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/9562" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/9562/hovercard" href="https://github.com/mrdoob/three.js/issues/9562">#9562</a></p>
<p dir="auto">The purpose:</p>
<p dir="auto">transform Three to monorepository with multiple npm packages.</p>
<p dir="auto">Why:</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sompylasar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sompylasar">@sompylasar</a></p>
<blockquote>
<p dir="auto">The monorepo concept is where multiple independent packages that are published to npm separately but maintained together in a single repository. Almost like three.js repo is organized now, and almost like you described in the organization structure you posted, but all in one repo.</p>
</blockquote>
<blockquote>
<p dir="auto">This structure helps maintainers to make well-integrated changes across multiple packages and release versions of them that are compatible with each other: the goals the maintainers are strive for throughout this issue thread.</p>
</blockquote>
<blockquote>
<p dir="auto">Having multiple repositories puts more maintenance and process work on all the developers, having to have duplicate configurations, workflow scripts, documentation, etc.</p>
</blockquote>
<p dir="auto">How:</p>
<p dir="auto">With help of some script like <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/donmccurdy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/donmccurdy">@donmccurdy</a> did <a href="https://github.com/donmccurdy/aframe-extras/blob/master/scripts/publish.js">here</a>.</p>
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">I've noticed a little regression since r112 <a href="https://github.com/mrdoob/three.js/commit/e8829adbdc1cdd68039689371644ca4d9132c088#diff-bf67f187997e80097f3e99b9545d7134">MeshToonMaterial: Stop deriving from MeshPhongMaterial.</a> : clippingPlanes using meshToonMaterial don't work anymore. The following stacktrace appears :</p>
<p dir="auto"><code class="notranslate">THREE.WebGLProgram: shader error:  0 35715 false gl.getProgramInfoLog No compiled fragment shader when at least one graphics shader is attached. THREE.WebGLShader: gl.getShaderInfoLog() vertex ERROR: 0:224: 'vViewPosition' : redefinition</code></p>
<p dir="auto">After digging a little, this problem has been confirmed and resolved with meshNormalMaterial. One of the fragment needs having the new '#define TOON' check to avoid variable duplication. In the meantime, I've overcome this issue by replacing the define in the fragment shader.</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r113</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r112</li>
<li>[ ]...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>