Skip to content

style(demos): unify background color to rgb(40, 42, 54) - #4

Draft
sunquakes wants to merge 9 commits into
mainfrom
develop
Draft

sunquakes wants to merge 9 commits into
mainfrom
develop

Conversation

@sunquakes

Copy link
Copy Markdown
Owner

Summary

Unify the demo scene background from #1a1a2e to rgb(40, 42, 54) across every demo component and its documentation, and record the convention in AGENTS.md so future demos do not drift back.

What changed

  • 25 demo components in docs/src/components/ — the <Scene bgColor="..."> value is now rgb(40, 42, 54); the Bloom demo's equivalent hex literal 0x1a1a2e became new THREE.Color('rgb(40, 42, 54)').
  • 12 English docs in docs/guide/ and 12 Chinese docs in docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/ — the matching tsx samples were updated so the rendered examples match the live demos.
  • AGENTS.md — the default demo background convention now reads rgb(40, 42, 54).

50 files changed, 76 insertions(+), 76 deletions(-). Every changed line is only the background color literal.

Why

The demos and their documentation had drifted onto a mix of the legacy #1a1a2e hex and the newer rgb(40, 42, 54) value, so pages rendered visibly different backgrounds and copy-pasted samples could pick up the stale color. Pinning a single value — and documenting it in AGENTS.md — keeps every current and future demo consistent.

Impact

  • Demo and documentation appearance is now uniform; no API, runtime, or behaviour changes.
  • The groundColor fallback in the TileLayer docs is intentionally left as #1a1a2e, because it documents the library's real DEFAULT_GROUND_COLOR default rather than a demo background.

Validation

  • Verified the diff is color-only: all 76 changed lines match #1a1a2e or rgb(40, 42, 54), with zero unrelated lines.
  • eslint . passes (0 errors; one pre-existing warning in src/components/Scene.tsx).
  • No conflict markers or malformed frontmatter were introduced.

- Run typecheck, lint, test and build on PR and pushes to main/develop
- Add lint:ci script without --fix so CI never rewrites sources
- Ignore docs directory in ESLint config
- Add Picker class with click and hover detection via Raycaster
- Support targets, recursive, filter, layers, near and far options
- Coalesce hover raycasts through requestAnimationFrame
- Skip raycasting entirely when no listener is registered
- Use a click threshold to tell clicks apart from camera drags
- Add onClick, onHover, pickFilter and pickRecursive props to Scene
- Expose Picker plus PickEvent, PickEventType, PickCallback and
  PickerOptions from the public entry point
- Add unit tests and English and Chinese documentation
- Add LightPillar group with TSL cone, top glow and ground pulse rings
- Share one material per layer and drive per-mesh data via attributes
- Auto-detect the renderer and pre-correct color on WebGPU
- Dispose geometries, materials, the added listener and the rAF loop
- Export LightPillar and LightPillarOptions from the public entry point
- Add unit tests, dual-renderer demo and bilingual documentation
- Drop the unused options argument from the Popup demo
- Add a default export condition to package.json for CJS consumers
- Add WGS84/GCJ02/BD09 datum conversion, recentered Web Mercator and local tangent plane projections, and a GeoReference for geographic-to-local mapping
- Add Scene origin/crs/datum/axes/geo props, plus object-form gridHelper options
- Add GeoObject to anchor objects at geographic coordinates and GeoJsonLayer for GeoJSON geometries
- Add TileLayer that streams XYZ raster tiles with quadtree selection, worker image decode and crossfade
- Add tests, dual-renderer demos and bilingual documentation

COMMIT_EXIT=
- Replace the #1a1a2e scene background with rgb(40, 42, 54) across all
  demo components, including the equivalent hex literal used by the Bloom
  demo onCreated handler
- Update the matching code samples in the English and Chinese docs
- Update the default demo background convention in AGENTS.md

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant