Skip to content

Commit 7b91497

Browse files
xsyetopzclaude
andcommitted
fix(playground): hide THREE.js tab when threeSource is undefined
null threeSource passed the !== undefined guard, causing CodeHighlight to call .trim() on null when the tab was clicked. Changed null exports to undefined so the guard correctly suppresses the tab toggle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 22393c2 commit 7b91497

17 files changed

Lines changed: 17 additions & 17 deletions

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@xsyetopz/easel",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"exports": "./src/index.ts",
55
"publish": {
66
"include": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@xsyetopz/easel",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "Legacy JavaScript 3D library with a THREE.js-compatible scene graph API",
55
"type": "module",
66
"main": "./dist/index.umd.js",

playground/examples/geometry/geometry-parameters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,4 @@ scene.remove(mesh);
150150
mesh = new EASEL.Mesh(buildGeometry(shape, segments), material);
151151
scene.add(mesh);`;
152152

153-
export const threeSource = null;
153+
export const threeSource = undefined;

playground/examples/materials/flat-vs-gouraud.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ gouraud.position.x = 2.5;`;
105105

106106
// THREE.js does not expose a Flat/Gouraud toggle on MeshLambertMaterial the
107107
// same way - FlatShading is a geometry/normal flag, not a material property.
108-
export const threeSource = null;
108+
export const threeSource = undefined;

playground/examples/performance/frustum-culling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,4 @@ for (let i = 0; i < 1000; i++) {
173173
174174
// Camera aimed at one corner — frustum culling skips ~70% of meshes`;
175175

176-
export const threeSource = null;
176+
export const threeSource = undefined;

playground/examples/performance/mixed-scene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,4 +368,4 @@ for (let i = 0; i < 4; i++) {
368368
// Optional fog
369369
// scene.fog = new EASEL.Fog({ color: 0x222222, near: 5, far: 30 });`;
370370

371-
export const threeSource = null;
371+
export const threeSource = undefined;

playground/examples/performance/multi-light.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,4 @@ for (let i = 0; i < lightCount; i++) {
163163
scene.add(pl);
164164
}`;
165165

166-
export const threeSource = null;
166+
export const threeSource = undefined;

playground/examples/performance/overdraw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,4 @@ for (let i = 0; i < 10; i++) {
181181
scene.add(mesh);
182182
}`;
183183

184-
export const threeSource = null;
184+
export const threeSource = undefined;

playground/examples/performance/point-cloud.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,4 @@ const material = new EASEL.PointsMaterial({ size: 2 });
205205
const points = new EASEL.Points(geometry, material);
206206
scene.add(points);`;
207207

208-
export const threeSource = null;
208+
export const threeSource = undefined;

playground/examples/performance/rasterizer-benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,4 @@ scene.add(sphere);
203203
// new EASEL.ToonMaterial({ color })
204204
// const mat = new EASEL.BasicMaterial({ color }); mat.wireframe = true;`;
205205

206-
export const threeSource = null;
206+
export const threeSource = undefined;

0 commit comments

Comments
 (0)