Skip to content

Conversation

@lyonsno
Copy link
Owner

@lyonsno lyonsno commented Nov 21, 2025

Summary

  • load the missing core engine scripts for the particle demo and align the legacy SEC3ENGINE namespace
  • add camera factory helpers and canvas registration expected by the old demo
  • guard particle system setup against absent scene/light resources to avoid WebGL errors

Testing

  • Playwright smoke test of particleDemo.html

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +170 to +174
var renderParticles = function ( light ) {

light = light || getActiveLight();
if (!light || !light.cascadeFramebuffers || !light.cascadeFramebuffers[0]) {
return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge renderParticles bails out when no light is present

The new guard in renderParticles returns whenever no light with cascade framebuffers is found, but particleDemo.html/Sec3Engine/demos/ParticleDemo.js never create a light and drawScene calls system.draw() without passing one. In that scenario getActiveLight() yields null, this guard trips, and the demo never issues any draw calls, leaving the canvas blank even though the rest of the setup succeeds. Rendering should handle the no-light case instead of exiting early or the demo needs to provide a light.

Useful? React with 👍 / 👎.

Copy link
Owner Author

@lyonsno lyonsno Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex If the light isn't being added, why was this working originally?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants