feat: point lights (direction-only shading + radial colored shadows)#71
Merged
Conversation
…n (PolyPointLight + per-face contribs)
… bake/re-bake wiring
…s PointLight(decay=0) emulation
…); drop implicit-sun fallback
…ult-sun contamination in di=0 comparisons
…olored shadows on unlit floor) — vanilla
… (core computeMergedReceiverShadows); colored overlap + dynamic + intensity gate in react/vue
… cross-renderer shadow parity
…lor change (not just direction); parity bench rebakes vanilla surface on light change
…ct/Vue auto-rebake (intentional, perf)
… baked vs dynamic, colored shadows)
…nsity/ambient/direction) + opt-in ground shadow; fix zoom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds point lights to PolyCSS across core, vanilla, React, and Vue, and overhauls the shadow color model.
Lights
PolyPointLight(position,color,intensity,castShadow). Direction-only — no distance falloff — emulating three.jsPointLight(distance:0, decay:0). Flat-per-face Lambert; accumulates per-channel with the directional + ambient terms.pointLightsscene option mirrored across all renderers (per-mesh local conversion + bake/re-bake wiring).Shadows
mix-blend-mode: multiplylayers, so the both-blocked region composites to ambient-only. Shared via corecomputeMergedReceiverShadowsso vanilla/React/Vue are identical.setOptionsnow re-emits shadows on directional intensity/color change, not just direction.Docs & bench
PolyDemogains light controls and an opt-in ground shadow.rebakeAtlas()vs React/Vue auto-rebake) and the dynamic point-light exclusion.PointLight(decay=0)), shadow-color delta tool, and a 4-pane vanilla/React/Vue/three parity page.All packages green (core 1087, polycss 747, react 435, vue 434, fonts 45) and
pnpm buildclean.